diff --git a/accounting/grpc/service.pb.go b/accounting/grpc/service.pb.go index fe193cd..b66bb7a 100644 Binary files a/accounting/grpc/service.pb.go and b/accounting/grpc/service.pb.go differ diff --git a/accounting/grpc/service_grpc.pb.go b/accounting/grpc/service_grpc.pb.go index cd1b2e9..63207fe 100644 Binary files a/accounting/grpc/service_grpc.pb.go and b/accounting/grpc/service_grpc.pb.go differ diff --git a/accounting/grpc/types.pb.go b/accounting/grpc/types.pb.go index 592aa8b..8be14bc 100644 Binary files a/accounting/grpc/types.pb.go and b/accounting/grpc/types.pb.go differ diff --git a/acl/grpc/types.pb.go b/acl/grpc/types.pb.go index aec449c..39ab1e1 100644 Binary files a/acl/grpc/types.pb.go and b/acl/grpc/types.pb.go differ diff --git a/ape/grpc/types.pb.go b/ape/grpc/types.pb.go index 1da2110..ee8e0a7 100644 Binary files a/ape/grpc/types.pb.go and b/ape/grpc/types.pb.go differ diff --git a/apemanager/grpc/service.pb.go b/apemanager/grpc/service.pb.go index 7757aad..3baf193 100644 Binary files a/apemanager/grpc/service.pb.go and b/apemanager/grpc/service.pb.go differ diff --git a/apemanager/grpc/service_grpc.pb.go b/apemanager/grpc/service_grpc.pb.go index 484fec5..4781427 100644 Binary files a/apemanager/grpc/service_grpc.pb.go and b/apemanager/grpc/service_grpc.pb.go differ diff --git a/container/convert.go b/container/convert.go index 0753755..c5f9cd7 100644 --- a/container/convert.go +++ b/container/convert.go @@ -767,151 +767,6 @@ func (r *ListResponse) FromGRPCMessage(m grpc.Message) error { return r.ResponseHeaders.FromMessage(v) } -func (r *SetExtendedACLRequestBody) ToGRPCMessage() grpc.Message { - var m *container.SetExtendedACLRequest_Body - - if r != nil { - m = new(container.SetExtendedACLRequest_Body) - - m.SetEacl(r.eacl.ToGRPCMessage().(*aclGRPC.EACLTable)) - m.SetSignature(toSignatureRFC6979(r.sig)) - } - - return m -} - -func (r *SetExtendedACLRequestBody) FromGRPCMessage(m grpc.Message) error { - v, ok := m.(*container.SetExtendedACLRequest_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()) - } - - return err -} - -func (r *SetExtendedACLRequest) ToGRPCMessage() grpc.Message { - var m *container.SetExtendedACLRequest - - if r != nil { - m = new(container.SetExtendedACLRequest) - - m.SetBody(r.body.ToGRPCMessage().(*container.SetExtendedACLRequest_Body)) - r.RequestHeaders.ToMessage(m) - } - - return m -} - -func (r *SetExtendedACLRequest) FromGRPCMessage(m grpc.Message) error { - v, ok := m.(*container.SetExtendedACLRequest) - 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(SetExtendedACLRequestBody) - } - - err = r.body.FromGRPCMessage(body) - if err != nil { - return err - } - } - - return r.RequestHeaders.FromMessage(v) -} - -func (r *SetExtendedACLResponseBody) ToGRPCMessage() grpc.Message { - var m *container.SetExtendedACLResponse_Body - - if r != nil { - m = new(container.SetExtendedACLResponse_Body) - } - - return m -} - -func (r *SetExtendedACLResponseBody) FromGRPCMessage(m grpc.Message) error { - v, ok := m.(*container.SetExtendedACLResponse_Body) - if !ok { - return message.NewUnexpectedMessageType(m, v) - } - - return nil -} - -func (r *SetExtendedACLResponse) ToGRPCMessage() grpc.Message { - var m *container.SetExtendedACLResponse - - if r != nil { - m = new(container.SetExtendedACLResponse) - - m.SetBody(r.body.ToGRPCMessage().(*container.SetExtendedACLResponse_Body)) - r.ResponseHeaders.ToMessage(m) - } - - return m -} - -func (r *SetExtendedACLResponse) FromGRPCMessage(m grpc.Message) error { - v, ok := m.(*container.SetExtendedACLResponse) - 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(SetExtendedACLResponseBody) - } - - err = r.body.FromGRPCMessage(body) - if err != nil { - return err - } - } - - return r.ResponseHeaders.FromMessage(v) -} - func (r *GetExtendedACLRequestBody) ToGRPCMessage() grpc.Message { var m *container.GetExtendedACLRequest_Body @@ -1083,198 +938,3 @@ func (r *GetExtendedACLResponse) FromGRPCMessage(m grpc.Message) error { return r.ResponseHeaders.FromMessage(v) } - -func (a *UsedSpaceAnnouncement) ToGRPCMessage() grpc.Message { - var m *container.AnnounceUsedSpaceRequest_Body_Announcement - - if a != nil { - m = new(container.AnnounceUsedSpaceRequest_Body_Announcement) - - m.SetContainerId(a.cid.ToGRPCMessage().(*refsGRPC.ContainerID)) - m.SetEpoch(a.epoch) - m.SetUsedSpace(a.usedSpace) - } - - return m -} - -func (a *UsedSpaceAnnouncement) FromGRPCMessage(m grpc.Message) error { - v, ok := m.(*container.AnnounceUsedSpaceRequest_Body_Announcement) - if !ok { - return message.NewUnexpectedMessageType(m, v) - } - - var err error - - cid := v.GetContainerId() - if cid == nil { - a.cid = nil - } else { - if a.cid == nil { - a.cid = new(refs.ContainerID) - } - - err = a.cid.FromGRPCMessage(cid) - if err != nil { - return err - } - } - - a.epoch = v.GetEpoch() - a.usedSpace = v.GetUsedSpace() - - return nil -} - -func UsedSpaceAnnouncementsToGRPCMessage( - ids []UsedSpaceAnnouncement, -) (res []*container.AnnounceUsedSpaceRequest_Body_Announcement) { - if ids != nil { - res = make([]*container.AnnounceUsedSpaceRequest_Body_Announcement, 0, len(ids)) - - for i := range ids { - res = append(res, ids[i].ToGRPCMessage().(*container.AnnounceUsedSpaceRequest_Body_Announcement)) - } - } - - return -} - -func UsedSpaceAnnouncementssFromGRPCMessage( - asV2 []*container.AnnounceUsedSpaceRequest_Body_Announcement, -) (res []UsedSpaceAnnouncement, err error) { - if asV2 != nil { - res = make([]UsedSpaceAnnouncement, len(asV2)) - - for i := range asV2 { - if asV2[i] != nil { - err = res[i].FromGRPCMessage(asV2[i]) - if err != nil { - return - } - } - } - } - - return -} - -func (r *AnnounceUsedSpaceRequestBody) ToGRPCMessage() grpc.Message { - var m *container.AnnounceUsedSpaceRequest_Body - - if r != nil { - m = new(container.AnnounceUsedSpaceRequest_Body) - - m.SetAnnouncements(UsedSpaceAnnouncementsToGRPCMessage(r.announcements)) - } - - return m -} - -func (r *AnnounceUsedSpaceRequestBody) FromGRPCMessage(m grpc.Message) error { - v, ok := m.(*container.AnnounceUsedSpaceRequest_Body) - if !ok { - return message.NewUnexpectedMessageType(m, v) - } - - var err error - - r.announcements, err = UsedSpaceAnnouncementssFromGRPCMessage(v.GetAnnouncements()) - - return err -} - -func (r *AnnounceUsedSpaceRequest) ToGRPCMessage() grpc.Message { - var m *container.AnnounceUsedSpaceRequest - - if r != nil { - m = new(container.AnnounceUsedSpaceRequest) - - m.SetBody(r.body.ToGRPCMessage().(*container.AnnounceUsedSpaceRequest_Body)) - r.RequestHeaders.ToMessage(m) - } - - return m -} - -func (r *AnnounceUsedSpaceRequest) FromGRPCMessage(m grpc.Message) error { - v, ok := m.(*container.AnnounceUsedSpaceRequest) - 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(AnnounceUsedSpaceRequestBody) - } - - err = r.body.FromGRPCMessage(body) - if err != nil { - return err - } - } - - return r.RequestHeaders.FromMessage(v) -} - -func (r *AnnounceUsedSpaceResponseBody) ToGRPCMessage() grpc.Message { - var m *container.AnnounceUsedSpaceResponse_Body - - if r != nil { - m = new(container.AnnounceUsedSpaceResponse_Body) - } - - return m -} - -func (r *AnnounceUsedSpaceResponseBody) FromGRPCMessage(m grpc.Message) error { - v, ok := m.(*container.AnnounceUsedSpaceResponse_Body) - if !ok { - return message.NewUnexpectedMessageType(m, v) - } - - return nil -} - -func (r *AnnounceUsedSpaceResponse) ToGRPCMessage() grpc.Message { - var m *container.AnnounceUsedSpaceResponse - - if r != nil { - m = new(container.AnnounceUsedSpaceResponse) - - m.SetBody(r.body.ToGRPCMessage().(*container.AnnounceUsedSpaceResponse_Body)) - r.ResponseHeaders.ToMessage(m) - } - - return m -} - -func (r *AnnounceUsedSpaceResponse) FromGRPCMessage(m grpc.Message) error { - v, ok := m.(*container.AnnounceUsedSpaceResponse) - 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(AnnounceUsedSpaceResponseBody) - } - - err = r.body.FromGRPCMessage(body) - if err != nil { - return err - } - } - - return r.ResponseHeaders.FromMessage(v) -} diff --git a/container/grpc/service.go b/container/grpc/service.go index 050cf0b..d19add1 100644 --- a/container/grpc/service.go +++ b/container/grpc/service.go @@ -182,46 +182,6 @@ func (m *ListResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) { m.VerifyHeader = v } -// SetEacl sets eACL table structure. -func (m *SetExtendedACLRequest_Body) SetEacl(v *acl.EACLTable) { - m.Eacl = v -} - -// SetSignature sets signature of the eACL table structure. -func (m *SetExtendedACLRequest_Body) SetSignature(v *refs.SignatureRFC6979) { - m.Signature = v -} - -// SetBody sets body of the request. -func (m *SetExtendedACLRequest) SetBody(v *SetExtendedACLRequest_Body) { - m.Body = v -} - -// SetMetaHeader sets meta header of the request. -func (m *SetExtendedACLRequest) SetMetaHeader(v *session.RequestMetaHeader) { - m.MetaHeader = v -} - -// SetVerifyHeader sets verification header of the request. -func (m *SetExtendedACLRequest) SetVerifyHeader(v *session.RequestVerificationHeader) { - m.VerifyHeader = v -} - -// SetBody sets body of the response. -func (m *SetExtendedACLResponse) SetBody(v *SetExtendedACLResponse_Body) { - m.Body = v -} - -// SetMetaHeader sets meta header of the response. -func (m *SetExtendedACLResponse) SetMetaHeader(v *session.ResponseMetaHeader) { - m.MetaHeader = v -} - -// SetVerifyHeader sets verification header of the response. -func (m *SetExtendedACLResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) { - m.VerifyHeader = v -} - // SetContainerId sets identifier of the container. func (m *GetExtendedACLRequest_Body) SetContainerId(v *refs.ContainerID) { m.ContainerId = v @@ -272,53 +232,3 @@ func (m *GetExtendedACLResponse) SetMetaHeader(v *session.ResponseMetaHeader) { func (m *GetExtendedACLResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) { m.VerifyHeader = v } - -// SetEpoch sets epoch of the size estimation. -func (m *AnnounceUsedSpaceRequest_Body_Announcement) SetEpoch(v uint64) { - m.Epoch = v -} - -// SetContainerId sets identifier of the container. -func (m *AnnounceUsedSpaceRequest_Body_Announcement) SetContainerId(v *refs.ContainerID) { - m.ContainerId = v -} - -// SetUsedSpace sets used space value of the container. -func (m *AnnounceUsedSpaceRequest_Body_Announcement) SetUsedSpace(v uint64) { - m.UsedSpace = v -} - -// SetAnnouncements sets list of announcement for shared containers between nodes. -func (m *AnnounceUsedSpaceRequest_Body) SetAnnouncements(v []*AnnounceUsedSpaceRequest_Body_Announcement) { - m.Announcements = v -} - -// SetBody sets body of the request. -func (m *AnnounceUsedSpaceRequest) SetBody(v *AnnounceUsedSpaceRequest_Body) { - m.Body = v -} - -// SetMetaHeader sets meta header of the request. -func (m *AnnounceUsedSpaceRequest) SetMetaHeader(v *session.RequestMetaHeader) { - m.MetaHeader = v -} - -// SetVerifyHeader sets verification header of the request. -func (m *AnnounceUsedSpaceRequest) SetVerifyHeader(v *session.RequestVerificationHeader) { - m.VerifyHeader = v -} - -// SetBody sets body of the response. -func (m *AnnounceUsedSpaceResponse) SetBody(v *AnnounceUsedSpaceResponse_Body) { - m.Body = v -} - -// SetMetaHeader sets meta header of the response. -func (m *AnnounceUsedSpaceResponse) SetMetaHeader(v *session.ResponseMetaHeader) { - m.MetaHeader = v -} - -// SetVerifyHeader sets verification header of the response. -func (m *AnnounceUsedSpaceResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) { - m.VerifyHeader = v -} diff --git a/container/grpc/service.pb.go b/container/grpc/service.pb.go index 672e29f..3bf1e14 100644 Binary files a/container/grpc/service.pb.go and b/container/grpc/service.pb.go differ diff --git a/container/grpc/service_grpc.pb.go b/container/grpc/service_grpc.pb.go index 6ae8ade..939a978 100644 Binary files a/container/grpc/service_grpc.pb.go and b/container/grpc/service_grpc.pb.go differ diff --git a/container/grpc/types.pb.go b/container/grpc/types.pb.go index c484a0d..d0e19ec 100644 Binary files a/container/grpc/types.pb.go and b/container/grpc/types.pb.go differ diff --git a/container/marshal.go b/container/marshal.go index a7c57aa..ff17150 100644 --- a/container/marshal.go +++ b/container/marshal.go @@ -35,20 +35,11 @@ const ( listRespBodyIDsField = 1 - setEACLReqBodyTableField = 1 - setEACLReqBodySignatureField = 2 - getEACLReqBodyIDField = 1 getEACLRespBodyTableField = 1 getEACLRespBodySignatureField = 2 getEACLRespBodyTokenField = 3 - - usedSpaceAnnounceEpochField = 1 - usedSpaceAnnounceCIDField = 2 - usedSpaceAnnounceUsedSpaceField = 3 - - usedSpaceReqBodyAnnouncementsField = 1 ) func (a *Attribute) StableMarshal(buf []byte) []byte { @@ -359,50 +350,6 @@ func (r *ListResponseBody) Unmarshal(data []byte) error { return message.Unmarshal(r, data, new(container.ListResponse_Body)) } -func (r *SetExtendedACLRequestBody) StableMarshal(buf []byte) []byte { - if r == nil { - return []byte{} - } - - if buf == nil { - buf = make([]byte, r.StableSize()) - } - - var offset int - - offset += protoutil.NestedStructureMarshal(setEACLReqBodyTableField, buf[offset:], r.eacl) - protoutil.NestedStructureMarshal(setEACLReqBodySignatureField, buf[offset:], r.sig) - - return buf -} - -func (r *SetExtendedACLRequestBody) StableSize() (size int) { - if r == nil { - return 0 - } - - size += protoutil.NestedStructureSize(setEACLReqBodyTableField, r.eacl) - size += protoutil.NestedStructureSize(setEACLReqBodySignatureField, r.sig) - - return size -} - -func (r *SetExtendedACLRequestBody) Unmarshal(data []byte) error { - return message.Unmarshal(r, data, new(container.SetExtendedACLRequest_Body)) -} - -func (r *SetExtendedACLResponseBody) StableMarshal(_ []byte) []byte { - return nil -} - -func (r *SetExtendedACLResponseBody) StableSize() (size int) { - return 0 -} - -func (r *SetExtendedACLResponseBody) Unmarshal([]byte) error { - return nil -} - func (r *GetExtendedACLRequestBody) StableMarshal(buf []byte) []byte { if r == nil { return []byte{} @@ -464,83 +411,3 @@ func (r *GetExtendedACLResponseBody) StableSize() (size int) { func (r *GetExtendedACLResponseBody) Unmarshal(data []byte) error { return message.Unmarshal(r, data, new(container.GetExtendedACLResponse_Body)) } - -func (a *UsedSpaceAnnouncement) StableMarshal(buf []byte) []byte { - if a == nil { - return []byte{} - } - - if buf == nil { - buf = make([]byte, a.StableSize()) - } - - var offset int - - offset += protoutil.UInt64Marshal(usedSpaceAnnounceEpochField, buf[offset:], a.epoch) - offset += protoutil.NestedStructureMarshal(usedSpaceAnnounceCIDField, buf[offset:], a.cid) - protoutil.UInt64Marshal(usedSpaceAnnounceUsedSpaceField, buf[offset:], a.usedSpace) - - return buf -} - -func (a *UsedSpaceAnnouncement) StableSize() (size int) { - if a == nil { - return 0 - } - - size += protoutil.UInt64Size(usedSpaceAnnounceEpochField, a.epoch) - size += protoutil.NestedStructureSize(usedSpaceAnnounceCIDField, a.cid) - size += protoutil.UInt64Size(usedSpaceAnnounceUsedSpaceField, a.usedSpace) - - return size -} - -func (a *UsedSpaceAnnouncement) Unmarshal(data []byte) error { - return message.Unmarshal(a, data, new(container.AnnounceUsedSpaceRequest_Body_Announcement)) -} - -func (r *AnnounceUsedSpaceRequestBody) StableMarshal(buf []byte) []byte { - if r == nil { - return []byte{} - } - - if buf == nil { - buf = make([]byte, r.StableSize()) - } - - var offset int - - for i := range r.announcements { - offset += protoutil.NestedStructureMarshal(usedSpaceReqBodyAnnouncementsField, buf[offset:], &r.announcements[i]) - } - - return buf -} - -func (r *AnnounceUsedSpaceRequestBody) StableSize() (size int) { - if r == nil { - return 0 - } - - for i := range r.announcements { - size += protoutil.NestedStructureSize(usedSpaceReqBodyAnnouncementsField, &r.announcements[i]) - } - - return size -} - -func (r *AnnounceUsedSpaceRequestBody) Unmarshal(data []byte) error { - return message.Unmarshal(r, data, new(container.AnnounceUsedSpaceRequest_Body)) -} - -func (r *AnnounceUsedSpaceResponseBody) StableMarshal(_ []byte) []byte { - return nil -} - -func (r *AnnounceUsedSpaceResponseBody) StableSize() (size int) { - return 0 -} - -func (r *AnnounceUsedSpaceResponseBody) Unmarshal([]byte) error { - return nil -} diff --git a/container/message_test.go b/container/message_test.go index 869ccb2..6558e25 100644 --- a/container/message_test.go +++ b/container/message_test.go @@ -28,8 +28,6 @@ func TestMessageConvert(t *testing.T) { func(empty bool) message.Message { return containertest.GenerateListRequest(empty) }, func(empty bool) message.Message { return containertest.GenerateListResponseBody(empty) }, func(empty bool) message.Message { return containertest.GenerateListResponse(empty) }, - func(empty bool) message.Message { return containertest.GenerateSetExtendedACLRequestBody(empty) }, - func(empty bool) message.Message { return containertest.GenerateSetExtendedACLRequest(empty) }, func(empty bool) message.Message { return containertest.GenerateGetRequestBody(empty) }, func(empty bool) message.Message { return containertest.GenerateGetRequest(empty) }, func(empty bool) message.Message { return containertest.GenerateGetResponseBody(empty) }, @@ -38,10 +36,5 @@ func TestMessageConvert(t *testing.T) { 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) }, - func(empty bool) message.Message { return containertest.GenerateUsedSpaceAnnouncement(empty) }, - func(empty bool) message.Message { return containertest.GenerateAnnounceUsedSpaceRequestBody(empty) }, - func(empty bool) message.Message { return containertest.GenerateAnnounceUsedSpaceRequest(empty) }, - func(empty bool) message.Message { return containertest.GenerateAnnounceUsedSpaceResponseBody(empty) }, - func(empty bool) message.Message { return containertest.GenerateAnnounceUsedSpaceResponse(empty) }, ) } diff --git a/container/test/generate.go b/container/test/generate.go index 2b2afdf..b94347b 100644 --- a/container/test/generate.go +++ b/container/test/generate.go @@ -235,50 +235,6 @@ func GenerateListResponse(empty bool) *container.ListResponse { return m } -func GenerateSetExtendedACLRequestBody(empty bool) *container.SetExtendedACLRequestBody { - m := new(container.SetExtendedACLRequestBody) - - if !empty { - m.SetEACL(acltest.GenerateTable(false)) - } - - m.SetSignature(refstest.GenerateSignature(empty)) - - return m -} - -func GenerateSetExtendedACLRequest(empty bool) *container.SetExtendedACLRequest { - m := new(container.SetExtendedACLRequest) - - if !empty { - m.SetBody(GenerateSetExtendedACLRequestBody(false)) - } - - m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty)) - m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty)) - - return m -} - -func GenerateSetExtendedACLResponseBody(_ bool) *container.SetExtendedACLResponseBody { - m := new(container.SetExtendedACLResponseBody) - - return m -} - -func GenerateSetExtendedACLResponse(empty bool) *container.SetExtendedACLResponse { - m := new(container.SetExtendedACLResponse) - - if !empty { - m.SetBody(GenerateSetExtendedACLResponseBody(false)) - } - - m.SetMetaHeader(sessiontest.GenerateResponseMetaHeader(empty)) - m.SetVerificationHeader(sessiontest.GenerateResponseVerificationHeader(empty)) - - return m -} - func GenerateGetExtendedACLRequestBody(empty bool) *container.GetExtendedACLRequestBody { m := new(container.GetExtendedACLRequestBody) @@ -327,70 +283,3 @@ func GenerateGetExtendedACLResponse(empty bool) *container.GetExtendedACLRespons return m } - -func GenerateUsedSpaceAnnouncement(empty bool) *container.UsedSpaceAnnouncement { - m := new(container.UsedSpaceAnnouncement) - - if !empty { - m.SetContainerID(refstest.GenerateContainerID(false)) - m.SetEpoch(1) - m.SetUsedSpace(2) - } - - return m -} - -func GenerateUsedSpaceAnnouncements(empty bool) []container.UsedSpaceAnnouncement { - var res []container.UsedSpaceAnnouncement - - if !empty { - res = append(res, - *GenerateUsedSpaceAnnouncement(false), - *GenerateUsedSpaceAnnouncement(false), - ) - } - - return res -} - -func GenerateAnnounceUsedSpaceRequestBody(empty bool) *container.AnnounceUsedSpaceRequestBody { - m := new(container.AnnounceUsedSpaceRequestBody) - - if !empty { - m.SetAnnouncements(GenerateUsedSpaceAnnouncements(false)) - } - - return m -} - -func GenerateAnnounceUsedSpaceRequest(empty bool) *container.AnnounceUsedSpaceRequest { - m := new(container.AnnounceUsedSpaceRequest) - - if !empty { - m.SetBody(GenerateAnnounceUsedSpaceRequestBody(false)) - } - - m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty)) - m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty)) - - return m -} - -func GenerateAnnounceUsedSpaceResponseBody(_ bool) *container.AnnounceUsedSpaceResponseBody { - m := new(container.AnnounceUsedSpaceResponseBody) - - return m -} - -func GenerateAnnounceUsedSpaceResponse(empty bool) *container.AnnounceUsedSpaceResponse { - m := new(container.AnnounceUsedSpaceResponse) - - if !empty { - m.SetBody(GenerateAnnounceUsedSpaceResponseBody(false)) - } - - m.SetMetaHeader(sessiontest.GenerateResponseMetaHeader(empty)) - m.SetVerificationHeader(sessiontest.GenerateResponseVerificationHeader(empty)) - - return m -} diff --git a/container/types.go b/container/types.go index 948580d..3a9e915 100644 --- a/container/types.go +++ b/container/types.go @@ -110,26 +110,6 @@ type ListResponse struct { session.ResponseHeaders } -type SetExtendedACLRequestBody struct { - eacl *acl.Table - - sig *refs.Signature -} - -type SetExtendedACLRequest struct { - body *SetExtendedACLRequestBody - - session.RequestHeaders -} - -type SetExtendedACLResponseBody struct{} - -type SetExtendedACLResponse struct { - body *SetExtendedACLResponseBody - - session.ResponseHeaders -} - type GetExtendedACLRequestBody struct { cid *refs.ContainerID } @@ -154,32 +134,6 @@ type GetExtendedACLResponse struct { session.ResponseHeaders } -type UsedSpaceAnnouncement struct { - epoch uint64 - - cid *refs.ContainerID - - usedSpace uint64 -} - -type AnnounceUsedSpaceRequestBody struct { - announcements []UsedSpaceAnnouncement -} - -type AnnounceUsedSpaceRequest struct { - body *AnnounceUsedSpaceRequestBody - - session.RequestHeaders -} - -type AnnounceUsedSpaceResponseBody struct{} - -type AnnounceUsedSpaceResponse struct { - body *AnnounceUsedSpaceResponseBody - - session.ResponseHeaders -} - func (a *Attribute) GetKey() string { if a != nil { return a.key @@ -516,56 +470,6 @@ func (r *ListResponse) SetBody(v *ListResponseBody) { r.body = v } -func (r *SetExtendedACLRequestBody) GetEACL() *acl.Table { - if r != nil { - return r.eacl - } - - return nil -} - -func (r *SetExtendedACLRequestBody) SetEACL(v *acl.Table) { - r.eacl = v -} - -func (r *SetExtendedACLRequestBody) GetSignature() *refs.Signature { - if r != nil { - return r.sig - } - - return nil -} - -func (r *SetExtendedACLRequestBody) SetSignature(v *refs.Signature) { - // TODO: (neofs-api-go#381) avoid this hack (e.g. create refs.SignatureRFC6979 type) - v.SetScheme(0) - r.sig = v -} - -func (r *SetExtendedACLRequest) GetBody() *SetExtendedACLRequestBody { - if r != nil { - return r.body - } - - return nil -} - -func (r *SetExtendedACLRequest) SetBody(v *SetExtendedACLRequestBody) { - r.body = v -} - -func (r *SetExtendedACLResponse) GetBody() *SetExtendedACLResponseBody { - if r != nil { - return r.body - } - - return nil -} - -func (r *SetExtendedACLResponse) SetBody(v *SetExtendedACLResponseBody) { - r.body = v -} - func (r *GetExtendedACLRequestBody) GetContainerID() *refs.ContainerID { if r != nil { return r.cid @@ -643,75 +547,3 @@ func (r *GetExtendedACLResponse) GetBody() *GetExtendedACLResponseBody { func (r *GetExtendedACLResponse) SetBody(v *GetExtendedACLResponseBody) { r.body = v } - -func (a *UsedSpaceAnnouncement) GetEpoch() uint64 { - if a != nil { - return a.epoch - } - - return 0 -} - -func (a *UsedSpaceAnnouncement) SetEpoch(v uint64) { - a.epoch = v -} - -func (a *UsedSpaceAnnouncement) GetUsedSpace() uint64 { - if a != nil { - return a.usedSpace - } - - return 0 -} - -func (a *UsedSpaceAnnouncement) SetUsedSpace(v uint64) { - a.usedSpace = v -} - -func (a *UsedSpaceAnnouncement) GetContainerID() *refs.ContainerID { - if a != nil { - return a.cid - } - - return nil -} - -func (a *UsedSpaceAnnouncement) SetContainerID(v *refs.ContainerID) { - a.cid = v -} - -func (r *AnnounceUsedSpaceRequestBody) GetAnnouncements() []UsedSpaceAnnouncement { - if r != nil { - return r.announcements - } - - return nil -} - -func (r *AnnounceUsedSpaceRequestBody) SetAnnouncements(v []UsedSpaceAnnouncement) { - r.announcements = v -} - -func (r *AnnounceUsedSpaceRequest) GetBody() *AnnounceUsedSpaceRequestBody { - if r != nil { - return r.body - } - - return nil -} - -func (r *AnnounceUsedSpaceRequest) SetBody(v *AnnounceUsedSpaceRequestBody) { - r.body = v -} - -func (r *AnnounceUsedSpaceResponse) GetBody() *AnnounceUsedSpaceResponseBody { - if r != nil { - return r.body - } - - return nil -} - -func (r *AnnounceUsedSpaceResponse) SetBody(v *AnnounceUsedSpaceResponseBody) { - r.body = v -} diff --git a/lock/grpc/types.pb.go b/lock/grpc/types.pb.go index c2d66f1..38b62fe 100644 Binary files a/lock/grpc/types.pb.go and b/lock/grpc/types.pb.go differ diff --git a/netmap/grpc/service.pb.go b/netmap/grpc/service.pb.go index 7694f3f..eb91862 100644 Binary files a/netmap/grpc/service.pb.go and b/netmap/grpc/service.pb.go differ diff --git a/netmap/grpc/service_grpc.pb.go b/netmap/grpc/service_grpc.pb.go index 00cb8de..7881cd6 100644 Binary files a/netmap/grpc/service_grpc.pb.go and b/netmap/grpc/service_grpc.pb.go differ diff --git a/netmap/grpc/types.pb.go b/netmap/grpc/types.pb.go index 59f8612..8924213 100644 Binary files a/netmap/grpc/types.pb.go and b/netmap/grpc/types.pb.go differ diff --git a/object/grpc/service.pb.go b/object/grpc/service.pb.go index 75d359e..01ba86f 100644 Binary files a/object/grpc/service.pb.go and b/object/grpc/service.pb.go differ diff --git a/object/grpc/service_grpc.pb.go b/object/grpc/service_grpc.pb.go index 16af44a..11d132f 100644 Binary files a/object/grpc/service_grpc.pb.go and b/object/grpc/service_grpc.pb.go differ diff --git a/object/grpc/types.pb.go b/object/grpc/types.pb.go index 16736e9..2a5a2f9 100644 Binary files a/object/grpc/types.pb.go and b/object/grpc/types.pb.go differ diff --git a/refs/grpc/types.pb.go b/refs/grpc/types.pb.go index 681bb0d..ab3ae42 100644 Binary files a/refs/grpc/types.pb.go and b/refs/grpc/types.pb.go differ diff --git a/rpc/container.go b/rpc/container.go index 1292c22..39213f6 100644 --- a/rpc/container.go +++ b/rpc/container.go @@ -13,7 +13,6 @@ const ( rpcContainerGet = "Get" rpcContainerDel = "Delete" rpcContainerList = "List" - rpcContainerSetEACL = "SetExtendedACL" rpcContainerGetEACL = "GetExtendedACL" rpcContainerUsedSpace = "AnnounceUsedSpace" ) @@ -82,22 +81,6 @@ func ListContainers( return resp, nil } -// SetEACL executes ContainerService.SetExtendedACL RPC. -func SetEACL( - cli *client.Client, - req *container.SetExtendedACLRequest, - opts ...client.CallOption, -) (*container.PutResponse, error) { - resp := new(container.PutResponse) - - err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceContainer, rpcContainerSetEACL), req, resp, opts...) - if err != nil { - return nil, err - } - - return resp, nil -} - // GetEACL executes ContainerService.GetExtendedACL RPC. func GetEACL( cli *client.Client, @@ -113,19 +96,3 @@ func GetEACL( return resp, nil } - -// AnnounceUsedSpace executes ContainerService.AnnounceUsedSpace RPC. -func AnnounceUsedSpace( - cli *client.Client, - req *container.AnnounceUsedSpaceRequest, - opts ...client.CallOption, -) (*container.PutResponse, error) { - resp := new(container.PutResponse) - - err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceContainer, rpcContainerUsedSpace), req, resp, opts...) - if err != nil { - return nil, err - } - - return resp, nil -} diff --git a/session/grpc/service.pb.go b/session/grpc/service.pb.go index a6fa504..b5e999f 100644 Binary files a/session/grpc/service.pb.go and b/session/grpc/service.pb.go differ diff --git a/session/grpc/service_grpc.pb.go b/session/grpc/service_grpc.pb.go index bdcc3ba..adf6fc1 100644 Binary files a/session/grpc/service_grpc.pb.go and b/session/grpc/service_grpc.pb.go differ diff --git a/session/grpc/types.pb.go b/session/grpc/types.pb.go index e16a7c6..924df45 100644 Binary files a/session/grpc/types.pb.go and b/session/grpc/types.pb.go differ diff --git a/signature/body.go b/signature/body.go index 3362e95..53b5d6b 100644 --- a/signature/body.go +++ b/signature/body.go @@ -46,18 +46,10 @@ func serviceMessageBody(req any) stableMarshaler { return v.GetBody() case *container.ListResponse: return v.GetBody() - case *container.SetExtendedACLRequest: - return v.GetBody() - case *container.SetExtendedACLResponse: - return v.GetBody() case *container.GetExtendedACLRequest: return v.GetBody() case *container.GetExtendedACLResponse: return v.GetBody() - case *container.AnnounceUsedSpaceRequest: - return v.GetBody() - case *container.AnnounceUsedSpaceResponse: - return v.GetBody() /* Object */ case *object.PutRequest: diff --git a/status/grpc/types.pb.go b/status/grpc/types.pb.go index 31f6373..b6b081b 100644 Binary files a/status/grpc/types.pb.go and b/status/grpc/types.pb.go differ diff --git a/tombstone/grpc/types.pb.go b/tombstone/grpc/types.pb.go index 6a064dc..7d416fe 100644 Binary files a/tombstone/grpc/types.pb.go and b/tombstone/grpc/types.pb.go differ