From 9b90d139c5f030d7c7f0be1bddb00f31cab5f404 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Wed, 24 Jul 2024 17:40:47 +0300 Subject: [PATCH] [#94] object: Generate protobufs for `Patch` method * Generate protobufs for patch method; * Create marshalers, unmarshalers, converters for gererated types; * Add unit-tests. Signed-off-by: Airat Arifullin --- object/convert.go | 214 ++++++++ object/grpc/service.go | 52 ++ object/grpc/service.pb.go | 955 ++++++++++++++++++++++++--------- object/grpc/service_grpc.pb.go | 157 ++++++ object/marshal.go | 112 ++++ object/message_test.go | 5 + object/test/generate.go | 57 ++ object/types.go | 32 ++ util/proto/test/test.pb.go | 2 +- 9 files changed, 1341 insertions(+), 245 deletions(-) diff --git a/object/convert.go b/object/convert.go index 6e8ecff..1abfb5e 100644 --- a/object/convert.go +++ b/object/convert.go @@ -2345,3 +2345,217 @@ func (r *PutSingleResponse) FromGRPCMessage(m grpc.Message) error { return r.ResponseHeaders.FromMessage(v) } + +func (r *PatchRequestBodyPatch) ToGRPCMessage() grpc.Message { + var m *object.PatchRequest_Body_Patch + + if r != nil { + m = new(object.PatchRequest_Body_Patch) + + m.SetSourceRange(r.Range.ToGRPCMessage().(*object.Range)) + m.SetChunk(r.Chunk) + } + + return m +} + +func (r *PatchRequestBodyPatch) FromGRPCMessage(m grpc.Message) error { + v, ok := m.(*object.PatchRequest_Body_Patch) + if !ok { + return message.NewUnexpectedMessageType(m, v) + } + + var err error + + srcRange := v.GetSourceRange() + if srcRange == nil { + r.Range = nil + } else { + if r.Range == nil { + r.Range = new(Range) + } + + err = r.Range.FromGRPCMessage(srcRange) + if err != nil { + return err + } + } + + r.Chunk = v.GetChunk() + + return nil +} + +func (r *PatchRequestBody) ToGRPCMessage() grpc.Message { + var m *object.PatchRequest_Body + + if r != nil { + m = new(object.PatchRequest_Body) + + m.SetAddress(r.Address.ToGRPCMessage().(*refsGRPC.Address)) + m.SetNewAttributes(AttributesToGRPC(r.NewAttributes)) + m.SetReplaceAttributes(r.ReplaceAttributes) + m.SetPatch(r.Patch.ToGRPCMessage().(*object.PatchRequest_Body_Patch)) + } + + return m +} + +func (r *PatchRequestBody) FromGRPCMessage(m grpc.Message) error { + v, ok := m.(*object.PatchRequest_Body) + if !ok { + return message.NewUnexpectedMessageType(m, v) + } + + var err error + + addr := v.GetAddress() + if addr == nil { + r.Address = nil + } else { + if r.Address == nil { + r.Address = new(refs.Address) + } + + err = r.Address.FromGRPCMessage(addr) + if err != nil { + return err + } + } + + r.NewAttributes, err = AttributesFromGRPC(v.GetNewAttributes()) + if err != nil { + return err + } + + r.ReplaceAttributes = v.GetReplaceAttributes() + + patch := v.GetPatch() + if patch == nil { + r.Patch = nil + } else { + if r.Patch == nil { + r.Patch = new(PatchRequestBodyPatch) + } + + err = r.Patch.FromGRPCMessage(patch) + if err != nil { + return err + } + } + + return nil +} + +func (r *PatchRequest) ToGRPCMessage() grpc.Message { + var m *object.PatchRequest + + if r != nil { + m = new(object.PatchRequest) + + m.SetBody(r.Body.ToGRPCMessage().(*object.PatchRequest_Body)) + r.RequestHeaders.ToMessage(m) + } + + return m +} + +func (r *PatchRequest) FromGRPCMessage(m grpc.Message) error { + v, ok := m.(*object.PatchRequest) + 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(PatchRequestBody) + } + + err = r.Body.FromGRPCMessage(body) + if err != nil { + return err + } + } + + return r.RequestHeaders.FromMessage(v) +} + +func (r *PatchResponseBody) ToGRPCMessage() grpc.Message { + var m *object.PatchResponse_Body + + if r != nil { + m = new(object.PatchResponse_Body) + + m.SetObjectID(r.ObjectID.ToGRPCMessage().(*refsGRPC.ObjectID)) + } + + return m +} + +func (r *PatchResponseBody) FromGRPCMessage(m grpc.Message) error { + v, ok := m.(*object.PatchResponse_Body) + if !ok { + return message.NewUnexpectedMessageType(m, v) + } + + var err error + + objID := v.GetObjectId() + if objID == nil { + r.ObjectID = nil + } else { + if r.ObjectID == nil { + r.ObjectID = new(refs.ObjectID) + } + + err = r.ObjectID.FromGRPCMessage(objID) + if err != nil { + return err + } + } + + return nil +} + +func (r *PatchResponse) ToGRPCMessage() grpc.Message { + var m *object.PatchResponse + + if r != nil { + m = new(object.PatchResponse) + + m.SetBody(r.Body.ToGRPCMessage().(*object.PatchResponse_Body)) + r.ResponseHeaders.ToMessage(m) + } + + return m +} + +func (r *PatchResponse) FromGRPCMessage(m grpc.Message) error { + v, ok := m.(*object.PatchResponse) + 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(PatchResponseBody) + } + + err = r.Body.FromGRPCMessage(body) + if err != nil { + return err + } + } + + return r.ResponseHeaders.FromMessage(v) +} diff --git a/object/grpc/service.go b/object/grpc/service.go index 3ff1f3a..ef6422e 100644 --- a/object/grpc/service.go +++ b/object/grpc/service.go @@ -556,3 +556,55 @@ func (m *PutSingleResponse) SetMetaHeader(v *session.ResponseMetaHeader) { func (m *PutSingleResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) { m.VerifyHeader = v } + +func (m *PatchRequest_Body) SetAddress(addr *refs.Address) { + m.Address = addr +} + +func (m *PatchRequest_Body) SetNewAttributes(attrs []*Header_Attribute) { + m.NewAttributes = attrs +} + +func (m *PatchRequest_Body) SetReplaceAttributes(replaceAttributes bool) { + m.ReplaceAttributes = replaceAttributes +} + +func (m *PatchRequest_Body) SetPatch(patch *PatchRequest_Body_Patch) { + m.Patch = patch +} + +func (m *PatchRequest_Body_Patch) SetSourceRange(r *Range) { + m.SourceRange = r +} + +func (m *PatchRequest_Body_Patch) SetChunk(chunk []byte) { + m.Chunk = chunk +} + +func (m *PatchRequest) SetBody(b *PatchRequest_Body) { + m.Body = b +} + +func (m *PatchRequest) SetMetaHeader(v *session.RequestMetaHeader) { + m.MetaHeader = v +} + +func (m *PatchRequest) SetVerifyHeader(v *session.RequestVerificationHeader) { + m.VerifyHeader = v +} + +func (m *PatchResponse_Body) SetObjectID(objectID *refs.ObjectID) { + m.ObjectId = objectID +} + +func (m *PatchResponse) SetBody(b *PatchResponse_Body) { + m.Body = b +} + +func (m *PatchResponse) SetMetaHeader(v *session.ResponseMetaHeader) { + m.MetaHeader = v +} + +func (m *PatchResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) { + m.VerifyHeader = v +} diff --git a/object/grpc/service.pb.go b/object/grpc/service.pb.go index 01ba86f..979c932 100644 --- a/object/grpc/service.pb.go +++ b/object/grpc/service.pb.go @@ -1265,6 +1265,145 @@ func (x *PutSingleResponse) GetVerifyHeader() *grpc.ResponseVerificationHeader { return nil } +// Object PATCH request +type PatchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Body for patch request message. + Body *PatchRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *grpc.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness of + // transmission. + VerifyHeader *grpc.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` +} + +func (x *PatchRequest) Reset() { + *x = PatchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_object_grpc_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchRequest) ProtoMessage() {} + +func (x *PatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_object_grpc_service_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatchRequest.ProtoReflect.Descriptor instead. +func (*PatchRequest) Descriptor() ([]byte, []int) { + return file_object_grpc_service_proto_rawDescGZIP(), []int{18} +} + +func (x *PatchRequest) GetBody() *PatchRequest_Body { + if x != nil { + return x.Body + } + return nil +} + +func (x *PatchRequest) GetMetaHeader() *grpc.RequestMetaHeader { + if x != nil { + return x.MetaHeader + } + return nil +} + +func (x *PatchRequest) GetVerifyHeader() *grpc.RequestVerificationHeader { + if x != nil { + return x.VerifyHeader + } + return nil +} + +// Object PATCH response +type PatchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Body for patch response message. + Body *PatchResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + MetaHeader *grpc.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` + // Carries response verification information. This header is used to authenticate + // the nodes of the message route and check the correctness of transmission. + VerifyHeader *grpc.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` +} + +func (x *PatchResponse) Reset() { + *x = PatchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_object_grpc_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchResponse) ProtoMessage() {} + +func (x *PatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_object_grpc_service_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatchResponse.ProtoReflect.Descriptor instead. +func (*PatchResponse) Descriptor() ([]byte, []int) { + return file_object_grpc_service_proto_rawDescGZIP(), []int{19} +} + +func (x *PatchResponse) GetBody() *PatchResponse_Body { + if x != nil { + return x.Body + } + return nil +} + +func (x *PatchResponse) GetMetaHeader() *grpc.ResponseMetaHeader { + if x != nil { + return x.MetaHeader + } + return nil +} + +func (x *PatchResponse) GetVerifyHeader() *grpc.ResponseVerificationHeader { + if x != nil { + return x.VerifyHeader + } + return nil +} + // GET Object request body type GetRequest_Body struct { state protoimpl.MessageState @@ -1281,7 +1420,7 @@ type GetRequest_Body struct { func (x *GetRequest_Body) Reset() { *x = GetRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[18] + mi := &file_object_grpc_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1294,7 +1433,7 @@ func (x *GetRequest_Body) String() string { func (*GetRequest_Body) ProtoMessage() {} func (x *GetRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[18] + mi := &file_object_grpc_service_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1344,7 +1483,7 @@ type GetResponse_Body struct { func (x *GetResponse_Body) Reset() { *x = GetResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[19] + mi := &file_object_grpc_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1357,7 +1496,7 @@ func (x *GetResponse_Body) String() string { func (*GetResponse_Body) ProtoMessage() {} func (x *GetResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[19] + mi := &file_object_grpc_service_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1458,7 +1597,7 @@ type GetResponse_Body_Init struct { func (x *GetResponse_Body_Init) Reset() { *x = GetResponse_Body_Init{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[20] + mi := &file_object_grpc_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1471,7 +1610,7 @@ func (x *GetResponse_Body_Init) String() string { func (*GetResponse_Body_Init) ProtoMessage() {} func (x *GetResponse_Body_Init) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[20] + mi := &file_object_grpc_service_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1526,7 +1665,7 @@ type PutRequest_Body struct { func (x *PutRequest_Body) Reset() { *x = PutRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[21] + mi := &file_object_grpc_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1539,7 +1678,7 @@ func (x *PutRequest_Body) String() string { func (*PutRequest_Body) ProtoMessage() {} func (x *PutRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[21] + mi := &file_object_grpc_service_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1623,7 +1762,7 @@ type PutRequest_Body_Init struct { func (x *PutRequest_Body_Init) Reset() { *x = PutRequest_Body_Init{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[22] + mi := &file_object_grpc_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1636,7 +1775,7 @@ func (x *PutRequest_Body_Init) String() string { func (*PutRequest_Body_Init) ProtoMessage() {} func (x *PutRequest_Body_Init) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[22] + mi := &file_object_grpc_service_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1693,7 +1832,7 @@ type PutResponse_Body struct { func (x *PutResponse_Body) Reset() { *x = PutResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[23] + mi := &file_object_grpc_service_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1706,7 +1845,7 @@ func (x *PutResponse_Body) String() string { func (*PutResponse_Body) ProtoMessage() {} func (x *PutResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[23] + mi := &file_object_grpc_service_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1742,7 +1881,7 @@ type DeleteRequest_Body struct { func (x *DeleteRequest_Body) Reset() { *x = DeleteRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[24] + mi := &file_object_grpc_service_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1755,7 +1894,7 @@ func (x *DeleteRequest_Body) String() string { func (*DeleteRequest_Body) ProtoMessage() {} func (x *DeleteRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[24] + mi := &file_object_grpc_service_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1791,7 +1930,7 @@ type DeleteResponse_Body struct { func (x *DeleteResponse_Body) Reset() { *x = DeleteResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[25] + mi := &file_object_grpc_service_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1804,7 +1943,7 @@ func (x *DeleteResponse_Body) String() string { func (*DeleteResponse_Body) ProtoMessage() {} func (x *DeleteResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[25] + mi := &file_object_grpc_service_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1845,7 +1984,7 @@ type HeadRequest_Body struct { func (x *HeadRequest_Body) Reset() { *x = HeadRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[26] + mi := &file_object_grpc_service_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1858,7 +1997,7 @@ func (x *HeadRequest_Body) String() string { func (*HeadRequest_Body) ProtoMessage() {} func (x *HeadRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[26] + mi := &file_object_grpc_service_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1916,7 +2055,7 @@ type HeadResponse_Body struct { func (x *HeadResponse_Body) Reset() { *x = HeadResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[27] + mi := &file_object_grpc_service_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1929,7 +2068,7 @@ func (x *HeadResponse_Body) String() string { func (*HeadResponse_Body) ProtoMessage() {} func (x *HeadResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[27] + mi := &file_object_grpc_service_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2029,7 +2168,7 @@ type SearchRequest_Body struct { func (x *SearchRequest_Body) Reset() { *x = SearchRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[28] + mi := &file_object_grpc_service_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2042,7 +2181,7 @@ func (x *SearchRequest_Body) String() string { func (*SearchRequest_Body) ProtoMessage() {} func (x *SearchRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[28] + mi := &file_object_grpc_service_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2152,7 +2291,7 @@ type SearchRequest_Body_Filter struct { func (x *SearchRequest_Body_Filter) Reset() { *x = SearchRequest_Body_Filter{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[29] + mi := &file_object_grpc_service_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2165,7 +2304,7 @@ func (x *SearchRequest_Body_Filter) String() string { func (*SearchRequest_Body_Filter) ProtoMessage() {} func (x *SearchRequest_Body_Filter) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[29] + mi := &file_object_grpc_service_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2215,7 +2354,7 @@ type SearchResponse_Body struct { func (x *SearchResponse_Body) Reset() { *x = SearchResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[30] + mi := &file_object_grpc_service_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2228,7 +2367,7 @@ func (x *SearchResponse_Body) String() string { func (*SearchResponse_Body) ProtoMessage() {} func (x *SearchResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[30] + mi := &file_object_grpc_service_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2269,7 +2408,7 @@ type GetRangeRequest_Body struct { func (x *GetRangeRequest_Body) Reset() { *x = GetRangeRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[31] + mi := &file_object_grpc_service_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2282,7 +2421,7 @@ func (x *GetRangeRequest_Body) String() string { func (*GetRangeRequest_Body) ProtoMessage() {} func (x *GetRangeRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[31] + mi := &file_object_grpc_service_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2341,7 +2480,7 @@ type GetRangeResponse_Body struct { func (x *GetRangeResponse_Body) Reset() { *x = GetRangeResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[32] + mi := &file_object_grpc_service_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2354,7 +2493,7 @@ func (x *GetRangeResponse_Body) String() string { func (*GetRangeResponse_Body) ProtoMessage() {} func (x *GetRangeResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[32] + mi := &file_object_grpc_service_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2442,7 +2581,7 @@ type GetRangeHashRequest_Body struct { func (x *GetRangeHashRequest_Body) Reset() { *x = GetRangeHashRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[33] + mi := &file_object_grpc_service_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2455,7 +2594,7 @@ func (x *GetRangeHashRequest_Body) String() string { func (*GetRangeHashRequest_Body) ProtoMessage() {} func (x *GetRangeHashRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[33] + mi := &file_object_grpc_service_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2514,7 +2653,7 @@ type GetRangeHashResponse_Body struct { func (x *GetRangeHashResponse_Body) Reset() { *x = GetRangeHashResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[34] + mi := &file_object_grpc_service_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2527,7 +2666,7 @@ func (x *GetRangeHashResponse_Body) String() string { func (*GetRangeHashResponse_Body) ProtoMessage() {} func (x *GetRangeHashResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[34] + mi := &file_object_grpc_service_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2577,7 +2716,7 @@ type PutSingleRequest_Body struct { func (x *PutSingleRequest_Body) Reset() { *x = PutSingleRequest_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[35] + mi := &file_object_grpc_service_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2590,7 +2729,7 @@ func (x *PutSingleRequest_Body) String() string { func (*PutSingleRequest_Body) ProtoMessage() {} func (x *PutSingleRequest_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[35] + mi := &file_object_grpc_service_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2630,7 +2769,7 @@ type PutSingleResponse_Body struct { func (x *PutSingleResponse_Body) Reset() { *x = PutSingleResponse_Body{} if protoimpl.UnsafeEnabled { - mi := &file_object_grpc_service_proto_msgTypes[36] + mi := &file_object_grpc_service_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2643,7 +2782,7 @@ func (x *PutSingleResponse_Body) String() string { func (*PutSingleResponse_Body) ProtoMessage() {} func (x *PutSingleResponse_Body) ProtoReflect() protoreflect.Message { - mi := &file_object_grpc_service_proto_msgTypes[36] + mi := &file_object_grpc_service_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2659,6 +2798,196 @@ func (*PutSingleResponse_Body) Descriptor() ([]byte, []int) { return file_object_grpc_service_proto_rawDescGZIP(), []int{17, 0} } +// PATCH request body +type PatchRequest_Body struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the object that is requested to get patched. + Address *grpc1.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // New attributes for the object. See `replace_attributes` flag usage to define how + // new attributes should be set. + NewAttributes []*Header_Attribute `protobuf:"bytes,2,rep,name=new_attributes,json=newAttributes,proto3" json:"new_attributes,omitempty"` + // If this flag is set, then the object's attributes will be entirely replaced by `new_attributes` list. + // The empty `new_attributes` list with `replace_attributes = true` just resets attributes list for the object. + // + // Default `false` value for this flag means the attributes will be just merged. If the incoming `new_attributes` + // list contains already existing key, then it just replaces it while merging the lists. + ReplaceAttributes bool `protobuf:"varint,3,opt,name=replace_attributes,json=replaceAttributes,proto3" json:"replace_attributes,omitempty"` + // The patch that is applied for the object. + Patch *PatchRequest_Body_Patch `protobuf:"bytes,4,opt,name=patch,proto3" json:"patch,omitempty"` +} + +func (x *PatchRequest_Body) Reset() { + *x = PatchRequest_Body{} + if protoimpl.UnsafeEnabled { + mi := &file_object_grpc_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchRequest_Body) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchRequest_Body) ProtoMessage() {} + +func (x *PatchRequest_Body) ProtoReflect() protoreflect.Message { + mi := &file_object_grpc_service_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatchRequest_Body.ProtoReflect.Descriptor instead. +func (*PatchRequest_Body) Descriptor() ([]byte, []int) { + return file_object_grpc_service_proto_rawDescGZIP(), []int{18, 0} +} + +func (x *PatchRequest_Body) GetAddress() *grpc1.Address { + if x != nil { + return x.Address + } + return nil +} + +func (x *PatchRequest_Body) GetNewAttributes() []*Header_Attribute { + if x != nil { + return x.NewAttributes + } + return nil +} + +func (x *PatchRequest_Body) GetReplaceAttributes() bool { + if x != nil { + return x.ReplaceAttributes + } + return false +} + +func (x *PatchRequest_Body) GetPatch() *PatchRequest_Body_Patch { + if x != nil { + return x.Patch + } + return nil +} + +// The patch for the object's payload. +type PatchRequest_Body_Patch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The range of the source object for which the payload is replaced by the patch's chunk. + // If the range's `length = 0`, then the patch's chunk is just appended to the original payload + // starting from the `offest` without any replace. + SourceRange *Range `protobuf:"bytes,1,opt,name=source_range,json=sourceRange,proto3" json:"source_range,omitempty"` + // The chunk that is being appended to or that replaces the original payload on the given range. + Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` +} + +func (x *PatchRequest_Body_Patch) Reset() { + *x = PatchRequest_Body_Patch{} + if protoimpl.UnsafeEnabled { + mi := &file_object_grpc_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchRequest_Body_Patch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchRequest_Body_Patch) ProtoMessage() {} + +func (x *PatchRequest_Body_Patch) ProtoReflect() protoreflect.Message { + mi := &file_object_grpc_service_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatchRequest_Body_Patch.ProtoReflect.Descriptor instead. +func (*PatchRequest_Body_Patch) Descriptor() ([]byte, []int) { + return file_object_grpc_service_proto_rawDescGZIP(), []int{18, 0, 0} +} + +func (x *PatchRequest_Body_Patch) GetSourceRange() *Range { + if x != nil { + return x.SourceRange + } + return nil +} + +func (x *PatchRequest_Body_Patch) GetChunk() []byte { + if x != nil { + return x.Chunk + } + return nil +} + +// PATCH response body +type PatchResponse_Body struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The object ID of the saved patched object. + ObjectId *grpc1.ObjectID `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` +} + +func (x *PatchResponse_Body) Reset() { + *x = PatchResponse_Body{} + if protoimpl.UnsafeEnabled { + mi := &file_object_grpc_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatchResponse_Body) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatchResponse_Body) ProtoMessage() {} + +func (x *PatchResponse_Body) ProtoReflect() protoreflect.Message { + mi := &file_object_grpc_service_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatchResponse_Body.ProtoReflect.Descriptor instead. +func (*PatchResponse_Body) Descriptor() ([]byte, []int) { + return file_object_grpc_service_proto_rawDescGZIP(), []int{19, 0} +} + +func (x *PatchResponse_Body) GetObjectId() *grpc1.ObjectID { + if x != nil { + return x.ObjectId + } + return nil +} + var File_object_grpc_service_proto protoreflect.FileDescriptor var file_object_grpc_service_proto_rawDesc = []byte{ @@ -3060,54 +3389,113 @@ var file_object_grpc_service_proto_rawDesc = []byte{ 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0x06, 0x0a, - 0x04, 0x42, 0x6f, 0x64, 0x79, 0x32, 0x88, 0x05, 0x0a, 0x0d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1c, - 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, - 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x44, 0x0a, - 0x03, 0x50, 0x75, 0x74, 0x12, 0x1c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, - 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x28, 0x01, 0x12, 0x4b, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1f, 0x2e, + 0x04, 0x42, 0x6f, 0x64, 0x79, 0x22, 0xb3, 0x04, 0x0a, 0x0c, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, + 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, + 0x45, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, + 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0xcf, 0x02, 0x0a, 0x04, 0x42, 0x6f, + 0x64, 0x79, 0x12, 0x31, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, + 0x72, 0x65, 0x66, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x72, 0x65, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, + 0x3f, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x45, 0x0a, 0x04, 0x48, 0x65, 0x61, 0x64, 0x12, 0x1d, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, - 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, - 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x12, 0x1f, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x12, 0x21, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, - 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5d, 0x0a, 0x0c, 0x47, - 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x25, 0x2e, 0x6e, 0x65, - 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x61, - 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x50, 0x75, - 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, - 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x75, 0x74, 0x53, 0x69, - 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, + 0x74, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, + 0x6f, 0x64, 0x79, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x1a, 0x59, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0xa4, 0x02, 0x0a, 0x0d, + 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, - 0x75, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, - 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, - 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, - 0x2f, 0x76, 0x32, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xaa, 0x02, 0x1a, 0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, - 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x6f, 0x64, + 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6e, + 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, + 0x52, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x1a, 0x3d, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x49, 0x64, 0x32, 0xd4, 0x05, 0x0a, 0x0d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x6e, 0x65, + 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, + 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x44, 0x0a, 0x03, 0x50, 0x75, + 0x74, 0x12, 0x1c, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2e, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, + 0x12, 0x4b, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6e, 0x65, 0x6f, + 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x65, + 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, + 0x04, 0x48, 0x65, 0x61, 0x64, 0x12, 0x1d, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, + 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1f, + 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x30, 0x01, 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x21, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x25, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, + 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x26, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x61, 0x73, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x50, 0x75, 0x74, 0x53, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, + 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, + 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x75, 0x74, 0x53, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, + 0x05, 0x50, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1e, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, + 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, + 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, + 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xaa, + 0x02, 0x1a, 0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3122,7 +3510,7 @@ func file_object_grpc_service_proto_rawDescGZIP() []byte { return file_object_grpc_service_proto_rawDescData } -var file_object_grpc_service_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_object_grpc_service_proto_msgTypes = make([]protoimpl.MessageInfo, 42) var file_object_grpc_service_proto_goTypes = []interface{}{ (*GetRequest)(nil), // 0: neo.fs.v2.object.GetRequest (*GetResponse)(nil), // 1: neo.fs.v2.object.GetResponse @@ -3142,145 +3530,164 @@ var file_object_grpc_service_proto_goTypes = []interface{}{ (*GetRangeHashResponse)(nil), // 15: neo.fs.v2.object.GetRangeHashResponse (*PutSingleRequest)(nil), // 16: neo.fs.v2.object.PutSingleRequest (*PutSingleResponse)(nil), // 17: neo.fs.v2.object.PutSingleResponse - (*GetRequest_Body)(nil), // 18: neo.fs.v2.object.GetRequest.Body - (*GetResponse_Body)(nil), // 19: neo.fs.v2.object.GetResponse.Body - (*GetResponse_Body_Init)(nil), // 20: neo.fs.v2.object.GetResponse.Body.Init - (*PutRequest_Body)(nil), // 21: neo.fs.v2.object.PutRequest.Body - (*PutRequest_Body_Init)(nil), // 22: neo.fs.v2.object.PutRequest.Body.Init - (*PutResponse_Body)(nil), // 23: neo.fs.v2.object.PutResponse.Body - (*DeleteRequest_Body)(nil), // 24: neo.fs.v2.object.DeleteRequest.Body - (*DeleteResponse_Body)(nil), // 25: neo.fs.v2.object.DeleteResponse.Body - (*HeadRequest_Body)(nil), // 26: neo.fs.v2.object.HeadRequest.Body - (*HeadResponse_Body)(nil), // 27: neo.fs.v2.object.HeadResponse.Body - (*SearchRequest_Body)(nil), // 28: neo.fs.v2.object.SearchRequest.Body - (*SearchRequest_Body_Filter)(nil), // 29: neo.fs.v2.object.SearchRequest.Body.Filter - (*SearchResponse_Body)(nil), // 30: neo.fs.v2.object.SearchResponse.Body - (*GetRangeRequest_Body)(nil), // 31: neo.fs.v2.object.GetRangeRequest.Body - (*GetRangeResponse_Body)(nil), // 32: neo.fs.v2.object.GetRangeResponse.Body - (*GetRangeHashRequest_Body)(nil), // 33: neo.fs.v2.object.GetRangeHashRequest.Body - (*GetRangeHashResponse_Body)(nil), // 34: neo.fs.v2.object.GetRangeHashResponse.Body - (*PutSingleRequest_Body)(nil), // 35: neo.fs.v2.object.PutSingleRequest.Body - (*PutSingleResponse_Body)(nil), // 36: neo.fs.v2.object.PutSingleResponse.Body - (*grpc.RequestMetaHeader)(nil), // 37: neo.fs.v2.session.RequestMetaHeader - (*grpc.RequestVerificationHeader)(nil), // 38: neo.fs.v2.session.RequestVerificationHeader - (*grpc.ResponseMetaHeader)(nil), // 39: neo.fs.v2.session.ResponseMetaHeader - (*grpc.ResponseVerificationHeader)(nil), // 40: neo.fs.v2.session.ResponseVerificationHeader - (*Header)(nil), // 41: neo.fs.v2.object.Header - (*grpc1.Signature)(nil), // 42: neo.fs.v2.refs.Signature - (*grpc1.Address)(nil), // 43: neo.fs.v2.refs.Address - (*SplitInfo)(nil), // 44: neo.fs.v2.object.SplitInfo - (*ECInfo)(nil), // 45: neo.fs.v2.object.ECInfo - (*grpc1.ObjectID)(nil), // 46: neo.fs.v2.refs.ObjectID - (*ShortHeader)(nil), // 47: neo.fs.v2.object.ShortHeader - (*grpc1.ContainerID)(nil), // 48: neo.fs.v2.refs.ContainerID - (MatchType)(0), // 49: neo.fs.v2.object.MatchType - (grpc1.ChecksumType)(0), // 50: neo.fs.v2.refs.ChecksumType - (*Object)(nil), // 51: neo.fs.v2.object.Object + (*PatchRequest)(nil), // 18: neo.fs.v2.object.PatchRequest + (*PatchResponse)(nil), // 19: neo.fs.v2.object.PatchResponse + (*GetRequest_Body)(nil), // 20: neo.fs.v2.object.GetRequest.Body + (*GetResponse_Body)(nil), // 21: neo.fs.v2.object.GetResponse.Body + (*GetResponse_Body_Init)(nil), // 22: neo.fs.v2.object.GetResponse.Body.Init + (*PutRequest_Body)(nil), // 23: neo.fs.v2.object.PutRequest.Body + (*PutRequest_Body_Init)(nil), // 24: neo.fs.v2.object.PutRequest.Body.Init + (*PutResponse_Body)(nil), // 25: neo.fs.v2.object.PutResponse.Body + (*DeleteRequest_Body)(nil), // 26: neo.fs.v2.object.DeleteRequest.Body + (*DeleteResponse_Body)(nil), // 27: neo.fs.v2.object.DeleteResponse.Body + (*HeadRequest_Body)(nil), // 28: neo.fs.v2.object.HeadRequest.Body + (*HeadResponse_Body)(nil), // 29: neo.fs.v2.object.HeadResponse.Body + (*SearchRequest_Body)(nil), // 30: neo.fs.v2.object.SearchRequest.Body + (*SearchRequest_Body_Filter)(nil), // 31: neo.fs.v2.object.SearchRequest.Body.Filter + (*SearchResponse_Body)(nil), // 32: neo.fs.v2.object.SearchResponse.Body + (*GetRangeRequest_Body)(nil), // 33: neo.fs.v2.object.GetRangeRequest.Body + (*GetRangeResponse_Body)(nil), // 34: neo.fs.v2.object.GetRangeResponse.Body + (*GetRangeHashRequest_Body)(nil), // 35: neo.fs.v2.object.GetRangeHashRequest.Body + (*GetRangeHashResponse_Body)(nil), // 36: neo.fs.v2.object.GetRangeHashResponse.Body + (*PutSingleRequest_Body)(nil), // 37: neo.fs.v2.object.PutSingleRequest.Body + (*PutSingleResponse_Body)(nil), // 38: neo.fs.v2.object.PutSingleResponse.Body + (*PatchRequest_Body)(nil), // 39: neo.fs.v2.object.PatchRequest.Body + (*PatchRequest_Body_Patch)(nil), // 40: neo.fs.v2.object.PatchRequest.Body.Patch + (*PatchResponse_Body)(nil), // 41: neo.fs.v2.object.PatchResponse.Body + (*grpc.RequestMetaHeader)(nil), // 42: neo.fs.v2.session.RequestMetaHeader + (*grpc.RequestVerificationHeader)(nil), // 43: neo.fs.v2.session.RequestVerificationHeader + (*grpc.ResponseMetaHeader)(nil), // 44: neo.fs.v2.session.ResponseMetaHeader + (*grpc.ResponseVerificationHeader)(nil), // 45: neo.fs.v2.session.ResponseVerificationHeader + (*Header)(nil), // 46: neo.fs.v2.object.Header + (*grpc1.Signature)(nil), // 47: neo.fs.v2.refs.Signature + (*grpc1.Address)(nil), // 48: neo.fs.v2.refs.Address + (*SplitInfo)(nil), // 49: neo.fs.v2.object.SplitInfo + (*ECInfo)(nil), // 50: neo.fs.v2.object.ECInfo + (*grpc1.ObjectID)(nil), // 51: neo.fs.v2.refs.ObjectID + (*ShortHeader)(nil), // 52: neo.fs.v2.object.ShortHeader + (*grpc1.ContainerID)(nil), // 53: neo.fs.v2.refs.ContainerID + (MatchType)(0), // 54: neo.fs.v2.object.MatchType + (grpc1.ChecksumType)(0), // 55: neo.fs.v2.refs.ChecksumType + (*Object)(nil), // 56: neo.fs.v2.object.Object + (*Header_Attribute)(nil), // 57: neo.fs.v2.object.Header.Attribute } var file_object_grpc_service_proto_depIdxs = []int32{ - 18, // 0: neo.fs.v2.object.GetRequest.body:type_name -> neo.fs.v2.object.GetRequest.Body - 37, // 1: neo.fs.v2.object.GetRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader - 38, // 2: neo.fs.v2.object.GetRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader - 19, // 3: neo.fs.v2.object.GetResponse.body:type_name -> neo.fs.v2.object.GetResponse.Body - 39, // 4: neo.fs.v2.object.GetResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader - 40, // 5: neo.fs.v2.object.GetResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader - 21, // 6: neo.fs.v2.object.PutRequest.body:type_name -> neo.fs.v2.object.PutRequest.Body - 37, // 7: neo.fs.v2.object.PutRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader - 38, // 8: neo.fs.v2.object.PutRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader - 23, // 9: neo.fs.v2.object.PutResponse.body:type_name -> neo.fs.v2.object.PutResponse.Body - 39, // 10: neo.fs.v2.object.PutResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader - 40, // 11: neo.fs.v2.object.PutResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader - 24, // 12: neo.fs.v2.object.DeleteRequest.body:type_name -> neo.fs.v2.object.DeleteRequest.Body - 37, // 13: neo.fs.v2.object.DeleteRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader - 38, // 14: neo.fs.v2.object.DeleteRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader - 25, // 15: neo.fs.v2.object.DeleteResponse.body:type_name -> neo.fs.v2.object.DeleteResponse.Body - 39, // 16: neo.fs.v2.object.DeleteResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader - 40, // 17: neo.fs.v2.object.DeleteResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader - 26, // 18: neo.fs.v2.object.HeadRequest.body:type_name -> neo.fs.v2.object.HeadRequest.Body - 37, // 19: neo.fs.v2.object.HeadRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader - 38, // 20: neo.fs.v2.object.HeadRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader - 41, // 21: neo.fs.v2.object.HeaderWithSignature.header:type_name -> neo.fs.v2.object.Header - 42, // 22: neo.fs.v2.object.HeaderWithSignature.signature:type_name -> neo.fs.v2.refs.Signature - 27, // 23: neo.fs.v2.object.HeadResponse.body:type_name -> neo.fs.v2.object.HeadResponse.Body - 39, // 24: neo.fs.v2.object.HeadResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader - 40, // 25: neo.fs.v2.object.HeadResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader - 28, // 26: neo.fs.v2.object.SearchRequest.body:type_name -> neo.fs.v2.object.SearchRequest.Body - 37, // 27: neo.fs.v2.object.SearchRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader - 38, // 28: neo.fs.v2.object.SearchRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader - 30, // 29: neo.fs.v2.object.SearchResponse.body:type_name -> neo.fs.v2.object.SearchResponse.Body - 39, // 30: neo.fs.v2.object.SearchResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader - 40, // 31: neo.fs.v2.object.SearchResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader - 31, // 32: neo.fs.v2.object.GetRangeRequest.body:type_name -> neo.fs.v2.object.GetRangeRequest.Body - 37, // 33: neo.fs.v2.object.GetRangeRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader - 38, // 34: neo.fs.v2.object.GetRangeRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader - 32, // 35: neo.fs.v2.object.GetRangeResponse.body:type_name -> neo.fs.v2.object.GetRangeResponse.Body - 39, // 36: neo.fs.v2.object.GetRangeResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader - 40, // 37: neo.fs.v2.object.GetRangeResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader - 33, // 38: neo.fs.v2.object.GetRangeHashRequest.body:type_name -> neo.fs.v2.object.GetRangeHashRequest.Body - 37, // 39: neo.fs.v2.object.GetRangeHashRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader - 38, // 40: neo.fs.v2.object.GetRangeHashRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader - 34, // 41: neo.fs.v2.object.GetRangeHashResponse.body:type_name -> neo.fs.v2.object.GetRangeHashResponse.Body - 39, // 42: neo.fs.v2.object.GetRangeHashResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader - 40, // 43: neo.fs.v2.object.GetRangeHashResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader - 35, // 44: neo.fs.v2.object.PutSingleRequest.body:type_name -> neo.fs.v2.object.PutSingleRequest.Body - 37, // 45: neo.fs.v2.object.PutSingleRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader - 38, // 46: neo.fs.v2.object.PutSingleRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader - 36, // 47: neo.fs.v2.object.PutSingleResponse.body:type_name -> neo.fs.v2.object.PutSingleResponse.Body - 39, // 48: neo.fs.v2.object.PutSingleResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader - 40, // 49: neo.fs.v2.object.PutSingleResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader - 43, // 50: neo.fs.v2.object.GetRequest.Body.address:type_name -> neo.fs.v2.refs.Address - 20, // 51: neo.fs.v2.object.GetResponse.Body.init:type_name -> neo.fs.v2.object.GetResponse.Body.Init - 44, // 52: neo.fs.v2.object.GetResponse.Body.split_info:type_name -> neo.fs.v2.object.SplitInfo - 45, // 53: neo.fs.v2.object.GetResponse.Body.ec_info:type_name -> neo.fs.v2.object.ECInfo - 46, // 54: neo.fs.v2.object.GetResponse.Body.Init.object_id:type_name -> neo.fs.v2.refs.ObjectID - 42, // 55: neo.fs.v2.object.GetResponse.Body.Init.signature:type_name -> neo.fs.v2.refs.Signature - 41, // 56: neo.fs.v2.object.GetResponse.Body.Init.header:type_name -> neo.fs.v2.object.Header - 22, // 57: neo.fs.v2.object.PutRequest.Body.init:type_name -> neo.fs.v2.object.PutRequest.Body.Init - 46, // 58: neo.fs.v2.object.PutRequest.Body.Init.object_id:type_name -> neo.fs.v2.refs.ObjectID - 42, // 59: neo.fs.v2.object.PutRequest.Body.Init.signature:type_name -> neo.fs.v2.refs.Signature - 41, // 60: neo.fs.v2.object.PutRequest.Body.Init.header:type_name -> neo.fs.v2.object.Header - 46, // 61: neo.fs.v2.object.PutResponse.Body.object_id:type_name -> neo.fs.v2.refs.ObjectID - 43, // 62: neo.fs.v2.object.DeleteRequest.Body.address:type_name -> neo.fs.v2.refs.Address - 43, // 63: neo.fs.v2.object.DeleteResponse.Body.tombstone:type_name -> neo.fs.v2.refs.Address - 43, // 64: neo.fs.v2.object.HeadRequest.Body.address:type_name -> neo.fs.v2.refs.Address - 7, // 65: neo.fs.v2.object.HeadResponse.Body.header:type_name -> neo.fs.v2.object.HeaderWithSignature - 47, // 66: neo.fs.v2.object.HeadResponse.Body.short_header:type_name -> neo.fs.v2.object.ShortHeader - 44, // 67: neo.fs.v2.object.HeadResponse.Body.split_info:type_name -> neo.fs.v2.object.SplitInfo - 45, // 68: neo.fs.v2.object.HeadResponse.Body.ec_info:type_name -> neo.fs.v2.object.ECInfo - 48, // 69: neo.fs.v2.object.SearchRequest.Body.container_id:type_name -> neo.fs.v2.refs.ContainerID - 29, // 70: neo.fs.v2.object.SearchRequest.Body.filters:type_name -> neo.fs.v2.object.SearchRequest.Body.Filter - 49, // 71: neo.fs.v2.object.SearchRequest.Body.Filter.match_type:type_name -> neo.fs.v2.object.MatchType - 46, // 72: neo.fs.v2.object.SearchResponse.Body.id_list:type_name -> neo.fs.v2.refs.ObjectID - 43, // 73: neo.fs.v2.object.GetRangeRequest.Body.address:type_name -> neo.fs.v2.refs.Address - 11, // 74: neo.fs.v2.object.GetRangeRequest.Body.range:type_name -> neo.fs.v2.object.Range - 44, // 75: neo.fs.v2.object.GetRangeResponse.Body.split_info:type_name -> neo.fs.v2.object.SplitInfo - 45, // 76: neo.fs.v2.object.GetRangeResponse.Body.ec_info:type_name -> neo.fs.v2.object.ECInfo - 43, // 77: neo.fs.v2.object.GetRangeHashRequest.Body.address:type_name -> neo.fs.v2.refs.Address - 11, // 78: neo.fs.v2.object.GetRangeHashRequest.Body.ranges:type_name -> neo.fs.v2.object.Range - 50, // 79: neo.fs.v2.object.GetRangeHashRequest.Body.type:type_name -> neo.fs.v2.refs.ChecksumType - 50, // 80: neo.fs.v2.object.GetRangeHashResponse.Body.type:type_name -> neo.fs.v2.refs.ChecksumType - 51, // 81: neo.fs.v2.object.PutSingleRequest.Body.object:type_name -> neo.fs.v2.object.Object - 0, // 82: neo.fs.v2.object.ObjectService.Get:input_type -> neo.fs.v2.object.GetRequest - 2, // 83: neo.fs.v2.object.ObjectService.Put:input_type -> neo.fs.v2.object.PutRequest - 4, // 84: neo.fs.v2.object.ObjectService.Delete:input_type -> neo.fs.v2.object.DeleteRequest - 6, // 85: neo.fs.v2.object.ObjectService.Head:input_type -> neo.fs.v2.object.HeadRequest - 9, // 86: neo.fs.v2.object.ObjectService.Search:input_type -> neo.fs.v2.object.SearchRequest - 12, // 87: neo.fs.v2.object.ObjectService.GetRange:input_type -> neo.fs.v2.object.GetRangeRequest - 14, // 88: neo.fs.v2.object.ObjectService.GetRangeHash:input_type -> neo.fs.v2.object.GetRangeHashRequest - 16, // 89: neo.fs.v2.object.ObjectService.PutSingle:input_type -> neo.fs.v2.object.PutSingleRequest - 1, // 90: neo.fs.v2.object.ObjectService.Get:output_type -> neo.fs.v2.object.GetResponse - 3, // 91: neo.fs.v2.object.ObjectService.Put:output_type -> neo.fs.v2.object.PutResponse - 5, // 92: neo.fs.v2.object.ObjectService.Delete:output_type -> neo.fs.v2.object.DeleteResponse - 8, // 93: neo.fs.v2.object.ObjectService.Head:output_type -> neo.fs.v2.object.HeadResponse - 10, // 94: neo.fs.v2.object.ObjectService.Search:output_type -> neo.fs.v2.object.SearchResponse - 13, // 95: neo.fs.v2.object.ObjectService.GetRange:output_type -> neo.fs.v2.object.GetRangeResponse - 15, // 96: neo.fs.v2.object.ObjectService.GetRangeHash:output_type -> neo.fs.v2.object.GetRangeHashResponse - 17, // 97: neo.fs.v2.object.ObjectService.PutSingle:output_type -> neo.fs.v2.object.PutSingleResponse - 90, // [90:98] is the sub-list for method output_type - 82, // [82:90] is the sub-list for method input_type - 82, // [82:82] is the sub-list for extension type_name - 82, // [82:82] is the sub-list for extension extendee - 0, // [0:82] is the sub-list for field type_name + 20, // 0: neo.fs.v2.object.GetRequest.body:type_name -> neo.fs.v2.object.GetRequest.Body + 42, // 1: neo.fs.v2.object.GetRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader + 43, // 2: neo.fs.v2.object.GetRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader + 21, // 3: neo.fs.v2.object.GetResponse.body:type_name -> neo.fs.v2.object.GetResponse.Body + 44, // 4: neo.fs.v2.object.GetResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader + 45, // 5: neo.fs.v2.object.GetResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader + 23, // 6: neo.fs.v2.object.PutRequest.body:type_name -> neo.fs.v2.object.PutRequest.Body + 42, // 7: neo.fs.v2.object.PutRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader + 43, // 8: neo.fs.v2.object.PutRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader + 25, // 9: neo.fs.v2.object.PutResponse.body:type_name -> neo.fs.v2.object.PutResponse.Body + 44, // 10: neo.fs.v2.object.PutResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader + 45, // 11: neo.fs.v2.object.PutResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader + 26, // 12: neo.fs.v2.object.DeleteRequest.body:type_name -> neo.fs.v2.object.DeleteRequest.Body + 42, // 13: neo.fs.v2.object.DeleteRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader + 43, // 14: neo.fs.v2.object.DeleteRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader + 27, // 15: neo.fs.v2.object.DeleteResponse.body:type_name -> neo.fs.v2.object.DeleteResponse.Body + 44, // 16: neo.fs.v2.object.DeleteResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader + 45, // 17: neo.fs.v2.object.DeleteResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader + 28, // 18: neo.fs.v2.object.HeadRequest.body:type_name -> neo.fs.v2.object.HeadRequest.Body + 42, // 19: neo.fs.v2.object.HeadRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader + 43, // 20: neo.fs.v2.object.HeadRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader + 46, // 21: neo.fs.v2.object.HeaderWithSignature.header:type_name -> neo.fs.v2.object.Header + 47, // 22: neo.fs.v2.object.HeaderWithSignature.signature:type_name -> neo.fs.v2.refs.Signature + 29, // 23: neo.fs.v2.object.HeadResponse.body:type_name -> neo.fs.v2.object.HeadResponse.Body + 44, // 24: neo.fs.v2.object.HeadResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader + 45, // 25: neo.fs.v2.object.HeadResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader + 30, // 26: neo.fs.v2.object.SearchRequest.body:type_name -> neo.fs.v2.object.SearchRequest.Body + 42, // 27: neo.fs.v2.object.SearchRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader + 43, // 28: neo.fs.v2.object.SearchRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader + 32, // 29: neo.fs.v2.object.SearchResponse.body:type_name -> neo.fs.v2.object.SearchResponse.Body + 44, // 30: neo.fs.v2.object.SearchResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader + 45, // 31: neo.fs.v2.object.SearchResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader + 33, // 32: neo.fs.v2.object.GetRangeRequest.body:type_name -> neo.fs.v2.object.GetRangeRequest.Body + 42, // 33: neo.fs.v2.object.GetRangeRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader + 43, // 34: neo.fs.v2.object.GetRangeRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader + 34, // 35: neo.fs.v2.object.GetRangeResponse.body:type_name -> neo.fs.v2.object.GetRangeResponse.Body + 44, // 36: neo.fs.v2.object.GetRangeResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader + 45, // 37: neo.fs.v2.object.GetRangeResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader + 35, // 38: neo.fs.v2.object.GetRangeHashRequest.body:type_name -> neo.fs.v2.object.GetRangeHashRequest.Body + 42, // 39: neo.fs.v2.object.GetRangeHashRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader + 43, // 40: neo.fs.v2.object.GetRangeHashRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader + 36, // 41: neo.fs.v2.object.GetRangeHashResponse.body:type_name -> neo.fs.v2.object.GetRangeHashResponse.Body + 44, // 42: neo.fs.v2.object.GetRangeHashResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader + 45, // 43: neo.fs.v2.object.GetRangeHashResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader + 37, // 44: neo.fs.v2.object.PutSingleRequest.body:type_name -> neo.fs.v2.object.PutSingleRequest.Body + 42, // 45: neo.fs.v2.object.PutSingleRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader + 43, // 46: neo.fs.v2.object.PutSingleRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader + 38, // 47: neo.fs.v2.object.PutSingleResponse.body:type_name -> neo.fs.v2.object.PutSingleResponse.Body + 44, // 48: neo.fs.v2.object.PutSingleResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader + 45, // 49: neo.fs.v2.object.PutSingleResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader + 39, // 50: neo.fs.v2.object.PatchRequest.body:type_name -> neo.fs.v2.object.PatchRequest.Body + 42, // 51: neo.fs.v2.object.PatchRequest.meta_header:type_name -> neo.fs.v2.session.RequestMetaHeader + 43, // 52: neo.fs.v2.object.PatchRequest.verify_header:type_name -> neo.fs.v2.session.RequestVerificationHeader + 41, // 53: neo.fs.v2.object.PatchResponse.body:type_name -> neo.fs.v2.object.PatchResponse.Body + 44, // 54: neo.fs.v2.object.PatchResponse.meta_header:type_name -> neo.fs.v2.session.ResponseMetaHeader + 45, // 55: neo.fs.v2.object.PatchResponse.verify_header:type_name -> neo.fs.v2.session.ResponseVerificationHeader + 48, // 56: neo.fs.v2.object.GetRequest.Body.address:type_name -> neo.fs.v2.refs.Address + 22, // 57: neo.fs.v2.object.GetResponse.Body.init:type_name -> neo.fs.v2.object.GetResponse.Body.Init + 49, // 58: neo.fs.v2.object.GetResponse.Body.split_info:type_name -> neo.fs.v2.object.SplitInfo + 50, // 59: neo.fs.v2.object.GetResponse.Body.ec_info:type_name -> neo.fs.v2.object.ECInfo + 51, // 60: neo.fs.v2.object.GetResponse.Body.Init.object_id:type_name -> neo.fs.v2.refs.ObjectID + 47, // 61: neo.fs.v2.object.GetResponse.Body.Init.signature:type_name -> neo.fs.v2.refs.Signature + 46, // 62: neo.fs.v2.object.GetResponse.Body.Init.header:type_name -> neo.fs.v2.object.Header + 24, // 63: neo.fs.v2.object.PutRequest.Body.init:type_name -> neo.fs.v2.object.PutRequest.Body.Init + 51, // 64: neo.fs.v2.object.PutRequest.Body.Init.object_id:type_name -> neo.fs.v2.refs.ObjectID + 47, // 65: neo.fs.v2.object.PutRequest.Body.Init.signature:type_name -> neo.fs.v2.refs.Signature + 46, // 66: neo.fs.v2.object.PutRequest.Body.Init.header:type_name -> neo.fs.v2.object.Header + 51, // 67: neo.fs.v2.object.PutResponse.Body.object_id:type_name -> neo.fs.v2.refs.ObjectID + 48, // 68: neo.fs.v2.object.DeleteRequest.Body.address:type_name -> neo.fs.v2.refs.Address + 48, // 69: neo.fs.v2.object.DeleteResponse.Body.tombstone:type_name -> neo.fs.v2.refs.Address + 48, // 70: neo.fs.v2.object.HeadRequest.Body.address:type_name -> neo.fs.v2.refs.Address + 7, // 71: neo.fs.v2.object.HeadResponse.Body.header:type_name -> neo.fs.v2.object.HeaderWithSignature + 52, // 72: neo.fs.v2.object.HeadResponse.Body.short_header:type_name -> neo.fs.v2.object.ShortHeader + 49, // 73: neo.fs.v2.object.HeadResponse.Body.split_info:type_name -> neo.fs.v2.object.SplitInfo + 50, // 74: neo.fs.v2.object.HeadResponse.Body.ec_info:type_name -> neo.fs.v2.object.ECInfo + 53, // 75: neo.fs.v2.object.SearchRequest.Body.container_id:type_name -> neo.fs.v2.refs.ContainerID + 31, // 76: neo.fs.v2.object.SearchRequest.Body.filters:type_name -> neo.fs.v2.object.SearchRequest.Body.Filter + 54, // 77: neo.fs.v2.object.SearchRequest.Body.Filter.match_type:type_name -> neo.fs.v2.object.MatchType + 51, // 78: neo.fs.v2.object.SearchResponse.Body.id_list:type_name -> neo.fs.v2.refs.ObjectID + 48, // 79: neo.fs.v2.object.GetRangeRequest.Body.address:type_name -> neo.fs.v2.refs.Address + 11, // 80: neo.fs.v2.object.GetRangeRequest.Body.range:type_name -> neo.fs.v2.object.Range + 49, // 81: neo.fs.v2.object.GetRangeResponse.Body.split_info:type_name -> neo.fs.v2.object.SplitInfo + 50, // 82: neo.fs.v2.object.GetRangeResponse.Body.ec_info:type_name -> neo.fs.v2.object.ECInfo + 48, // 83: neo.fs.v2.object.GetRangeHashRequest.Body.address:type_name -> neo.fs.v2.refs.Address + 11, // 84: neo.fs.v2.object.GetRangeHashRequest.Body.ranges:type_name -> neo.fs.v2.object.Range + 55, // 85: neo.fs.v2.object.GetRangeHashRequest.Body.type:type_name -> neo.fs.v2.refs.ChecksumType + 55, // 86: neo.fs.v2.object.GetRangeHashResponse.Body.type:type_name -> neo.fs.v2.refs.ChecksumType + 56, // 87: neo.fs.v2.object.PutSingleRequest.Body.object:type_name -> neo.fs.v2.object.Object + 48, // 88: neo.fs.v2.object.PatchRequest.Body.address:type_name -> neo.fs.v2.refs.Address + 57, // 89: neo.fs.v2.object.PatchRequest.Body.new_attributes:type_name -> neo.fs.v2.object.Header.Attribute + 40, // 90: neo.fs.v2.object.PatchRequest.Body.patch:type_name -> neo.fs.v2.object.PatchRequest.Body.Patch + 11, // 91: neo.fs.v2.object.PatchRequest.Body.Patch.source_range:type_name -> neo.fs.v2.object.Range + 51, // 92: neo.fs.v2.object.PatchResponse.Body.object_id:type_name -> neo.fs.v2.refs.ObjectID + 0, // 93: neo.fs.v2.object.ObjectService.Get:input_type -> neo.fs.v2.object.GetRequest + 2, // 94: neo.fs.v2.object.ObjectService.Put:input_type -> neo.fs.v2.object.PutRequest + 4, // 95: neo.fs.v2.object.ObjectService.Delete:input_type -> neo.fs.v2.object.DeleteRequest + 6, // 96: neo.fs.v2.object.ObjectService.Head:input_type -> neo.fs.v2.object.HeadRequest + 9, // 97: neo.fs.v2.object.ObjectService.Search:input_type -> neo.fs.v2.object.SearchRequest + 12, // 98: neo.fs.v2.object.ObjectService.GetRange:input_type -> neo.fs.v2.object.GetRangeRequest + 14, // 99: neo.fs.v2.object.ObjectService.GetRangeHash:input_type -> neo.fs.v2.object.GetRangeHashRequest + 16, // 100: neo.fs.v2.object.ObjectService.PutSingle:input_type -> neo.fs.v2.object.PutSingleRequest + 18, // 101: neo.fs.v2.object.ObjectService.Patch:input_type -> neo.fs.v2.object.PatchRequest + 1, // 102: neo.fs.v2.object.ObjectService.Get:output_type -> neo.fs.v2.object.GetResponse + 3, // 103: neo.fs.v2.object.ObjectService.Put:output_type -> neo.fs.v2.object.PutResponse + 5, // 104: neo.fs.v2.object.ObjectService.Delete:output_type -> neo.fs.v2.object.DeleteResponse + 8, // 105: neo.fs.v2.object.ObjectService.Head:output_type -> neo.fs.v2.object.HeadResponse + 10, // 106: neo.fs.v2.object.ObjectService.Search:output_type -> neo.fs.v2.object.SearchResponse + 13, // 107: neo.fs.v2.object.ObjectService.GetRange:output_type -> neo.fs.v2.object.GetRangeResponse + 15, // 108: neo.fs.v2.object.ObjectService.GetRangeHash:output_type -> neo.fs.v2.object.GetRangeHashResponse + 17, // 109: neo.fs.v2.object.ObjectService.PutSingle:output_type -> neo.fs.v2.object.PutSingleResponse + 19, // 110: neo.fs.v2.object.ObjectService.Patch:output_type -> neo.fs.v2.object.PatchResponse + 102, // [102:111] is the sub-list for method output_type + 93, // [93:102] is the sub-list for method input_type + 93, // [93:93] is the sub-list for extension type_name + 93, // [93:93] is the sub-list for extension extendee + 0, // [0:93] is the sub-list for field type_name } func init() { file_object_grpc_service_proto_init() } @@ -3507,7 +3914,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRequest_Body); i { + switch v := v.(*PatchRequest); i { case 0: return &v.state case 1: @@ -3519,7 +3926,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResponse_Body); i { + switch v := v.(*PatchResponse); i { case 0: return &v.state case 1: @@ -3531,7 +3938,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResponse_Body_Init); i { + switch v := v.(*GetRequest_Body); i { case 0: return &v.state case 1: @@ -3543,7 +3950,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PutRequest_Body); i { + switch v := v.(*GetResponse_Body); i { case 0: return &v.state case 1: @@ -3555,7 +3962,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PutRequest_Body_Init); i { + switch v := v.(*GetResponse_Body_Init); i { case 0: return &v.state case 1: @@ -3567,7 +3974,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PutResponse_Body); i { + switch v := v.(*PutRequest_Body); i { case 0: return &v.state case 1: @@ -3579,7 +3986,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRequest_Body); i { + switch v := v.(*PutRequest_Body_Init); i { case 0: return &v.state case 1: @@ -3591,7 +3998,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResponse_Body); i { + switch v := v.(*PutResponse_Body); i { case 0: return &v.state case 1: @@ -3603,7 +4010,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeadRequest_Body); i { + switch v := v.(*DeleteRequest_Body); i { case 0: return &v.state case 1: @@ -3615,7 +4022,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeadResponse_Body); i { + switch v := v.(*DeleteResponse_Body); i { case 0: return &v.state case 1: @@ -3627,7 +4034,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchRequest_Body); i { + switch v := v.(*HeadRequest_Body); i { case 0: return &v.state case 1: @@ -3639,7 +4046,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchRequest_Body_Filter); i { + switch v := v.(*HeadResponse_Body); i { case 0: return &v.state case 1: @@ -3651,7 +4058,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchResponse_Body); i { + switch v := v.(*SearchRequest_Body); i { case 0: return &v.state case 1: @@ -3663,7 +4070,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRangeRequest_Body); i { + switch v := v.(*SearchRequest_Body_Filter); i { case 0: return &v.state case 1: @@ -3675,7 +4082,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRangeResponse_Body); i { + switch v := v.(*SearchResponse_Body); i { case 0: return &v.state case 1: @@ -3687,7 +4094,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRangeHashRequest_Body); i { + switch v := v.(*GetRangeRequest_Body); i { case 0: return &v.state case 1: @@ -3699,7 +4106,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRangeHashResponse_Body); i { + switch v := v.(*GetRangeResponse_Body); i { case 0: return &v.state case 1: @@ -3711,7 +4118,7 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PutSingleRequest_Body); i { + switch v := v.(*GetRangeHashRequest_Body); i { case 0: return &v.state case 1: @@ -3723,6 +4130,30 @@ func file_object_grpc_service_proto_init() { } } file_object_grpc_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRangeHashResponse_Body); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_object_grpc_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutSingleRequest_Body); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_object_grpc_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutSingleResponse_Body); i { case 0: return &v.state @@ -3734,24 +4165,60 @@ func file_object_grpc_service_proto_init() { return nil } } + file_object_grpc_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatchRequest_Body); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_object_grpc_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatchRequest_Body_Patch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_object_grpc_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatchResponse_Body); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_object_grpc_service_proto_msgTypes[19].OneofWrappers = []interface{}{ + file_object_grpc_service_proto_msgTypes[21].OneofWrappers = []interface{}{ (*GetResponse_Body_Init_)(nil), (*GetResponse_Body_Chunk)(nil), (*GetResponse_Body_SplitInfo)(nil), (*GetResponse_Body_EcInfo)(nil), } - file_object_grpc_service_proto_msgTypes[21].OneofWrappers = []interface{}{ + file_object_grpc_service_proto_msgTypes[23].OneofWrappers = []interface{}{ (*PutRequest_Body_Init_)(nil), (*PutRequest_Body_Chunk)(nil), } - file_object_grpc_service_proto_msgTypes[27].OneofWrappers = []interface{}{ + file_object_grpc_service_proto_msgTypes[29].OneofWrappers = []interface{}{ (*HeadResponse_Body_Header)(nil), (*HeadResponse_Body_ShortHeader)(nil), (*HeadResponse_Body_SplitInfo)(nil), (*HeadResponse_Body_EcInfo)(nil), } - file_object_grpc_service_proto_msgTypes[32].OneofWrappers = []interface{}{ + file_object_grpc_service_proto_msgTypes[34].OneofWrappers = []interface{}{ (*GetRangeResponse_Body_Chunk)(nil), (*GetRangeResponse_Body_SplitInfo)(nil), (*GetRangeResponse_Body_EcInfo)(nil), @@ -3762,7 +4229,7 @@ func file_object_grpc_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_object_grpc_service_proto_rawDesc, NumEnums: 0, - NumMessages: 37, + NumMessages: 42, NumExtensions: 0, NumServices: 1, }, diff --git a/object/grpc/service_grpc.pb.go b/object/grpc/service_grpc.pb.go index 11d132f..2494be9 100644 --- a/object/grpc/service_grpc.pb.go +++ b/object/grpc/service_grpc.pb.go @@ -27,6 +27,7 @@ const ( ObjectService_GetRange_FullMethodName = "/neo.fs.v2.object.ObjectService/GetRange" ObjectService_GetRangeHash_FullMethodName = "/neo.fs.v2.object.ObjectService/GetRangeHash" ObjectService_PutSingle_FullMethodName = "/neo.fs.v2.object.ObjectService/PutSingle" + ObjectService_Patch_FullMethodName = "/neo.fs.v2.object.ObjectService/Patch" ) // ObjectServiceClient is the client API for ObjectService service. @@ -299,6 +300,50 @@ type ObjectServiceClient interface { // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. PutSingle(ctx context.Context, in *PutSingleRequest, opts ...grpc.CallOption) (*PutSingleResponse, error) + // Patch the object. Request uses gRPC stream. First message must set + // the address of the object that is going to get patched. If the object's attributes + // are patched, then these attrubutes must be set only within the first stream message. + // + // If the patch request is performed by NOT the object's owner but if the actor has the permission + // to perform the patch, then `OwnerID` of the object is changed. In this case the object's owner + // loses the object's ownership after the patch request is successfully done. + // + // As objects are content-addressable the patching causes new object ID generation for the patched object. + // This object id is set witihn `PatchResponse`. But the object id may remain unchanged in such cases: + // 1. The chunk of the applying patch contains the same value as the object's payload within the same range; + // 2. The patch that reverts the changes applied by preceding patch; + // 3. The application of the same patches for the object a few times. + // + // Extended headers can change `Patch` behaviour: + // - [ __SYSTEM__NETMAP_EPOCH \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + // Will use the requsted version of Network Map for object placement + // calculation. + // + // Please refer to detailed `XHeader` description. + // + // Statuses: + // - **OK** (0, SECTION_SUCCESS): \ + // object has been successfully patched and saved in the container; + // - Common failures (SECTION_FAILURE_COMMON); + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // write access to the container is denied; + // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + // object not found in container; + // - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): \ + // the requested object has been marked as deleted; + // - **OUT_OF_RANGE** (2053, SECTION_OBJECT): \ + // the requested range is out of bounds; + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object storage container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; + // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ + // (for trusted object preparation) session private key does not exist or + // has been deleted; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // provided session token has expired. + Patch(ctx context.Context, opts ...grpc.CallOption) (ObjectService_PatchClient, error) } type objectServiceClient struct { @@ -475,6 +520,40 @@ func (c *objectServiceClient) PutSingle(ctx context.Context, in *PutSingleReques return out, nil } +func (c *objectServiceClient) Patch(ctx context.Context, opts ...grpc.CallOption) (ObjectService_PatchClient, error) { + stream, err := c.cc.NewStream(ctx, &ObjectService_ServiceDesc.Streams[4], ObjectService_Patch_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &objectServicePatchClient{stream} + return x, nil +} + +type ObjectService_PatchClient interface { + Send(*PatchRequest) error + CloseAndRecv() (*PatchResponse, error) + grpc.ClientStream +} + +type objectServicePatchClient struct { + grpc.ClientStream +} + +func (x *objectServicePatchClient) Send(m *PatchRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *objectServicePatchClient) CloseAndRecv() (*PatchResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(PatchResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // ObjectServiceServer is the server API for ObjectService service. // All implementations should embed UnimplementedObjectServiceServer // for forward compatibility @@ -745,6 +824,50 @@ type ObjectServiceServer interface { // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ // provided session token has expired. PutSingle(context.Context, *PutSingleRequest) (*PutSingleResponse, error) + // Patch the object. Request uses gRPC stream. First message must set + // the address of the object that is going to get patched. If the object's attributes + // are patched, then these attrubutes must be set only within the first stream message. + // + // If the patch request is performed by NOT the object's owner but if the actor has the permission + // to perform the patch, then `OwnerID` of the object is changed. In this case the object's owner + // loses the object's ownership after the patch request is successfully done. + // + // As objects are content-addressable the patching causes new object ID generation for the patched object. + // This object id is set witihn `PatchResponse`. But the object id may remain unchanged in such cases: + // 1. The chunk of the applying patch contains the same value as the object's payload within the same range; + // 2. The patch that reverts the changes applied by preceding patch; + // 3. The application of the same patches for the object a few times. + // + // Extended headers can change `Patch` behaviour: + // - [ __SYSTEM__NETMAP_EPOCH \ + // (`__NEOFS__NETMAP_EPOCH` is deprecated) \ + // Will use the requsted version of Network Map for object placement + // calculation. + // + // Please refer to detailed `XHeader` description. + // + // Statuses: + // - **OK** (0, SECTION_SUCCESS): \ + // object has been successfully patched and saved in the container; + // - Common failures (SECTION_FAILURE_COMMON); + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // write access to the container is denied; + // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + // object not found in container; + // - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): \ + // the requested object has been marked as deleted; + // - **OUT_OF_RANGE** (2053, SECTION_OBJECT): \ + // the requested range is out of bounds; + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object storage container not found; + // - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \ + // access to container is denied; + // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ + // (for trusted object preparation) session private key does not exist or + // has been deleted; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // provided session token has expired. + Patch(ObjectService_PatchServer) error } // UnimplementedObjectServiceServer should be embedded to have forward compatible implementations. @@ -775,6 +898,9 @@ func (UnimplementedObjectServiceServer) GetRangeHash(context.Context, *GetRangeH func (UnimplementedObjectServiceServer) PutSingle(context.Context, *PutSingleRequest) (*PutSingleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PutSingle not implemented") } +func (UnimplementedObjectServiceServer) Patch(ObjectService_PatchServer) error { + return status.Errorf(codes.Unimplemented, "method Patch not implemented") +} // UnsafeObjectServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ObjectServiceServer will @@ -948,6 +1074,32 @@ func _ObjectService_PutSingle_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _ObjectService_Patch_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ObjectServiceServer).Patch(&objectServicePatchServer{stream}) +} + +type ObjectService_PatchServer interface { + SendAndClose(*PatchResponse) error + Recv() (*PatchRequest, error) + grpc.ServerStream +} + +type objectServicePatchServer struct { + grpc.ServerStream +} + +func (x *objectServicePatchServer) SendAndClose(m *PatchResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *objectServicePatchServer) Recv() (*PatchRequest, error) { + m := new(PatchRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // ObjectService_ServiceDesc is the grpc.ServiceDesc for ObjectService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -993,6 +1145,11 @@ var ObjectService_ServiceDesc = grpc.ServiceDesc{ Handler: _ObjectService_GetRange_Handler, ServerStreams: true, }, + { + StreamName: "Patch", + Handler: _ObjectService_Patch_Handler, + ClientStreams: true, + }, }, Metadata: "object/grpc/service.proto", } diff --git a/object/marshal.go b/object/marshal.go index f96b098..a0b82df 100644 --- a/object/marshal.go +++ b/object/marshal.go @@ -132,6 +132,16 @@ const ( putSingleReqObjectField = 1 putSingleReqCopiesNumberField = 2 + + patchRequestBodyPatchRangeField = 1 + patchRequestBodyPatchChunkField = 2 + + patchRequestBodyAddrField = 1 + patchRequestBodyNewAttrsField = 2 + patchRequestBodyReplaceAttrField = 3 + patchRequestBodyPatchField = 4 + + patchResponseBodyObjectIDField = 1 ) func (h *ShortHeader) StableMarshal(buf []byte) []byte { @@ -1314,3 +1324,105 @@ func (r *PutSingleResponseBody) StableSize() int { func (r *PutSingleResponseBody) Unmarshal(data []byte) error { return message.Unmarshal(r, data, new(object.PutSingleResponse_Body)) } + +func (r *PatchRequestBodyPatch) StableMarshal(buf []byte) []byte { + if r == nil { + return []byte{} + } + + if buf == nil { + buf = make([]byte, r.StableSize()) + } + + var offset int + offset += proto.NestedStructureMarshal(patchRequestBodyPatchRangeField, buf[offset:], r.Range) + offset += proto.BytesMarshal(patchRequestBodyPatchChunkField, buf[offset:], r.Chunk) + + return buf +} + +func (r *PatchRequestBodyPatch) StableSize() int { + if r == nil { + return 0 + } + + var size int + size += proto.NestedStructureSize(patchRequestBodyPatchRangeField, r.Range) + size += proto.BytesSize(patchRequestBodyPatchChunkField, r.Chunk) + + return size +} + +func (r *PatchRequestBodyPatch) Unmarshal(data []byte) error { + return message.Unmarshal(r, data, new(object.PatchRequest_Body_Patch)) +} + +func (r *PatchRequestBody) StableMarshal(buf []byte) []byte { + if r == nil { + return []byte{} + } + + if buf == nil { + buf = make([]byte, r.StableSize()) + } + + var offset int + offset += proto.NestedStructureMarshal(patchRequestBodyAddrField, buf[offset:], r.Address) + for i := range r.NewAttributes { + offset += proto.NestedStructureMarshal(patchRequestBodyNewAttrsField, buf[offset:], &r.NewAttributes[i]) + } + offset += proto.BoolMarshal(patchRequestBodyReplaceAttrField, buf[offset:], r.ReplaceAttributes) + offset += proto.NestedStructureMarshal(patchRequestBodyPatchField, buf[offset:], r.Patch) + + return buf +} + +func (r *PatchRequestBody) StableSize() int { + if r == nil { + return 0 + } + + var size int + size += proto.NestedStructureSize(patchRequestBodyAddrField, r.Address) + for i := range r.NewAttributes { + size += proto.NestedStructureSize(patchRequestBodyNewAttrsField, &r.NewAttributes[i]) + } + size += proto.BoolSize(patchRequestBodyReplaceAttrField, r.ReplaceAttributes) + size += proto.NestedStructureSize(patchRequestBodyPatchField, r.Patch) + + return size +} + +func (r *PatchRequestBody) Unmarshal(data []byte) error { + return message.Unmarshal(r, data, new(object.PatchRequest_Body)) +} + +func (r *PatchResponseBody) StableSize() int { + if r == nil { + return 0 + } + + var size int + size += proto.NestedStructureSize(patchResponseBodyObjectIDField, r.ObjectID) + + return size +} + +func (r *PatchResponseBody) StableMarshal(buf []byte) []byte { + if r == nil { + return []byte{} + } + + if buf == nil { + buf = make([]byte, r.StableSize()) + } + + var offset int + offset += proto.NestedStructureMarshal(patchResponseBodyObjectIDField, buf[offset:], r.ObjectID) + + return buf +} + +func (r *PatchResponseBody) Unmarshal(data []byte) error { + return message.Unmarshal(r, data, new(object.PatchResponse_Body)) +} diff --git a/object/message_test.go b/object/message_test.go index 749c373..d4e95b3 100644 --- a/object/message_test.go +++ b/object/message_test.go @@ -56,5 +56,10 @@ func TestMessageConvert(t *testing.T) { func(empty bool) message.Message { return objecttest.GenerateLock(empty) }, func(empty bool) message.Message { return objecttest.GeneratePutSingleRequest(empty) }, func(empty bool) message.Message { return objecttest.GeneratePutSingleResponse(empty) }, + func(empty bool) message.Message { return objecttest.GeneratePatchRequestBodyPatch(empty) }, + func(empty bool) message.Message { return objecttest.GeneratePatchRequestBody(empty) }, + func(empty bool) message.Message { return objecttest.GeneratePatchRequest(empty) }, + func(empty bool) message.Message { return objecttest.GeneratePatchResponseBody(empty) }, + func(empty bool) message.Message { return objecttest.GeneratePatchResponse(empty) }, ) } diff --git a/object/test/generate.go b/object/test/generate.go index b1931fc..f45941f 100644 --- a/object/test/generate.go +++ b/object/test/generate.go @@ -691,6 +691,63 @@ func GeneratePutSingleResponse(empty bool) *object.PutSingleResponse { return m } +func GeneratePatchRequestBodyPatch(empty bool) *object.PatchRequestBodyPatch { + m := new(object.PatchRequestBodyPatch) + + if !empty { + m.Range = GenerateRange(false) + m.Chunk = []byte("GeneratePatchRequestBodyPatch") + } + + return m +} + +func GeneratePatchRequestBody(empty bool) *object.PatchRequestBody { + m := new(object.PatchRequestBody) + + if !empty { + m.Address = refstest.GenerateAddress(empty) + m.NewAttributes = GenerateAttributes(empty) + m.ReplaceAttributes = false + m.Patch = GeneratePatchRequestBodyPatch(empty) + } + + return m +} + +func GeneratePatchRequest(empty bool) *object.PatchRequest { + m := new(object.PatchRequest) + + if !empty { + m.Body = GeneratePatchRequestBody(empty) + } + + m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty)) + m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty)) + + return m +} + +func GeneratePatchResponseBody(empty bool) *object.PatchResponseBody { + m := new(object.PatchResponseBody) + + if !empty { + m.ObjectID = refstest.GenerateObjectID(empty) + } + + return m +} + +func GeneratePatchResponse(empty bool) *object.PatchResponse { + m := new(object.PatchResponse) + + if !empty { + m.Body = GeneratePatchResponseBody(empty) + } + + return m +} + func randomInt(n int) int { return rand.New(rand.NewSource(time.Now().UnixNano())).Intn(n) } diff --git a/object/types.go b/object/types.go index 43caf80..d0cac37 100644 --- a/object/types.go +++ b/object/types.go @@ -349,6 +349,38 @@ type PutSingleResponse struct { session.ResponseHeaders } +type PatchRequestBodyPatch struct { + Range *Range + + Chunk []byte +} + +type PatchRequestBody struct { + Address *refs.Address + + NewAttributes []Attribute + + ReplaceAttributes bool + + Patch *PatchRequestBodyPatch +} + +type PatchRequest struct { + Body *PatchRequestBody + + session.RequestHeaders +} + +type PatchResponseBody struct { + ObjectID *refs.ObjectID +} + +type PatchResponse struct { + Body *PatchResponseBody + + session.ResponseHeaders +} + const ( TypeRegular Type = iota TypeTombstone diff --git a/util/proto/test/test.pb.go b/util/proto/test/test.pb.go index 57f7fb0..199fe2f 100644 --- a/util/proto/test/test.pb.go +++ b/util/proto/test/test.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.33.0 -// protoc v5.27.2 +// protoc v4.25.3 // source: util/proto/test/test.proto package test