From c49bf2343487d68b2f4d1a59416c1df279cd3d81 Mon Sep 17 00:00:00 2001 From: Alena Petraki <alena.petraki@gmail.com> Date: Thu, 25 May 2023 12:48:27 +0300 Subject: [PATCH] AcceptTransfer -> Move --- proto/spaces/spaces.pb.go | 160 +++++++++++++++++---------------- proto/spaces/spaces_grpc.pb.go | 46 ++++++---- 2 files changed, 111 insertions(+), 95 deletions(-) diff --git a/proto/spaces/spaces.pb.go b/proto/spaces/spaces.pb.go index 7fe57ee6..e495f108 100644 --- a/proto/spaces/spaces.pb.go +++ b/proto/spaces/spaces.pb.go @@ -663,8 +663,8 @@ type TransferRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SpaceId string `protobuf:"bytes,1,opt,name=space_id,json=spaceId,proto3" json:"space_id,omitempty"` - TransferToOrg string `protobuf:"bytes,2,opt,name=transfer_to_org,json=transferToOrg,proto3" json:"transfer_to_org,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=space_id,json=spaceId,proto3" json:"space_id,omitempty"` // Рдентификатор перемещаемого пространства + TransferToOrg string `protobuf:"bytes,2,opt,name=transfer_to_org,json=transferToOrg,proto3" json:"transfer_to_org,omitempty"` // Рдентификатор организации, РІ которую пространство должно быть перемещено } func (x *TransferRequest) Reset() { @@ -718,7 +718,7 @@ type AbortTransferRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SpaceId string `protobuf:"bytes,1,opt,name=space_id,json=spaceId,proto3" json:"space_id,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=space_id,json=spaceId,proto3" json:"space_id,omitempty"` // Рдентификатор перемещаемого пространства } func (x *AbortTransferRequest) Reset() { @@ -854,16 +854,17 @@ func (x *ListTransfersResponse) GetSpaces() []*Space { return nil } -type AcceptTransferRequest struct { +type MoveRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SpaceId string `protobuf:"bytes,1,opt,name=space_id,json=spaceId,proto3" json:"space_id,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=space_id,json=spaceId,proto3" json:"space_id,omitempty"` // Рдентификатор перемещаемого пространства + OrgId string `protobuf:"bytes,2,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` // Рдентификатор организации, РІ которую пространство должно быть перемещено. Обязателен для заполнения только РІ случае запросов СЃ системным уровнем доступа, РІ остальных случаях опционален } -func (x *AcceptTransferRequest) Reset() { - *x = AcceptTransferRequest{} +func (x *MoveRequest) Reset() { + *x = MoveRequest{} if protoimpl.UnsafeEnabled { mi := &file_spaces_spaces_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -871,13 +872,13 @@ func (x *AcceptTransferRequest) Reset() { } } -func (x *AcceptTransferRequest) String() string { +func (x *MoveRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AcceptTransferRequest) ProtoMessage() {} +func (*MoveRequest) ProtoMessage() {} -func (x *AcceptTransferRequest) ProtoReflect() protoreflect.Message { +func (x *MoveRequest) ProtoReflect() protoreflect.Message { mi := &file_spaces_spaces_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -889,18 +890,25 @@ func (x *AcceptTransferRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AcceptTransferRequest.ProtoReflect.Descriptor instead. -func (*AcceptTransferRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use MoveRequest.ProtoReflect.Descriptor instead. +func (*MoveRequest) Descriptor() ([]byte, []int) { return file_spaces_spaces_proto_rawDescGZIP(), []int{15} } -func (x *AcceptTransferRequest) GetSpaceId() string { +func (x *MoveRequest) GetSpaceId() string { if x != nil { return x.SpaceId } return "" } +func (x *MoveRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + var File_spaces_spaces_proto protoreflect.FileDescriptor var file_spaces_spaces_proto_rawDesc = []byte{ @@ -974,69 +982,69 @@ var file_spaces_spaces_proto_rawDesc = []byte{ 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x53, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x32, 0x0a, 0x15, 0x41, - 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x2a, - 0x70, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x45, - 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, - 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x49, 0x47, - 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, - 0x54, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, - 0x07, 0x32, 0xfa, 0x05, 0x0a, 0x06, 0x53, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x06, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1a, + 0x61, 0x63, 0x65, 0x52, 0x06, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x0b, 0x4d, + 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x2a, 0x70, 0x0a, 0x05, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, + 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, + 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, + 0x41, 0x4e, 0x43, 0x45, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, + 0x47, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x07, 0x32, 0xe6, + 0x05, 0x0a, 0x06, 0x53, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x06, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x04, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4d, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, - 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, + 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x41, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, - 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0d, 0x41, 0x62, - 0x6f, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x41, 0x62, 0x6f, - 0x72, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0d, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x24, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0e, 0x41, - 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x25, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x41, - 0x63, 0x63, 0x65, 0x70, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x32, - 0x5a, 0x30, 0x67, 0x69, 0x74, 0x2e, 0x70, 0x65, 0x72, 0x78, 0x2e, 0x72, 0x75, 0x2f, 0x70, 0x65, - 0x72, 0x78, 0x69, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2d, 0x67, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x45, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0d, 0x41, 0x62, 0x6f, 0x72, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, + 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x2e, 0x70, + 0x65, 0x72, 0x78, 0x2e, 0x72, 0x75, 0x2f, 0x70, 0x65, 0x72, 0x78, 0x69, 0x73, 0x2f, 0x70, 0x65, + 0x72, 0x78, 0x69, 0x73, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1070,7 +1078,7 @@ var file_spaces_spaces_proto_goTypes = []interface{}{ (*AbortTransferRequest)(nil), // 13: content.spaces.AbortTransferRequest (*ListTransfersRequest)(nil), // 14: content.spaces.ListTransfersRequest (*ListTransfersResponse)(nil), // 15: content.spaces.ListTransfersResponse - (*AcceptTransferRequest)(nil), // 16: content.spaces.AcceptTransferRequest + (*MoveRequest)(nil), // 16: content.spaces.MoveRequest (*emptypb.Empty)(nil), // 17: google.protobuf.Empty } var file_spaces_spaces_proto_depIdxs = []int32{ @@ -1092,7 +1100,7 @@ var file_spaces_spaces_proto_depIdxs = []int32{ 12, // 15: content.spaces.Spaces.Transfer:input_type -> content.spaces.TransferRequest 13, // 16: content.spaces.Spaces.AbortTransfer:input_type -> content.spaces.AbortTransferRequest 14, // 17: content.spaces.Spaces.ListTransfers:input_type -> content.spaces.ListTransfersRequest - 16, // 18: content.spaces.Spaces.AcceptTransfer:input_type -> content.spaces.AcceptTransferRequest + 16, // 18: content.spaces.Spaces.Move:input_type -> content.spaces.MoveRequest 4, // 19: content.spaces.Spaces.Create:output_type -> content.spaces.CreateResponse 6, // 20: content.spaces.Spaces.Get:output_type -> content.spaces.GetResponse 8, // 21: content.spaces.Spaces.List:output_type -> content.spaces.ListResponse @@ -1102,7 +1110,7 @@ var file_spaces_spaces_proto_depIdxs = []int32{ 17, // 25: content.spaces.Spaces.Transfer:output_type -> google.protobuf.Empty 17, // 26: content.spaces.Spaces.AbortTransfer:output_type -> google.protobuf.Empty 15, // 27: content.spaces.Spaces.ListTransfers:output_type -> content.spaces.ListTransfersResponse - 17, // 28: content.spaces.Spaces.AcceptTransfer:output_type -> google.protobuf.Empty + 17, // 28: content.spaces.Spaces.Move:output_type -> google.protobuf.Empty 19, // [19:29] is the sub-list for method output_type 9, // [9:19] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name @@ -1297,7 +1305,7 @@ func file_spaces_spaces_proto_init() { } } file_spaces_spaces_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AcceptTransferRequest); i { + switch v := v.(*MoveRequest); i { case 0: return &v.state case 1: diff --git a/proto/spaces/spaces_grpc.pb.go b/proto/spaces/spaces_grpc.pb.go index 89535627..757e68b1 100644 --- a/proto/spaces/spaces_grpc.pb.go +++ b/proto/spaces/spaces_grpc.pb.go @@ -33,15 +33,19 @@ type SpacesClient interface { // будет отображаться РІ СЃРїРёСЃРєРµ входящих запросов РЅР° перемещение РІ организации `orgID` (запрос ListIncoming) // РЎ пространством РјРѕР¶РЅРѕ продолжать работу РІ текущей организации, РїРѕРєР° запрос РЅР° перемещение РЅРµ будет // РїСЂРёРЅСЏС‚ РІ целевой организации + // Перенос может быть инициирован только владельцем организации, которой принадлежит пространство Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // AbortTransfer - отменить перемещение пространства РІ РґСЂСѓРіСѓСЋ организацию + // AbortTransfer - отменить перемещение пространства РІ РґСЂСѓРіСѓСЋ организацию. Может быть вызван как + // владельцем пространства-инициатора, там Рё владельцем принимающего пространства AbortTransfer(ctx context.Context, in *AbortTransferRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // ListTransfers возвращает СЃРїРёСЃРѕРє пространств, перемещение которых было запрошено РІ текущую организацию ListTransfers(ctx context.Context, in *ListTransfersRequest, opts ...grpc.CallOption) (*ListTransfersResponse, error) - // AcceptTransfer - принять запрос РЅР° перемещение пространства. РћРЅРѕ будет перемещено РІ текущую организацию СЃРѕ + // Move - перенести пространство РІ организацию, установленную РІ Space.TransferToOrg. Пространство переносится СЃРѕ // всеми входящими РІ него данными: ролями, участниками, контентом, РїСЂ. Рё более РЅРµ будет доступно РІ - // старой организации - AcceptTransfer(ctx context.Context, in *AcceptTransferRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // РёСЃС…РѕРґРЅРѕР№ организации. + // Р’ случае, если запрос осуществляется СЃ системным уровнем доступа Рё передан параметр `org_id`, то перенос будет + // осуществлен РІРЅРµ зависимости РѕС‚ того, был РѕРЅ инициирован через метод `Transfer` или нет + Move(ctx context.Context, in *MoveRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type spacesClient struct { @@ -133,9 +137,9 @@ func (c *spacesClient) ListTransfers(ctx context.Context, in *ListTransfersReque return out, nil } -func (c *spacesClient) AcceptTransfer(ctx context.Context, in *AcceptTransferRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *spacesClient) Move(ctx context.Context, in *MoveRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/content.spaces.Spaces/AcceptTransfer", in, out, opts...) + err := c.cc.Invoke(ctx, "/content.spaces.Spaces/Move", in, out, opts...) if err != nil { return nil, err } @@ -156,15 +160,19 @@ type SpacesServer interface { // будет отображаться РІ СЃРїРёСЃРєРµ входящих запросов РЅР° перемещение РІ организации `orgID` (запрос ListIncoming) // РЎ пространством РјРѕР¶РЅРѕ продолжать работу РІ текущей организации, РїРѕРєР° запрос РЅР° перемещение РЅРµ будет // РїСЂРёРЅСЏС‚ РІ целевой организации + // Перенос может быть инициирован только владельцем организации, которой принадлежит пространство Transfer(context.Context, *TransferRequest) (*emptypb.Empty, error) - // AbortTransfer - отменить перемещение пространства РІ РґСЂСѓРіСѓСЋ организацию + // AbortTransfer - отменить перемещение пространства РІ РґСЂСѓРіСѓСЋ организацию. Может быть вызван как + // владельцем пространства-инициатора, там Рё владельцем принимающего пространства AbortTransfer(context.Context, *AbortTransferRequest) (*emptypb.Empty, error) // ListTransfers возвращает СЃРїРёСЃРѕРє пространств, перемещение которых было запрошено РІ текущую организацию ListTransfers(context.Context, *ListTransfersRequest) (*ListTransfersResponse, error) - // AcceptTransfer - принять запрос РЅР° перемещение пространства. РћРЅРѕ будет перемещено РІ текущую организацию СЃРѕ + // Move - перенести пространство РІ организацию, установленную РІ Space.TransferToOrg. Пространство переносится СЃРѕ // всеми входящими РІ него данными: ролями, участниками, контентом, РїСЂ. Рё более РЅРµ будет доступно РІ - // старой организации - AcceptTransfer(context.Context, *AcceptTransferRequest) (*emptypb.Empty, error) + // РёСЃС…РѕРґРЅРѕР№ организации. + // Р’ случае, если запрос осуществляется СЃ системным уровнем доступа Рё передан параметр `org_id`, то перенос будет + // осуществлен РІРЅРµ зависимости РѕС‚ того, был РѕРЅ инициирован через метод `Transfer` или нет + Move(context.Context, *MoveRequest) (*emptypb.Empty, error) mustEmbedUnimplementedSpacesServer() } @@ -199,8 +207,8 @@ func (UnimplementedSpacesServer) AbortTransfer(context.Context, *AbortTransferRe func (UnimplementedSpacesServer) ListTransfers(context.Context, *ListTransfersRequest) (*ListTransfersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTransfers not implemented") } -func (UnimplementedSpacesServer) AcceptTransfer(context.Context, *AcceptTransferRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method AcceptTransfer not implemented") +func (UnimplementedSpacesServer) Move(context.Context, *MoveRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Move not implemented") } func (UnimplementedSpacesServer) mustEmbedUnimplementedSpacesServer() {} @@ -377,20 +385,20 @@ func _Spaces_ListTransfers_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _Spaces_AcceptTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AcceptTransferRequest) +func _Spaces_Move_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SpacesServer).AcceptTransfer(ctx, in) + return srv.(SpacesServer).Move(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/content.spaces.Spaces/AcceptTransfer", + FullMethod: "/content.spaces.Spaces/Move", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SpacesServer).AcceptTransfer(ctx, req.(*AcceptTransferRequest)) + return srv.(SpacesServer).Move(ctx, req.(*MoveRequest)) } return interceptor(ctx, in, info, handler) } @@ -439,8 +447,8 @@ var Spaces_ServiceDesc = grpc.ServiceDesc{ Handler: _Spaces_ListTransfers_Handler, }, { - MethodName: "AcceptTransfer", - Handler: _Spaces_AcceptTransfer_Handler, + MethodName: "Move", + Handler: _Spaces_Move_Handler, }, }, Streams: []grpc.StreamDesc{}, -- GitLab