forked from TrueCloudLab/frostfs-api-go
[#112] container: Remove GetExtendedACL
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
This commit is contained in:
parent
9c5e32a183
commit
c11f50efec
11 changed files with 4 additions and 1323 deletions
|
@ -1,8 +1,6 @@
|
||||||
package container
|
package container
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl"
|
|
||||||
aclGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
|
|
||||||
container "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc"
|
container "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
|
||||||
netmapGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
|
netmapGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
|
||||||
|
@ -764,175 +762,3 @@ func (r *ListResponse) FromGRPCMessage(m grpc.Message) error {
|
||||||
|
|
||||||
return r.ResponseHeaders.FromMessage(v)
|
return r.ResponseHeaders.FromMessage(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *GetExtendedACLRequestBody) ToGRPCMessage() grpc.Message {
|
|
||||||
var m *container.GetExtendedACLRequest_Body
|
|
||||||
|
|
||||||
if r != nil {
|
|
||||||
m = new(container.GetExtendedACLRequest_Body)
|
|
||||||
|
|
||||||
m.SetContainerId(r.cid.ToGRPCMessage().(*refsGRPC.ContainerID))
|
|
||||||
}
|
|
||||||
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLRequestBody) FromGRPCMessage(m grpc.Message) error {
|
|
||||||
v, ok := m.(*container.GetExtendedACLRequest_Body)
|
|
||||||
if !ok {
|
|
||||||
return message.NewUnexpectedMessageType(m, v)
|
|
||||||
}
|
|
||||||
|
|
||||||
var err error
|
|
||||||
|
|
||||||
cid := v.GetContainerId()
|
|
||||||
if cid == nil {
|
|
||||||
r.cid = nil
|
|
||||||
} else {
|
|
||||||
if r.cid == nil {
|
|
||||||
r.cid = new(refs.ContainerID)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = r.cid.FromGRPCMessage(cid)
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLRequest) ToGRPCMessage() grpc.Message {
|
|
||||||
var m *container.GetExtendedACLRequest
|
|
||||||
|
|
||||||
if r != nil {
|
|
||||||
m = new(container.GetExtendedACLRequest)
|
|
||||||
|
|
||||||
m.SetBody(r.body.ToGRPCMessage().(*container.GetExtendedACLRequest_Body))
|
|
||||||
r.RequestHeaders.ToMessage(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLRequest) FromGRPCMessage(m grpc.Message) error {
|
|
||||||
v, ok := m.(*container.GetExtendedACLRequest)
|
|
||||||
if !ok {
|
|
||||||
return message.NewUnexpectedMessageType(m, v)
|
|
||||||
}
|
|
||||||
|
|
||||||
var err error
|
|
||||||
|
|
||||||
body := v.GetBody()
|
|
||||||
if body == nil {
|
|
||||||
r.body = nil
|
|
||||||
} else {
|
|
||||||
if r.body == nil {
|
|
||||||
r.body = new(GetExtendedACLRequestBody)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = r.body.FromGRPCMessage(body)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r.RequestHeaders.FromMessage(v)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponseBody) ToGRPCMessage() grpc.Message {
|
|
||||||
var m *container.GetExtendedACLResponse_Body
|
|
||||||
|
|
||||||
if r != nil {
|
|
||||||
m = new(container.GetExtendedACLResponse_Body)
|
|
||||||
|
|
||||||
m.SetEacl(r.eacl.ToGRPCMessage().(*aclGRPC.EACLTable))
|
|
||||||
m.SetSignature(toSignatureRFC6979(r.sig))
|
|
||||||
m.SetSessionToken(r.token.ToGRPCMessage().(*sessionGRPC.SessionToken))
|
|
||||||
}
|
|
||||||
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponseBody) FromGRPCMessage(m grpc.Message) error {
|
|
||||||
v, ok := m.(*container.GetExtendedACLResponse_Body)
|
|
||||||
if !ok {
|
|
||||||
return message.NewUnexpectedMessageType(m, v)
|
|
||||||
}
|
|
||||||
|
|
||||||
var err error
|
|
||||||
|
|
||||||
eacl := v.GetEacl()
|
|
||||||
if eacl == nil {
|
|
||||||
r.eacl = nil
|
|
||||||
} else {
|
|
||||||
if r.eacl == nil {
|
|
||||||
r.eacl = new(acl.Table)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = r.eacl.FromGRPCMessage(eacl)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sig := v.GetSignature()
|
|
||||||
if sig == nil {
|
|
||||||
r.sig = nil
|
|
||||||
} else {
|
|
||||||
if r.sig == nil {
|
|
||||||
r.sig = new(refs.Signature)
|
|
||||||
}
|
|
||||||
|
|
||||||
r.sig.SetKey(sig.GetKey())
|
|
||||||
r.sig.SetSign(sig.GetSign())
|
|
||||||
}
|
|
||||||
|
|
||||||
token := v.GetSessionToken()
|
|
||||||
if token == nil {
|
|
||||||
r.token = nil
|
|
||||||
} else {
|
|
||||||
if r.token == nil {
|
|
||||||
r.token = new(session.Token)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = r.token.FromGRPCMessage(token)
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponse) ToGRPCMessage() grpc.Message {
|
|
||||||
var m *container.GetExtendedACLResponse
|
|
||||||
|
|
||||||
if r != nil {
|
|
||||||
m = new(container.GetExtendedACLResponse)
|
|
||||||
|
|
||||||
m.SetBody(r.body.ToGRPCMessage().(*container.GetExtendedACLResponse_Body))
|
|
||||||
r.ResponseHeaders.ToMessage(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponse) FromGRPCMessage(m grpc.Message) error {
|
|
||||||
v, ok := m.(*container.GetExtendedACLResponse)
|
|
||||||
if !ok {
|
|
||||||
return message.NewUnexpectedMessageType(m, v)
|
|
||||||
}
|
|
||||||
|
|
||||||
var err error
|
|
||||||
|
|
||||||
body := v.GetBody()
|
|
||||||
if body == nil {
|
|
||||||
r.body = nil
|
|
||||||
} else {
|
|
||||||
if r.body == nil {
|
|
||||||
r.body = new(GetExtendedACLResponseBody)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = r.body.FromGRPCMessage(body)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return r.ResponseHeaders.FromMessage(v)
|
|
||||||
}
|
|
||||||
|
|
779
container/grpc/service_frostfs.pb.go
generated
779
container/grpc/service_frostfs.pb.go
generated
|
@ -5,7 +5,6 @@ package container
|
||||||
import (
|
import (
|
||||||
json "encoding/json"
|
json "encoding/json"
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
grpc2 "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
|
|
||||||
grpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
grpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
||||||
grpc1 "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
|
grpc1 "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
|
||||||
pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool"
|
pool "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/pool"
|
||||||
|
@ -2966,781 +2965,3 @@ func (x *ListResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||||
in.Consumed()
|
in.Consumed()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetExtendedACLRequest_Body struct {
|
|
||||||
ContainerId *grpc.ContainerID `json:"containerId"`
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
_ encoding.ProtoMarshaler = (*GetExtendedACLRequest_Body)(nil)
|
|
||||||
_ encoding.ProtoUnmarshaler = (*GetExtendedACLRequest_Body)(nil)
|
|
||||||
_ json.Marshaler = (*GetExtendedACLRequest_Body)(nil)
|
|
||||||
_ json.Unmarshaler = (*GetExtendedACLRequest_Body)(nil)
|
|
||||||
)
|
|
||||||
|
|
||||||
// StableSize returns the size of x in protobuf format.
|
|
||||||
//
|
|
||||||
// Structures with the same field values have the same binary size.
|
|
||||||
func (x *GetExtendedACLRequest_Body) StableSize() (size int) {
|
|
||||||
if x == nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
size += proto.NestedStructureSize(1, x.ContainerId)
|
|
||||||
return size
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
||||||
func (x *GetExtendedACLRequest_Body) MarshalProtobuf(dst []byte) []byte {
|
|
||||||
m := pool.MarshalerPool.Get()
|
|
||||||
defer pool.MarshalerPool.Put(m)
|
|
||||||
x.EmitProtobuf(m.MessageMarshaler())
|
|
||||||
dst = m.Marshal(dst)
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetExtendedACLRequest_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
||||||
if x == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if x.ContainerId != nil {
|
|
||||||
x.ContainerId.EmitProtobuf(mm.AppendMessage(1))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
||||||
func (x *GetExtendedACLRequest_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
||||||
var fc easyproto.FieldContext
|
|
||||||
for len(src) > 0 {
|
|
||||||
src, err = fc.NextField(src)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("cannot read next field in %s", "GetExtendedACLRequest_Body")
|
|
||||||
}
|
|
||||||
switch fc.FieldNum {
|
|
||||||
case 1: // ContainerId
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "ContainerId")
|
|
||||||
}
|
|
||||||
x.ContainerId = new(grpc.ContainerID)
|
|
||||||
if err := x.ContainerId.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest_Body) GetContainerId() *grpc.ContainerID {
|
|
||||||
if x != nil {
|
|
||||||
return x.ContainerId
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest_Body) SetContainerId(v *grpc.ContainerID) {
|
|
||||||
x.ContainerId = v
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalJSON implements the json.Marshaler interface.
|
|
||||||
func (x *GetExtendedACLRequest_Body) MarshalJSON() ([]byte, error) {
|
|
||||||
w := jwriter.Writer{}
|
|
||||||
x.MarshalEasyJSON(&w)
|
|
||||||
return w.Buffer.BuildBytes(), w.Error
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
||||||
if x == nil {
|
|
||||||
out.RawString("null")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
out.RawByte('{')
|
|
||||||
{
|
|
||||||
const prefix string = ",\"containerId\":"
|
|
||||||
out.RawString(prefix[1:])
|
|
||||||
x.ContainerId.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
out.RawByte('}')
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
||||||
func (x *GetExtendedACLRequest_Body) UnmarshalJSON(data []byte) error {
|
|
||||||
r := jlexer.Lexer{Data: data}
|
|
||||||
x.UnmarshalEasyJSON(&r)
|
|
||||||
return r.Error()
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
||||||
isTopLevel := in.IsStart()
|
|
||||||
if in.IsNull() {
|
|
||||||
if isTopLevel {
|
|
||||||
in.Consumed()
|
|
||||||
}
|
|
||||||
in.Skip()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
in.Delim('{')
|
|
||||||
for !in.IsDelim('}') {
|
|
||||||
key := in.UnsafeFieldName(false)
|
|
||||||
in.WantColon()
|
|
||||||
if in.IsNull() {
|
|
||||||
in.Skip()
|
|
||||||
in.WantComma()
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
switch key {
|
|
||||||
case "containerId":
|
|
||||||
{
|
|
||||||
var f *grpc.ContainerID
|
|
||||||
f = new(grpc.ContainerID)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.ContainerId = f
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in.WantComma()
|
|
||||||
}
|
|
||||||
in.Delim('}')
|
|
||||||
if isTopLevel {
|
|
||||||
in.Consumed()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetExtendedACLRequest struct {
|
|
||||||
Body *GetExtendedACLRequest_Body `json:"body"`
|
|
||||||
MetaHeader *grpc1.RequestMetaHeader `json:"metaHeader"`
|
|
||||||
VerifyHeader *grpc1.RequestVerificationHeader `json:"verifyHeader"`
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
_ encoding.ProtoMarshaler = (*GetExtendedACLRequest)(nil)
|
|
||||||
_ encoding.ProtoUnmarshaler = (*GetExtendedACLRequest)(nil)
|
|
||||||
_ json.Marshaler = (*GetExtendedACLRequest)(nil)
|
|
||||||
_ json.Unmarshaler = (*GetExtendedACLRequest)(nil)
|
|
||||||
)
|
|
||||||
|
|
||||||
// StableSize returns the size of x in protobuf format.
|
|
||||||
//
|
|
||||||
// Structures with the same field values have the same binary size.
|
|
||||||
func (x *GetExtendedACLRequest) StableSize() (size int) {
|
|
||||||
if x == nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
size += proto.NestedStructureSize(1, x.Body)
|
|
||||||
size += proto.NestedStructureSize(2, x.MetaHeader)
|
|
||||||
size += proto.NestedStructureSize(3, x.VerifyHeader)
|
|
||||||
return size
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadSignedData fills buf with signed data of x.
|
|
||||||
// If buffer length is less than x.SignedDataSize(), new buffer is allocated.
|
|
||||||
//
|
|
||||||
// Returns any error encountered which did not allow writing the data completely.
|
|
||||||
// Otherwise, returns the buffer in which the data is written.
|
|
||||||
//
|
|
||||||
// Structures with the same field values have the same signed data.
|
|
||||||
func (x *GetExtendedACLRequest) SignedDataSize() int {
|
|
||||||
return x.GetBody().StableSize()
|
|
||||||
}
|
|
||||||
|
|
||||||
// SignedDataSize returns size of the request signed data in bytes.
|
|
||||||
//
|
|
||||||
// Structures with the same field values have the same signed data size.
|
|
||||||
func (x *GetExtendedACLRequest) ReadSignedData(buf []byte) ([]byte, error) {
|
|
||||||
return x.GetBody().MarshalProtobuf(buf), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
||||||
func (x *GetExtendedACLRequest) MarshalProtobuf(dst []byte) []byte {
|
|
||||||
m := pool.MarshalerPool.Get()
|
|
||||||
defer pool.MarshalerPool.Put(m)
|
|
||||||
x.EmitProtobuf(m.MessageMarshaler())
|
|
||||||
dst = m.Marshal(dst)
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetExtendedACLRequest) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
||||||
if x == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if x.Body != nil {
|
|
||||||
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
||||||
}
|
|
||||||
if x.MetaHeader != nil {
|
|
||||||
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
||||||
}
|
|
||||||
if x.VerifyHeader != nil {
|
|
||||||
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
||||||
func (x *GetExtendedACLRequest) UnmarshalProtobuf(src []byte) (err error) {
|
|
||||||
var fc easyproto.FieldContext
|
|
||||||
for len(src) > 0 {
|
|
||||||
src, err = fc.NextField(src)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("cannot read next field in %s", "GetExtendedACLRequest")
|
|
||||||
}
|
|
||||||
switch fc.FieldNum {
|
|
||||||
case 1: // Body
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
||||||
}
|
|
||||||
x.Body = new(GetExtendedACLRequest_Body)
|
|
||||||
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
case 2: // MetaHeader
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
|
|
||||||
}
|
|
||||||
x.MetaHeader = new(grpc1.RequestMetaHeader)
|
|
||||||
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
case 3: // VerifyHeader
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
|
|
||||||
}
|
|
||||||
x.VerifyHeader = new(grpc1.RequestVerificationHeader)
|
|
||||||
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest) GetBody() *GetExtendedACLRequest_Body {
|
|
||||||
if x != nil {
|
|
||||||
return x.Body
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest) SetBody(v *GetExtendedACLRequest_Body) {
|
|
||||||
x.Body = v
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest) GetMetaHeader() *grpc1.RequestMetaHeader {
|
|
||||||
if x != nil {
|
|
||||||
return x.MetaHeader
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest) SetMetaHeader(v *grpc1.RequestMetaHeader) {
|
|
||||||
x.MetaHeader = v
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest) GetVerifyHeader() *grpc1.RequestVerificationHeader {
|
|
||||||
if x != nil {
|
|
||||||
return x.VerifyHeader
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest) SetVerifyHeader(v *grpc1.RequestVerificationHeader) {
|
|
||||||
x.VerifyHeader = v
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalJSON implements the json.Marshaler interface.
|
|
||||||
func (x *GetExtendedACLRequest) MarshalJSON() ([]byte, error) {
|
|
||||||
w := jwriter.Writer{}
|
|
||||||
x.MarshalEasyJSON(&w)
|
|
||||||
return w.Buffer.BuildBytes(), w.Error
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest) MarshalEasyJSON(out *jwriter.Writer) {
|
|
||||||
if x == nil {
|
|
||||||
out.RawString("null")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
out.RawByte('{')
|
|
||||||
{
|
|
||||||
const prefix string = ",\"body\":"
|
|
||||||
out.RawString(prefix[1:])
|
|
||||||
x.Body.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
const prefix string = ",\"metaHeader\":"
|
|
||||||
out.RawString(prefix)
|
|
||||||
x.MetaHeader.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
const prefix string = ",\"verifyHeader\":"
|
|
||||||
out.RawString(prefix)
|
|
||||||
x.VerifyHeader.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
out.RawByte('}')
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
||||||
func (x *GetExtendedACLRequest) UnmarshalJSON(data []byte) error {
|
|
||||||
r := jlexer.Lexer{Data: data}
|
|
||||||
x.UnmarshalEasyJSON(&r)
|
|
||||||
return r.Error()
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLRequest) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
||||||
isTopLevel := in.IsStart()
|
|
||||||
if in.IsNull() {
|
|
||||||
if isTopLevel {
|
|
||||||
in.Consumed()
|
|
||||||
}
|
|
||||||
in.Skip()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
in.Delim('{')
|
|
||||||
for !in.IsDelim('}') {
|
|
||||||
key := in.UnsafeFieldName(false)
|
|
||||||
in.WantColon()
|
|
||||||
if in.IsNull() {
|
|
||||||
in.Skip()
|
|
||||||
in.WantComma()
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
switch key {
|
|
||||||
case "body":
|
|
||||||
{
|
|
||||||
var f *GetExtendedACLRequest_Body
|
|
||||||
f = new(GetExtendedACLRequest_Body)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.Body = f
|
|
||||||
}
|
|
||||||
case "metaHeader":
|
|
||||||
{
|
|
||||||
var f *grpc1.RequestMetaHeader
|
|
||||||
f = new(grpc1.RequestMetaHeader)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.MetaHeader = f
|
|
||||||
}
|
|
||||||
case "verifyHeader":
|
|
||||||
{
|
|
||||||
var f *grpc1.RequestVerificationHeader
|
|
||||||
f = new(grpc1.RequestVerificationHeader)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.VerifyHeader = f
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in.WantComma()
|
|
||||||
}
|
|
||||||
in.Delim('}')
|
|
||||||
if isTopLevel {
|
|
||||||
in.Consumed()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetExtendedACLResponse_Body struct {
|
|
||||||
Eacl *grpc2.EACLTable `json:"eacl"`
|
|
||||||
Signature *grpc.SignatureRFC6979 `json:"signature"`
|
|
||||||
SessionToken *grpc1.SessionToken `json:"sessionToken"`
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
_ encoding.ProtoMarshaler = (*GetExtendedACLResponse_Body)(nil)
|
|
||||||
_ encoding.ProtoUnmarshaler = (*GetExtendedACLResponse_Body)(nil)
|
|
||||||
_ json.Marshaler = (*GetExtendedACLResponse_Body)(nil)
|
|
||||||
_ json.Unmarshaler = (*GetExtendedACLResponse_Body)(nil)
|
|
||||||
)
|
|
||||||
|
|
||||||
// StableSize returns the size of x in protobuf format.
|
|
||||||
//
|
|
||||||
// Structures with the same field values have the same binary size.
|
|
||||||
func (x *GetExtendedACLResponse_Body) StableSize() (size int) {
|
|
||||||
if x == nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
size += proto.NestedStructureSize(1, x.Eacl)
|
|
||||||
size += proto.NestedStructureSize(2, x.Signature)
|
|
||||||
size += proto.NestedStructureSize(3, x.SessionToken)
|
|
||||||
return size
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
||||||
func (x *GetExtendedACLResponse_Body) MarshalProtobuf(dst []byte) []byte {
|
|
||||||
m := pool.MarshalerPool.Get()
|
|
||||||
defer pool.MarshalerPool.Put(m)
|
|
||||||
x.EmitProtobuf(m.MessageMarshaler())
|
|
||||||
dst = m.Marshal(dst)
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetExtendedACLResponse_Body) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
||||||
if x == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if x.Eacl != nil {
|
|
||||||
x.Eacl.EmitProtobuf(mm.AppendMessage(1))
|
|
||||||
}
|
|
||||||
if x.Signature != nil {
|
|
||||||
x.Signature.EmitProtobuf(mm.AppendMessage(2))
|
|
||||||
}
|
|
||||||
if x.SessionToken != nil {
|
|
||||||
x.SessionToken.EmitProtobuf(mm.AppendMessage(3))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
||||||
func (x *GetExtendedACLResponse_Body) UnmarshalProtobuf(src []byte) (err error) {
|
|
||||||
var fc easyproto.FieldContext
|
|
||||||
for len(src) > 0 {
|
|
||||||
src, err = fc.NextField(src)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("cannot read next field in %s", "GetExtendedACLResponse_Body")
|
|
||||||
}
|
|
||||||
switch fc.FieldNum {
|
|
||||||
case 1: // Eacl
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "Eacl")
|
|
||||||
}
|
|
||||||
x.Eacl = new(grpc2.EACLTable)
|
|
||||||
if err := x.Eacl.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
case 2: // Signature
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "Signature")
|
|
||||||
}
|
|
||||||
x.Signature = new(grpc.SignatureRFC6979)
|
|
||||||
if err := x.Signature.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
case 3: // SessionToken
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "SessionToken")
|
|
||||||
}
|
|
||||||
x.SessionToken = new(grpc1.SessionToken)
|
|
||||||
if err := x.SessionToken.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse_Body) GetEacl() *grpc2.EACLTable {
|
|
||||||
if x != nil {
|
|
||||||
return x.Eacl
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse_Body) SetEacl(v *grpc2.EACLTable) {
|
|
||||||
x.Eacl = v
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse_Body) GetSignature() *grpc.SignatureRFC6979 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Signature
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse_Body) SetSignature(v *grpc.SignatureRFC6979) {
|
|
||||||
x.Signature = v
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse_Body) GetSessionToken() *grpc1.SessionToken {
|
|
||||||
if x != nil {
|
|
||||||
return x.SessionToken
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse_Body) SetSessionToken(v *grpc1.SessionToken) {
|
|
||||||
x.SessionToken = v
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalJSON implements the json.Marshaler interface.
|
|
||||||
func (x *GetExtendedACLResponse_Body) MarshalJSON() ([]byte, error) {
|
|
||||||
w := jwriter.Writer{}
|
|
||||||
x.MarshalEasyJSON(&w)
|
|
||||||
return w.Buffer.BuildBytes(), w.Error
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse_Body) MarshalEasyJSON(out *jwriter.Writer) {
|
|
||||||
if x == nil {
|
|
||||||
out.RawString("null")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
out.RawByte('{')
|
|
||||||
{
|
|
||||||
const prefix string = ",\"eacl\":"
|
|
||||||
out.RawString(prefix[1:])
|
|
||||||
x.Eacl.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
const prefix string = ",\"signature\":"
|
|
||||||
out.RawString(prefix)
|
|
||||||
x.Signature.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
const prefix string = ",\"sessionToken\":"
|
|
||||||
out.RawString(prefix)
|
|
||||||
x.SessionToken.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
out.RawByte('}')
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
||||||
func (x *GetExtendedACLResponse_Body) UnmarshalJSON(data []byte) error {
|
|
||||||
r := jlexer.Lexer{Data: data}
|
|
||||||
x.UnmarshalEasyJSON(&r)
|
|
||||||
return r.Error()
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse_Body) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
||||||
isTopLevel := in.IsStart()
|
|
||||||
if in.IsNull() {
|
|
||||||
if isTopLevel {
|
|
||||||
in.Consumed()
|
|
||||||
}
|
|
||||||
in.Skip()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
in.Delim('{')
|
|
||||||
for !in.IsDelim('}') {
|
|
||||||
key := in.UnsafeFieldName(false)
|
|
||||||
in.WantColon()
|
|
||||||
if in.IsNull() {
|
|
||||||
in.Skip()
|
|
||||||
in.WantComma()
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
switch key {
|
|
||||||
case "eacl":
|
|
||||||
{
|
|
||||||
var f *grpc2.EACLTable
|
|
||||||
f = new(grpc2.EACLTable)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.Eacl = f
|
|
||||||
}
|
|
||||||
case "signature":
|
|
||||||
{
|
|
||||||
var f *grpc.SignatureRFC6979
|
|
||||||
f = new(grpc.SignatureRFC6979)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.Signature = f
|
|
||||||
}
|
|
||||||
case "sessionToken":
|
|
||||||
{
|
|
||||||
var f *grpc1.SessionToken
|
|
||||||
f = new(grpc1.SessionToken)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.SessionToken = f
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in.WantComma()
|
|
||||||
}
|
|
||||||
in.Delim('}')
|
|
||||||
if isTopLevel {
|
|
||||||
in.Consumed()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetExtendedACLResponse struct {
|
|
||||||
Body *GetExtendedACLResponse_Body `json:"body"`
|
|
||||||
MetaHeader *grpc1.ResponseMetaHeader `json:"metaHeader"`
|
|
||||||
VerifyHeader *grpc1.ResponseVerificationHeader `json:"verifyHeader"`
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
_ encoding.ProtoMarshaler = (*GetExtendedACLResponse)(nil)
|
|
||||||
_ encoding.ProtoUnmarshaler = (*GetExtendedACLResponse)(nil)
|
|
||||||
_ json.Marshaler = (*GetExtendedACLResponse)(nil)
|
|
||||||
_ json.Unmarshaler = (*GetExtendedACLResponse)(nil)
|
|
||||||
)
|
|
||||||
|
|
||||||
// StableSize returns the size of x in protobuf format.
|
|
||||||
//
|
|
||||||
// Structures with the same field values have the same binary size.
|
|
||||||
func (x *GetExtendedACLResponse) StableSize() (size int) {
|
|
||||||
if x == nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
size += proto.NestedStructureSize(1, x.Body)
|
|
||||||
size += proto.NestedStructureSize(2, x.MetaHeader)
|
|
||||||
size += proto.NestedStructureSize(3, x.VerifyHeader)
|
|
||||||
return size
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadSignedData fills buf with signed data of x.
|
|
||||||
// If buffer length is less than x.SignedDataSize(), new buffer is allocated.
|
|
||||||
//
|
|
||||||
// Returns any error encountered which did not allow writing the data completely.
|
|
||||||
// Otherwise, returns the buffer in which the data is written.
|
|
||||||
//
|
|
||||||
// Structures with the same field values have the same signed data.
|
|
||||||
func (x *GetExtendedACLResponse) SignedDataSize() int {
|
|
||||||
return x.GetBody().StableSize()
|
|
||||||
}
|
|
||||||
|
|
||||||
// SignedDataSize returns size of the request signed data in bytes.
|
|
||||||
//
|
|
||||||
// Structures with the same field values have the same signed data size.
|
|
||||||
func (x *GetExtendedACLResponse) ReadSignedData(buf []byte) ([]byte, error) {
|
|
||||||
return x.GetBody().MarshalProtobuf(buf), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalProtobuf implements the encoding.ProtoMarshaler interface.
|
|
||||||
func (x *GetExtendedACLResponse) MarshalProtobuf(dst []byte) []byte {
|
|
||||||
m := pool.MarshalerPool.Get()
|
|
||||||
defer pool.MarshalerPool.Put(m)
|
|
||||||
x.EmitProtobuf(m.MessageMarshaler())
|
|
||||||
dst = m.Marshal(dst)
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *GetExtendedACLResponse) EmitProtobuf(mm *easyproto.MessageMarshaler) {
|
|
||||||
if x == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if x.Body != nil {
|
|
||||||
x.Body.EmitProtobuf(mm.AppendMessage(1))
|
|
||||||
}
|
|
||||||
if x.MetaHeader != nil {
|
|
||||||
x.MetaHeader.EmitProtobuf(mm.AppendMessage(2))
|
|
||||||
}
|
|
||||||
if x.VerifyHeader != nil {
|
|
||||||
x.VerifyHeader.EmitProtobuf(mm.AppendMessage(3))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalProtobuf implements the encoding.ProtoUnmarshaler interface.
|
|
||||||
func (x *GetExtendedACLResponse) UnmarshalProtobuf(src []byte) (err error) {
|
|
||||||
var fc easyproto.FieldContext
|
|
||||||
for len(src) > 0 {
|
|
||||||
src, err = fc.NextField(src)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("cannot read next field in %s", "GetExtendedACLResponse")
|
|
||||||
}
|
|
||||||
switch fc.FieldNum {
|
|
||||||
case 1: // Body
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "Body")
|
|
||||||
}
|
|
||||||
x.Body = new(GetExtendedACLResponse_Body)
|
|
||||||
if err := x.Body.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
case 2: // MetaHeader
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "MetaHeader")
|
|
||||||
}
|
|
||||||
x.MetaHeader = new(grpc1.ResponseMetaHeader)
|
|
||||||
if err := x.MetaHeader.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
case 3: // VerifyHeader
|
|
||||||
data, ok := fc.MessageData()
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("cannot unmarshal field %s", "VerifyHeader")
|
|
||||||
}
|
|
||||||
x.VerifyHeader = new(grpc1.ResponseVerificationHeader)
|
|
||||||
if err := x.VerifyHeader.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return fmt.Errorf("unmarshal: %w", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse) GetBody() *GetExtendedACLResponse_Body {
|
|
||||||
if x != nil {
|
|
||||||
return x.Body
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse) SetBody(v *GetExtendedACLResponse_Body) {
|
|
||||||
x.Body = v
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse) GetMetaHeader() *grpc1.ResponseMetaHeader {
|
|
||||||
if x != nil {
|
|
||||||
return x.MetaHeader
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse) SetMetaHeader(v *grpc1.ResponseMetaHeader) {
|
|
||||||
x.MetaHeader = v
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse) GetVerifyHeader() *grpc1.ResponseVerificationHeader {
|
|
||||||
if x != nil {
|
|
||||||
return x.VerifyHeader
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse) SetVerifyHeader(v *grpc1.ResponseVerificationHeader) {
|
|
||||||
x.VerifyHeader = v
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalJSON implements the json.Marshaler interface.
|
|
||||||
func (x *GetExtendedACLResponse) MarshalJSON() ([]byte, error) {
|
|
||||||
w := jwriter.Writer{}
|
|
||||||
x.MarshalEasyJSON(&w)
|
|
||||||
return w.Buffer.BuildBytes(), w.Error
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse) MarshalEasyJSON(out *jwriter.Writer) {
|
|
||||||
if x == nil {
|
|
||||||
out.RawString("null")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
out.RawByte('{')
|
|
||||||
{
|
|
||||||
const prefix string = ",\"body\":"
|
|
||||||
out.RawString(prefix[1:])
|
|
||||||
x.Body.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
const prefix string = ",\"metaHeader\":"
|
|
||||||
out.RawString(prefix)
|
|
||||||
x.MetaHeader.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
{
|
|
||||||
const prefix string = ",\"verifyHeader\":"
|
|
||||||
out.RawString(prefix)
|
|
||||||
x.VerifyHeader.MarshalEasyJSON(out)
|
|
||||||
}
|
|
||||||
out.RawByte('}')
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalJSON implements the json.Unmarshaler interface.
|
|
||||||
func (x *GetExtendedACLResponse) UnmarshalJSON(data []byte) error {
|
|
||||||
r := jlexer.Lexer{Data: data}
|
|
||||||
x.UnmarshalEasyJSON(&r)
|
|
||||||
return r.Error()
|
|
||||||
}
|
|
||||||
func (x *GetExtendedACLResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|
||||||
isTopLevel := in.IsStart()
|
|
||||||
if in.IsNull() {
|
|
||||||
if isTopLevel {
|
|
||||||
in.Consumed()
|
|
||||||
}
|
|
||||||
in.Skip()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
in.Delim('{')
|
|
||||||
for !in.IsDelim('}') {
|
|
||||||
key := in.UnsafeFieldName(false)
|
|
||||||
in.WantColon()
|
|
||||||
if in.IsNull() {
|
|
||||||
in.Skip()
|
|
||||||
in.WantComma()
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
switch key {
|
|
||||||
case "body":
|
|
||||||
{
|
|
||||||
var f *GetExtendedACLResponse_Body
|
|
||||||
f = new(GetExtendedACLResponse_Body)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.Body = f
|
|
||||||
}
|
|
||||||
case "metaHeader":
|
|
||||||
{
|
|
||||||
var f *grpc1.ResponseMetaHeader
|
|
||||||
f = new(grpc1.ResponseMetaHeader)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.MetaHeader = f
|
|
||||||
}
|
|
||||||
case "verifyHeader":
|
|
||||||
{
|
|
||||||
var f *grpc1.ResponseVerificationHeader
|
|
||||||
f = new(grpc1.ResponseVerificationHeader)
|
|
||||||
f.UnmarshalEasyJSON(in)
|
|
||||||
x.VerifyHeader = f
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in.WantComma()
|
|
||||||
}
|
|
||||||
in.Delim('}')
|
|
||||||
if isTopLevel {
|
|
||||||
in.Consumed()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -157,41 +157,3 @@ func DoFuzzJSONListResponse(data []byte) int {
|
||||||
}
|
}
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
func DoFuzzProtoGetExtendedACLRequest(data []byte) int {
|
|
||||||
msg := new(GetExtendedACLRequest)
|
|
||||||
if err := msg.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
_ = msg.MarshalProtobuf(nil)
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
func DoFuzzJSONGetExtendedACLRequest(data []byte) int {
|
|
||||||
msg := new(GetExtendedACLRequest)
|
|
||||||
if err := msg.UnmarshalJSON(data); err != nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
_, err := msg.MarshalJSON()
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
func DoFuzzProtoGetExtendedACLResponse(data []byte) int {
|
|
||||||
msg := new(GetExtendedACLResponse)
|
|
||||||
if err := msg.UnmarshalProtobuf(data); err != nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
_ = msg.MarshalProtobuf(nil)
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
func DoFuzzJSONGetExtendedACLResponse(data []byte) int {
|
|
||||||
msg := new(GetExtendedACLResponse)
|
|
||||||
if err := msg.UnmarshalJSON(data); err != nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
_, err := msg.MarshalJSON()
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
|
@ -89,23 +89,3 @@ func FuzzJSONListResponse(f *testing.F) {
|
||||||
DoFuzzJSONListResponse(data)
|
DoFuzzJSONListResponse(data)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
func FuzzProtoGetExtendedACLRequest(f *testing.F) {
|
|
||||||
f.Fuzz(func(t *testing.T, data []byte) {
|
|
||||||
DoFuzzProtoGetExtendedACLRequest(data)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
func FuzzJSONGetExtendedACLRequest(f *testing.F) {
|
|
||||||
f.Fuzz(func(t *testing.T, data []byte) {
|
|
||||||
DoFuzzJSONGetExtendedACLRequest(data)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
func FuzzProtoGetExtendedACLResponse(f *testing.F) {
|
|
||||||
f.Fuzz(func(t *testing.T, data []byte) {
|
|
||||||
DoFuzzProtoGetExtendedACLResponse(data)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
func FuzzJSONGetExtendedACLResponse(f *testing.F) {
|
|
||||||
f.Fuzz(func(t *testing.T, data []byte) {
|
|
||||||
DoFuzzJSONGetExtendedACLResponse(data)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
71
container/grpc/service_grpc.pb.go
generated
71
container/grpc/service_grpc.pb.go
generated
|
@ -19,11 +19,10 @@ import (
|
||||||
const _ = grpc.SupportPackageIsVersion7
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ContainerService_Put_FullMethodName = "/neo.fs.v2.container.ContainerService/Put"
|
ContainerService_Put_FullMethodName = "/neo.fs.v2.container.ContainerService/Put"
|
||||||
ContainerService_Delete_FullMethodName = "/neo.fs.v2.container.ContainerService/Delete"
|
ContainerService_Delete_FullMethodName = "/neo.fs.v2.container.ContainerService/Delete"
|
||||||
ContainerService_Get_FullMethodName = "/neo.fs.v2.container.ContainerService/Get"
|
ContainerService_Get_FullMethodName = "/neo.fs.v2.container.ContainerService/Get"
|
||||||
ContainerService_List_FullMethodName = "/neo.fs.v2.container.ContainerService/List"
|
ContainerService_List_FullMethodName = "/neo.fs.v2.container.ContainerService/List"
|
||||||
ContainerService_GetExtendedACL_FullMethodName = "/neo.fs.v2.container.ContainerService/GetExtendedACL"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ContainerServiceClient is the client API for ContainerService service.
|
// ContainerServiceClient is the client API for ContainerService service.
|
||||||
|
@ -74,20 +73,6 @@ type ContainerServiceClient interface {
|
||||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||||
// container list access denied.
|
// container list access denied.
|
||||||
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
|
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
|
||||||
// Returns Extended ACL table and signature from `Container` smart contract
|
|
||||||
// storage.
|
|
||||||
//
|
|
||||||
// Statuses:
|
|
||||||
// - **OK** (0, SECTION_SUCCESS): \
|
|
||||||
// container eACL has been successfully read;
|
|
||||||
// - Common failures (SECTION_FAILURE_COMMON);
|
|
||||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
|
||||||
// container not found;
|
|
||||||
// - **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \
|
|
||||||
// eACL table not found;
|
|
||||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
|
||||||
// access to container eACL is denied.
|
|
||||||
GetExtendedACL(ctx context.Context, in *GetExtendedACLRequest, opts ...grpc.CallOption) (*GetExtendedACLResponse, error)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type containerServiceClient struct {
|
type containerServiceClient struct {
|
||||||
|
@ -134,15 +119,6 @@ func (c *containerServiceClient) List(ctx context.Context, in *ListRequest, opts
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *containerServiceClient) GetExtendedACL(ctx context.Context, in *GetExtendedACLRequest, opts ...grpc.CallOption) (*GetExtendedACLResponse, error) {
|
|
||||||
out := new(GetExtendedACLResponse)
|
|
||||||
err := c.cc.Invoke(ctx, ContainerService_GetExtendedACL_FullMethodName, in, out, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContainerServiceServer is the server API for ContainerService service.
|
// ContainerServiceServer is the server API for ContainerService service.
|
||||||
// All implementations should embed UnimplementedContainerServiceServer
|
// All implementations should embed UnimplementedContainerServiceServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
|
@ -191,20 +167,6 @@ type ContainerServiceServer interface {
|
||||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||||
// container list access denied.
|
// container list access denied.
|
||||||
List(context.Context, *ListRequest) (*ListResponse, error)
|
List(context.Context, *ListRequest) (*ListResponse, error)
|
||||||
// Returns Extended ACL table and signature from `Container` smart contract
|
|
||||||
// storage.
|
|
||||||
//
|
|
||||||
// Statuses:
|
|
||||||
// - **OK** (0, SECTION_SUCCESS): \
|
|
||||||
// container eACL has been successfully read;
|
|
||||||
// - Common failures (SECTION_FAILURE_COMMON);
|
|
||||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
|
||||||
// container not found;
|
|
||||||
// - **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \
|
|
||||||
// eACL table not found;
|
|
||||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
|
||||||
// access to container eACL is denied.
|
|
||||||
GetExtendedACL(context.Context, *GetExtendedACLRequest) (*GetExtendedACLResponse, error)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedContainerServiceServer should be embedded to have forward compatible implementations.
|
// UnimplementedContainerServiceServer should be embedded to have forward compatible implementations.
|
||||||
|
@ -223,9 +185,6 @@ func (UnimplementedContainerServiceServer) Get(context.Context, *GetRequest) (*G
|
||||||
func (UnimplementedContainerServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) {
|
func (UnimplementedContainerServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedContainerServiceServer) GetExtendedACL(context.Context, *GetExtendedACLRequest) (*GetExtendedACLResponse, error) {
|
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetExtendedACL not implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnsafeContainerServiceServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeContainerServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
// Use of this interface is not recommended, as added methods to ContainerServiceServer will
|
// Use of this interface is not recommended, as added methods to ContainerServiceServer will
|
||||||
|
@ -310,24 +269,6 @@ func _ContainerService_List_Handler(srv interface{}, ctx context.Context, dec fu
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _ContainerService_GetExtendedACL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
||||||
in := new(GetExtendedACLRequest)
|
|
||||||
if err := dec(in); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if interceptor == nil {
|
|
||||||
return srv.(ContainerServiceServer).GetExtendedACL(ctx, in)
|
|
||||||
}
|
|
||||||
info := &grpc.UnaryServerInfo{
|
|
||||||
Server: srv,
|
|
||||||
FullMethod: ContainerService_GetExtendedACL_FullMethodName,
|
|
||||||
}
|
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
||||||
return srv.(ContainerServiceServer).GetExtendedACL(ctx, req.(*GetExtendedACLRequest))
|
|
||||||
}
|
|
||||||
return interceptor(ctx, in, info, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContainerService_ServiceDesc is the grpc.ServiceDesc for ContainerService service.
|
// ContainerService_ServiceDesc is the grpc.ServiceDesc for ContainerService service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
@ -351,10 +292,6 @@ var ContainerService_ServiceDesc = grpc.ServiceDesc{
|
||||||
MethodName: "List",
|
MethodName: "List",
|
||||||
Handler: _ContainerService_List_Handler,
|
Handler: _ContainerService_List_Handler,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
MethodName: "GetExtendedACL",
|
|
||||||
Handler: _ContainerService_GetExtendedACL_Handler,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "container/grpc/service.proto",
|
Metadata: "container/grpc/service.proto",
|
||||||
|
|
|
@ -34,12 +34,6 @@ const (
|
||||||
listReqBodyOwnerField = 1
|
listReqBodyOwnerField = 1
|
||||||
|
|
||||||
listRespBodyIDsField = 1
|
listRespBodyIDsField = 1
|
||||||
|
|
||||||
getEACLReqBodyIDField = 1
|
|
||||||
|
|
||||||
getEACLRespBodyTableField = 1
|
|
||||||
getEACLRespBodySignatureField = 2
|
|
||||||
getEACLRespBodyTokenField = 3
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *Attribute) StableMarshal(buf []byte) []byte {
|
func (a *Attribute) StableMarshal(buf []byte) []byte {
|
||||||
|
@ -349,65 +343,3 @@ func (r *ListResponseBody) StableSize() (size int) {
|
||||||
func (r *ListResponseBody) Unmarshal(data []byte) error {
|
func (r *ListResponseBody) Unmarshal(data []byte) error {
|
||||||
return message.Unmarshal(r, data, new(container.ListResponse_Body))
|
return message.Unmarshal(r, data, new(container.ListResponse_Body))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *GetExtendedACLRequestBody) StableMarshal(buf []byte) []byte {
|
|
||||||
if r == nil {
|
|
||||||
return []byte{}
|
|
||||||
}
|
|
||||||
|
|
||||||
if buf == nil {
|
|
||||||
buf = make([]byte, r.StableSize())
|
|
||||||
}
|
|
||||||
|
|
||||||
protoutil.NestedStructureMarshal(getEACLReqBodyIDField, buf, r.cid)
|
|
||||||
|
|
||||||
return buf
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLRequestBody) StableSize() (size int) {
|
|
||||||
if r == nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
size += protoutil.NestedStructureSize(getEACLReqBodyIDField, r.cid)
|
|
||||||
|
|
||||||
return size
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLRequestBody) Unmarshal(data []byte) error {
|
|
||||||
return message.Unmarshal(r, data, new(container.GetExtendedACLRequest_Body))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponseBody) StableMarshal(buf []byte) []byte {
|
|
||||||
if r == nil {
|
|
||||||
return []byte{}
|
|
||||||
}
|
|
||||||
|
|
||||||
if buf == nil {
|
|
||||||
buf = make([]byte, r.StableSize())
|
|
||||||
}
|
|
||||||
|
|
||||||
var offset int
|
|
||||||
|
|
||||||
offset += protoutil.NestedStructureMarshal(getEACLRespBodyTableField, buf[offset:], r.eacl)
|
|
||||||
offset += protoutil.NestedStructureMarshal(getEACLRespBodySignatureField, buf[offset:], r.sig)
|
|
||||||
protoutil.NestedStructureMarshal(getEACLRespBodyTokenField, buf[offset:], r.token)
|
|
||||||
|
|
||||||
return buf
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponseBody) StableSize() (size int) {
|
|
||||||
if r == nil {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
size += protoutil.NestedStructureSize(getEACLRespBodyTableField, r.eacl)
|
|
||||||
size += protoutil.NestedStructureSize(getEACLRespBodySignatureField, r.sig)
|
|
||||||
size += protoutil.NestedStructureSize(getEACLRespBodyTokenField, r.token)
|
|
||||||
|
|
||||||
return size
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponseBody) Unmarshal(data []byte) error {
|
|
||||||
return message.Unmarshal(r, data, new(container.GetExtendedACLResponse_Body))
|
|
||||||
}
|
|
||||||
|
|
|
@ -32,9 +32,5 @@ func TestMessageConvert(t *testing.T) {
|
||||||
func(empty bool) message.Message { return containertest.GenerateGetRequest(empty) },
|
func(empty bool) message.Message { return containertest.GenerateGetRequest(empty) },
|
||||||
func(empty bool) message.Message { return containertest.GenerateGetResponseBody(empty) },
|
func(empty bool) message.Message { return containertest.GenerateGetResponseBody(empty) },
|
||||||
func(empty bool) message.Message { return containertest.GenerateGetResponse(empty) },
|
func(empty bool) message.Message { return containertest.GenerateGetResponse(empty) },
|
||||||
func(empty bool) message.Message { return containertest.GenerateGetExtendedACLRequestBody(empty) },
|
|
||||||
func(empty bool) message.Message { return containertest.GenerateGetExtendedACLRequest(empty) },
|
|
||||||
func(empty bool) message.Message { return containertest.GenerateGetExtendedACLResponseBody(empty) },
|
|
||||||
func(empty bool) message.Message { return containertest.GenerateGetExtendedACLResponse(empty) },
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package containertest
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
|
|
||||||
acltest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/test"
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container"
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container"
|
||||||
netmaptest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/test"
|
netmaptest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/test"
|
||||||
refstest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
|
refstest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
|
||||||
|
@ -239,52 +238,3 @@ func GenerateListResponse(empty bool) *container.ListResponse {
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
func GenerateGetExtendedACLRequestBody(empty bool) *container.GetExtendedACLRequestBody {
|
|
||||||
m := new(container.GetExtendedACLRequestBody)
|
|
||||||
|
|
||||||
if !empty {
|
|
||||||
m.SetContainerID(refstest.GenerateContainerID(false))
|
|
||||||
}
|
|
||||||
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|
||||||
func GenerateGetExtendedACLRequest(empty bool) *container.GetExtendedACLRequest {
|
|
||||||
m := new(container.GetExtendedACLRequest)
|
|
||||||
|
|
||||||
if !empty {
|
|
||||||
m.SetBody(GenerateGetExtendedACLRequestBody(false))
|
|
||||||
}
|
|
||||||
|
|
||||||
m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty))
|
|
||||||
m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty))
|
|
||||||
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|
||||||
func GenerateGetExtendedACLResponseBody(empty bool) *container.GetExtendedACLResponseBody {
|
|
||||||
m := new(container.GetExtendedACLResponseBody)
|
|
||||||
|
|
||||||
if !empty {
|
|
||||||
m.SetEACL(acltest.GenerateTable(false))
|
|
||||||
}
|
|
||||||
|
|
||||||
m.SetSignature(refstest.GenerateSignature(empty))
|
|
||||||
m.SetSessionToken(sessiontest.GenerateSessionToken(empty))
|
|
||||||
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|
||||||
func GenerateGetExtendedACLResponse(empty bool) *container.GetExtendedACLResponse {
|
|
||||||
m := new(container.GetExtendedACLResponse)
|
|
||||||
|
|
||||||
if !empty {
|
|
||||||
m.SetBody(GenerateGetExtendedACLResponseBody(false))
|
|
||||||
}
|
|
||||||
|
|
||||||
m.SetMetaHeader(sessiontest.GenerateResponseMetaHeader(empty))
|
|
||||||
m.SetVerificationHeader(sessiontest.GenerateResponseVerificationHeader(empty))
|
|
||||||
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package container
|
package container
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl"
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
|
||||||
|
@ -110,30 +109,6 @@ type ListResponse struct {
|
||||||
session.ResponseHeaders
|
session.ResponseHeaders
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetExtendedACLRequestBody struct {
|
|
||||||
cid *refs.ContainerID
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetExtendedACLRequest struct {
|
|
||||||
body *GetExtendedACLRequestBody
|
|
||||||
|
|
||||||
session.RequestHeaders
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetExtendedACLResponseBody struct {
|
|
||||||
eacl *acl.Table
|
|
||||||
|
|
||||||
sig *refs.Signature
|
|
||||||
|
|
||||||
token *session.Token
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetExtendedACLResponse struct {
|
|
||||||
body *GetExtendedACLResponseBody
|
|
||||||
|
|
||||||
session.ResponseHeaders
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *Attribute) GetKey() string {
|
func (a *Attribute) GetKey() string {
|
||||||
if a != nil {
|
if a != nil {
|
||||||
return a.key
|
return a.key
|
||||||
|
@ -469,81 +444,3 @@ func (r *ListResponse) GetBody() *ListResponseBody {
|
||||||
func (r *ListResponse) SetBody(v *ListResponseBody) {
|
func (r *ListResponse) SetBody(v *ListResponseBody) {
|
||||||
r.body = v
|
r.body = v
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *GetExtendedACLRequestBody) GetContainerID() *refs.ContainerID {
|
|
||||||
if r != nil {
|
|
||||||
return r.cid
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLRequestBody) SetContainerID(v *refs.ContainerID) {
|
|
||||||
r.cid = v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLRequest) GetBody() *GetExtendedACLRequestBody {
|
|
||||||
if r != nil {
|
|
||||||
return r.body
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLRequest) SetBody(v *GetExtendedACLRequestBody) {
|
|
||||||
r.body = v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponseBody) GetEACL() *acl.Table {
|
|
||||||
if r != nil {
|
|
||||||
return r.eacl
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponseBody) SetEACL(v *acl.Table) {
|
|
||||||
r.eacl = v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponseBody) GetSignature() *refs.Signature {
|
|
||||||
if r != nil {
|
|
||||||
return r.sig
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponseBody) SetSignature(v *refs.Signature) {
|
|
||||||
// TODO: (neofs-api-go#381) avoid this hack (e.g. create refs.SignatureRFC6979 type)
|
|
||||||
v.SetScheme(0)
|
|
||||||
r.sig = v
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetSessionToken returns token of the session within which requested
|
|
||||||
// eACL table was set.
|
|
||||||
func (r *GetExtendedACLResponseBody) GetSessionToken() *session.Token {
|
|
||||||
if r != nil {
|
|
||||||
return r.token
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetSessionToken sets token of the session within which requested
|
|
||||||
// eACL table was set.
|
|
||||||
func (r *GetExtendedACLResponseBody) SetSessionToken(v *session.Token) {
|
|
||||||
r.token = v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponse) GetBody() *GetExtendedACLResponseBody {
|
|
||||||
if r != nil {
|
|
||||||
return r.body
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *GetExtendedACLResponse) SetBody(v *GetExtendedACLResponseBody) {
|
|
||||||
r.body = v
|
|
||||||
}
|
|
||||||
|
|
|
@ -80,19 +80,3 @@ func ListContainers(
|
||||||
|
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetEACL executes ContainerService.GetExtendedACL RPC.
|
|
||||||
func GetEACL(
|
|
||||||
cli *client.Client,
|
|
||||||
req *container.GetExtendedACLRequest,
|
|
||||||
opts ...client.CallOption,
|
|
||||||
) (*container.GetExtendedACLResponse, error) {
|
|
||||||
resp := new(container.GetExtendedACLResponse)
|
|
||||||
|
|
||||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceContainer, rpcContainerGetEACL), req, resp, opts...)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return resp, nil
|
|
||||||
}
|
|
||||||
|
|
|
@ -46,10 +46,6 @@ func serviceMessageBody(req any) stableMarshaler {
|
||||||
return v.GetBody()
|
return v.GetBody()
|
||||||
case *container.ListResponse:
|
case *container.ListResponse:
|
||||||
return v.GetBody()
|
return v.GetBody()
|
||||||
case *container.GetExtendedACLRequest:
|
|
||||||
return v.GetBody()
|
|
||||||
case *container.GetExtendedACLResponse:
|
|
||||||
return v.GetBody()
|
|
||||||
|
|
||||||
/* Object */
|
/* Object */
|
||||||
case *object.PutRequest:
|
case *object.PutRequest:
|
||||||
|
|
Loading…
Add table
Reference in a new issue