From 90896e50d1229fd11676fdbd345db9f5d5ccb839 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Sun, 5 Nov 2023 11:22:22 +0800 Subject: [PATCH 01/46] feat: support encrypt in sync --- proto/sync/v1/sync_service.proto | 36 ++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 419bcce..faeedfa 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -22,7 +22,7 @@ service SyncService { body: "*" }; } - // 更新组信息 + // 更新组信息 如果创建一个新的组,需要同时处理生成新的密钥 rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse) { option (google.api.http) = { post:"/gapi/sync/v1/update_group" @@ -33,6 +33,19 @@ service SyncService { rpc SyncGroup(SyncGroupRequest) returns (SyncGroupResponse) { option (google.api.http) = {get:"/gapi/sync/v1/sync_group"}; } + + // 获取mater key加密后的解密密钥,对应组 + rpc GetEncryptedKey(GetEncryptedKeyRequest) returns (GetEncryptedKeyResponse) { + option (google.api.http) = {get:"/gapi/sync/v1/sync_get_encrypted_key"}; + } + + // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 + rpc UpdateEncryptedKey(UpdateEncryptedKeyRequest) returns (UpdateEncryptedKeyResponse) { + option (google.api.http) = { + post:"/gapi/sync/v1/sync_update_encrypted_key" + body: "*" + }; + } } message SyncRequest { @@ -80,4 +93,23 @@ message SyncGroupRequest { message SyncGroupResponse { google.protobuf.Timestamp server_time = 1; repeated Group groups = 11; -} \ No newline at end of file +} + +message GetEncryptedKeyRequest { + string gid = 1; +} + +message GetEncryptedKeyResponse { + EncryptedKeyInfo encrypted_key_info = 1; +} + +message UpdateEncryptedKeyRequest { + repeated EncryptedKeyInfo update_encrypted_key = 1; +} + +message EncryptedKeyInfo { + string gid = 1; + string encrypted_key = 2; +} + +message UpdateEncryptedKeyResponse {} \ No newline at end of file From 28814f27090ff925fa7082e22241d46943939c9a Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Sun, 5 Nov 2023 12:57:51 +0800 Subject: [PATCH 02/46] chore: gen code --- gen/openapi/sync/v1/sync_service.swagger.json | 100 +++- gen/proto/sync/v1/sync_service.pb.go | 499 +++++++++++++++--- gen/proto/sync/v1/sync_service.pb.gw.go | 172 ++++++ gen/proto/sync/v1/sync_service.pb.ts | 26 + gen/proto/sync/v1/sync_service_grpc.pb.go | 90 +++- 5 files changed, 803 insertions(+), 84 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index efe05c3..6ee2c60 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -55,6 +55,37 @@ ] } }, + "/gapi/sync/v1/sync_get_encrypted_key": { + "get": { + "summary": "获取mater key加密后的解密密钥,对应组", + "operationId": "SyncService_GetEncryptedKey", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetEncryptedKeyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "gid", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "SyncService" + ] + } + }, "/gapi/sync/v1/sync_group": { "get": { "summary": "通过UID获取所有组信息", @@ -87,6 +118,39 @@ ] } }, + "/gapi/sync/v1/sync_update_encrypted_key": { + "post": { + "summary": "更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。", + "operationId": "SyncService_UpdateEncryptedKey", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateEncryptedKeyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateEncryptedKeyRequest" + } + } + ], + "tags": [ + "SyncService" + ] + } + }, "/gapi/sync/v1/update": { "post": { "summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。", @@ -122,7 +186,7 @@ }, "/gapi/sync/v1/update_group": { "post": { - "summary": "更新组信息", + "summary": "更新组信息 如果创建一个新的组,需要同时处理生成新的密钥", "operationId": "SyncService_UpdateGroup", "responses": { "200": { @@ -183,6 +247,25 @@ } } }, + "v1EncryptedKeyInfo": { + "type": "object", + "properties": { + "gid": { + "type": "string" + }, + "encryptedKey": { + "type": "string" + } + } + }, + "v1GetEncryptedKeyResponse": { + "type": "object", + "properties": { + "encryptedKeyInfo": { + "$ref": "#/definitions/v1EncryptedKeyInfo" + } + } + }, "v1Group": { "type": "object", "properties": { @@ -458,6 +541,21 @@ } } }, + "v1UpdateEncryptedKeyRequest": { + "type": "object", + "properties": { + "updateEncryptedKey": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1EncryptedKeyInfo" + } + } + } + }, + "v1UpdateEncryptedKeyResponse": { + "type": "object" + }, "v1UpdateGroupRequest": { "type": "object", "properties": { diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 610b736..4354d95 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -569,6 +569,240 @@ func (x *SyncGroupResponse) GetGroups() []*Group { return nil } +type GetEncryptedKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` +} + +func (x *GetEncryptedKeyRequest) Reset() { + *x = GetEncryptedKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEncryptedKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEncryptedKeyRequest) ProtoMessage() {} + +func (x *GetEncryptedKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[8] + 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 GetEncryptedKeyRequest.ProtoReflect.Descriptor instead. +func (*GetEncryptedKeyRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} +} + +func (x *GetEncryptedKeyRequest) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +type GetEncryptedKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EncryptedKeyInfo *EncryptedKeyInfo `protobuf:"bytes,1,opt,name=encrypted_key_info,json=encryptedKeyInfo,proto3" json:"encrypted_key_info,omitempty"` +} + +func (x *GetEncryptedKeyResponse) Reset() { + *x = GetEncryptedKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEncryptedKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEncryptedKeyResponse) ProtoMessage() {} + +func (x *GetEncryptedKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[9] + 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 GetEncryptedKeyResponse.ProtoReflect.Descriptor instead. +func (*GetEncryptedKeyResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} +} + +func (x *GetEncryptedKeyResponse) GetEncryptedKeyInfo() *EncryptedKeyInfo { + if x != nil { + return x.EncryptedKeyInfo + } + return nil +} + +type UpdateEncryptedKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UpdateEncryptedKey []*EncryptedKeyInfo `protobuf:"bytes,1,rep,name=update_encrypted_key,json=updateEncryptedKey,proto3" json:"update_encrypted_key,omitempty"` +} + +func (x *UpdateEncryptedKeyRequest) Reset() { + *x = UpdateEncryptedKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateEncryptedKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEncryptedKeyRequest) ProtoMessage() {} + +func (x *UpdateEncryptedKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[10] + 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 UpdateEncryptedKeyRequest.ProtoReflect.Descriptor instead. +func (*UpdateEncryptedKeyRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateEncryptedKeyRequest) GetUpdateEncryptedKey() []*EncryptedKeyInfo { + if x != nil { + return x.UpdateEncryptedKey + } + return nil +} + +type EncryptedKeyInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + EncryptedKey string `protobuf:"bytes,2,opt,name=encrypted_key,json=encryptedKey,proto3" json:"encrypted_key,omitempty"` +} + +func (x *EncryptedKeyInfo) Reset() { + *x = EncryptedKeyInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptedKeyInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptedKeyInfo) ProtoMessage() {} + +func (x *EncryptedKeyInfo) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[11] + 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 EncryptedKeyInfo.ProtoReflect.Descriptor instead. +func (*EncryptedKeyInfo) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} +} + +func (x *EncryptedKeyInfo) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *EncryptedKeyInfo) GetEncryptedKey() string { + if x != nil { + return x.EncryptedKey + } + return "" +} + +type UpdateEncryptedKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateEncryptedKeyResponse) Reset() { + *x = UpdateEncryptedKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateEncryptedKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEncryptedKeyResponse) ProtoMessage() {} + +func (x *UpdateEncryptedKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[12] + 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 UpdateEncryptedKeyResponse.ProtoReflect.Descriptor instead. +func (*UpdateEncryptedKeyResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} +} + var File_sync_v1_sync_service_proto protoreflect.FileDescriptor var file_sync_v1_sync_service_proto_rawDesc = []byte{ @@ -652,36 +886,76 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x32, 0x91, 0x03, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, - 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, - 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, - 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, + 0x69, 0x64, 0x22, 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, + 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, + 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, + 0x22, 0x49, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xaa, 0x05, 0x0a, 0x0b, 0x53, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, + 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, + 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x82, 0x01, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, + 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, + 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, + 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, + 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, + 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -696,55 +970,66 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { return file_sync_v1_sync_service_proto_rawDescData } -var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ - (*SyncRequest)(nil), // 0: sync.v1.SyncRequest - (*SyncResponse)(nil), // 1: sync.v1.SyncResponse - (*UpdateRequest)(nil), // 2: sync.v1.UpdateRequest - (*UpdateResponse)(nil), // 3: sync.v1.UpdateResponse - (*UpdateGroupRequest)(nil), // 4: sync.v1.UpdateGroupRequest - (*UpdateGroupResponse)(nil), // 5: sync.v1.UpdateGroupResponse - (*SyncGroupRequest)(nil), // 6: sync.v1.SyncGroupRequest - (*SyncGroupResponse)(nil), // 7: sync.v1.SyncGroupResponse - (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp - (*Host)(nil), // 9: sync.v1.Host - (*KnownHost)(nil), // 10: sync.v1.KnownHost - (*SshKey)(nil), // 11: sync.v1.SshKey - (*Identity)(nil), // 12: sync.v1.Identity - (*Group)(nil), // 13: sync.v1.Group + (*SyncRequest)(nil), // 0: sync.v1.SyncRequest + (*SyncResponse)(nil), // 1: sync.v1.SyncResponse + (*UpdateRequest)(nil), // 2: sync.v1.UpdateRequest + (*UpdateResponse)(nil), // 3: sync.v1.UpdateResponse + (*UpdateGroupRequest)(nil), // 4: sync.v1.UpdateGroupRequest + (*UpdateGroupResponse)(nil), // 5: sync.v1.UpdateGroupResponse + (*SyncGroupRequest)(nil), // 6: sync.v1.SyncGroupRequest + (*SyncGroupResponse)(nil), // 7: sync.v1.SyncGroupResponse + (*GetEncryptedKeyRequest)(nil), // 8: sync.v1.GetEncryptedKeyRequest + (*GetEncryptedKeyResponse)(nil), // 9: sync.v1.GetEncryptedKeyResponse + (*UpdateEncryptedKeyRequest)(nil), // 10: sync.v1.UpdateEncryptedKeyRequest + (*EncryptedKeyInfo)(nil), // 11: sync.v1.EncryptedKeyInfo + (*UpdateEncryptedKeyResponse)(nil), // 12: sync.v1.UpdateEncryptedKeyResponse + (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp + (*Host)(nil), // 14: sync.v1.Host + (*KnownHost)(nil), // 15: sync.v1.KnownHost + (*SshKey)(nil), // 16: sync.v1.SshKey + (*Identity)(nil), // 17: sync.v1.Identity + (*Group)(nil), // 18: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 8, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp - 8, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp - 9, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host - 10, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost - 11, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey - 12, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity - 9, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host - 10, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost - 11, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey - 12, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity - 9, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host - 10, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost - 11, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey - 12, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity - 13, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group - 8, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 8, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp - 13, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group - 0, // 18: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest - 2, // 19: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest - 4, // 20: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest - 6, // 21: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 1, // 22: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 23: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse - 5, // 24: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 25: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 22, // [22:26] is the sub-list for method output_type - 18, // [18:22] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 13, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp + 13, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp + 14, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host + 15, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost + 16, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey + 17, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity + 14, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host + 15, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost + 16, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey + 17, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity + 14, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host + 15, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost + 16, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey + 17, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity + 18, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group + 13, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp + 13, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp + 18, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group + 11, // 18: sync.v1.GetEncryptedKeyResponse.encrypted_key_info:type_name -> sync.v1.EncryptedKeyInfo + 11, // 19: sync.v1.UpdateEncryptedKeyRequest.update_encrypted_key:type_name -> sync.v1.EncryptedKeyInfo + 0, // 20: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest + 2, // 21: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest + 4, // 22: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest + 6, // 23: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 8, // 24: sync.v1.SyncService.GetEncryptedKey:input_type -> sync.v1.GetEncryptedKeyRequest + 10, // 25: sync.v1.SyncService.UpdateEncryptedKey:input_type -> sync.v1.UpdateEncryptedKeyRequest + 1, // 26: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse + 3, // 27: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 5, // 28: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 29: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 9, // 30: sync.v1.SyncService.GetEncryptedKey:output_type -> sync.v1.GetEncryptedKeyResponse + 12, // 31: sync.v1.SyncService.UpdateEncryptedKey:output_type -> sync.v1.UpdateEncryptedKeyResponse + 26, // [26:32] is the sub-list for method output_type + 20, // [20:26] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_sync_v1_sync_service_proto_init() } @@ -853,6 +1138,66 @@ func file_sync_v1_sync_service_proto_init() { return nil } } + file_sync_v1_sync_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEncryptedKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEncryptedKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateEncryptedKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncryptedKeyInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateEncryptedKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_sync_v1_sync_service_proto_msgTypes[2].OneofWrappers = []interface{}{ (*UpdateRequest_Host)(nil), @@ -872,7 +1217,7 @@ func file_sync_v1_sync_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_sync_service_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index 5151082..c6a88ab 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -171,6 +171,76 @@ func local_request_SyncService_SyncGroup_0(ctx context.Context, marshaler runtim } +var ( + filter_SyncService_GetEncryptedKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_SyncService_GetEncryptedKey_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetEncryptedKeyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_GetEncryptedKey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetEncryptedKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyncService_GetEncryptedKey_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetEncryptedKeyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_GetEncryptedKey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetEncryptedKey(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SyncService_UpdateEncryptedKey_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateEncryptedKeyRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateEncryptedKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyncService_UpdateEncryptedKey_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateEncryptedKeyRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateEncryptedKey(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSyncServiceHandlerServer registers the http handlers for service SyncService to "mux". // UnaryRPC :call SyncServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -277,6 +347,56 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GetEncryptedKey", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_get_encrypted_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SyncService_GetEncryptedKey_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GetEncryptedKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SyncService_UpdateEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateEncryptedKey", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_update_encrypted_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SyncService_UpdateEncryptedKey_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_UpdateEncryptedKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -406,6 +526,50 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GetEncryptedKey", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_get_encrypted_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SyncService_GetEncryptedKey_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GetEncryptedKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SyncService_UpdateEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateEncryptedKey", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_update_encrypted_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SyncService_UpdateEncryptedKey_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_UpdateEncryptedKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -417,6 +581,10 @@ var ( pattern_SyncService_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_group"}, "")) pattern_SyncService_SyncGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_group"}, "")) + + pattern_SyncService_GetEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_get_encrypted_key"}, "")) + + pattern_SyncService_UpdateEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_update_encrypted_key"}, "")) ) var ( @@ -427,4 +595,8 @@ var ( forward_SyncService_UpdateGroup_0 = runtime.ForwardResponseMessage forward_SyncService_SyncGroup_0 = runtime.ForwardResponseMessage + + forward_SyncService_GetEncryptedKey_0 = runtime.ForwardResponseMessage + + forward_SyncService_UpdateEncryptedKey_0 = runtime.ForwardResponseMessage ) diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index b6382fa..6cec0b9 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -63,6 +63,26 @@ export type SyncGroupResponse = { groups?: SyncV1Group.Group[] } +export type GetEncryptedKeyRequest = { + gid?: string +} + +export type GetEncryptedKeyResponse = { + encryptedKeyInfo?: EncryptedKeyInfo +} + +export type UpdateEncryptedKeyRequest = { + updateEncryptedKey?: EncryptedKeyInfo[] +} + +export type EncryptedKeyInfo = { + gid?: string + encryptedKey?: string +} + +export type UpdateEncryptedKeyResponse = { +} + export class SyncService { static Sync(req: SyncRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) @@ -76,4 +96,10 @@ export class SyncService { static SyncGroup(req: SyncGroupRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync_group?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } + static GetEncryptedKey(req: GetEncryptedKeyRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/sync_get_encrypted_key?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + } + static UpdateEncryptedKey(req: UpdateEncryptedKeyRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/sync_update_encrypted_key`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } } \ No newline at end of file diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index 635dc1d..e95b965 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -19,10 +19,12 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - SyncService_Sync_FullMethodName = "/sync.v1.SyncService/Sync" - SyncService_Update_FullMethodName = "/sync.v1.SyncService/Update" - SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" - SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" + SyncService_Sync_FullMethodName = "/sync.v1.SyncService/Sync" + SyncService_Update_FullMethodName = "/sync.v1.SyncService/Update" + SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" + SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" + SyncService_GetEncryptedKey_FullMethodName = "/sync.v1.SyncService/GetEncryptedKey" + SyncService_UpdateEncryptedKey_FullMethodName = "/sync.v1.SyncService/UpdateEncryptedKey" ) // SyncServiceClient is the client API for SyncService service. @@ -33,10 +35,14 @@ type SyncServiceClient interface { Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) - // 更新组信息 + // 更新组信息 如果创建一个新的组,需要同时处理生成新的密钥 UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) + // 获取mater key加密后的解密密钥,对应组 + GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) + // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 + UpdateEncryptedKey(ctx context.Context, in *UpdateEncryptedKeyRequest, opts ...grpc.CallOption) (*UpdateEncryptedKeyResponse, error) } type syncServiceClient struct { @@ -83,6 +89,24 @@ func (c *syncServiceClient) SyncGroup(ctx context.Context, in *SyncGroupRequest, return out, nil } +func (c *syncServiceClient) GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) { + out := new(GetEncryptedKeyResponse) + err := c.cc.Invoke(ctx, SyncService_GetEncryptedKey_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncServiceClient) UpdateEncryptedKey(ctx context.Context, in *UpdateEncryptedKeyRequest, opts ...grpc.CallOption) (*UpdateEncryptedKeyResponse, error) { + out := new(UpdateEncryptedKeyResponse) + err := c.cc.Invoke(ctx, SyncService_UpdateEncryptedKey_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SyncServiceServer is the server API for SyncService service. // All implementations must embed UnimplementedSyncServiceServer // for forward compatibility @@ -91,10 +115,14 @@ type SyncServiceServer interface { Sync(context.Context, *SyncRequest) (*SyncResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 Update(context.Context, *UpdateRequest) (*UpdateResponse, error) - // 更新组信息 + // 更新组信息 如果创建一个新的组,需要同时处理生成新的密钥 UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) + // 获取mater key加密后的解密密钥,对应组 + GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) + // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 + UpdateEncryptedKey(context.Context, *UpdateEncryptedKeyRequest) (*UpdateEncryptedKeyResponse, error) mustEmbedUnimplementedSyncServiceServer() } @@ -114,6 +142,12 @@ func (UnimplementedSyncServiceServer) UpdateGroup(context.Context, *UpdateGroupR func (UnimplementedSyncServiceServer) SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncGroup not implemented") } +func (UnimplementedSyncServiceServer) GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEncryptedKey not implemented") +} +func (UnimplementedSyncServiceServer) UpdateEncryptedKey(context.Context, *UpdateEncryptedKeyRequest) (*UpdateEncryptedKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateEncryptedKey not implemented") +} func (UnimplementedSyncServiceServer) mustEmbedUnimplementedSyncServiceServer() {} // UnsafeSyncServiceServer may be embedded to opt out of forward compatibility for this service. @@ -199,6 +233,42 @@ func _SyncService_SyncGroup_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _SyncService_GetEncryptedKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEncryptedKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncServiceServer).GetEncryptedKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_GetEncryptedKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).GetEncryptedKey(ctx, req.(*GetEncryptedKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncService_UpdateEncryptedKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEncryptedKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncServiceServer).UpdateEncryptedKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_UpdateEncryptedKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).UpdateEncryptedKey(ctx, req.(*UpdateEncryptedKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SyncService_ServiceDesc is the grpc.ServiceDesc for SyncService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -222,6 +292,14 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SyncGroup", Handler: _SyncService_SyncGroup_Handler, }, + { + MethodName: "GetEncryptedKey", + Handler: _SyncService_GetEncryptedKey_Handler, + }, + { + MethodName: "UpdateEncryptedKey", + Handler: _SyncService_UpdateEncryptedKey_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "sync/v1/sync_service.proto", From 91e50bfdcc181684c17148530e16a2f509d789e6 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 10:24:13 +0800 Subject: [PATCH 03/46] feat: UpdateGroup with the arg of master_key --- gen/openapi/sync/v1/sync_service.swagger.json | 10 +- gen/proto/sync/v1/sync_service.pb.go | 245 ++++++++++-------- gen/proto/sync/v1/sync_service.pb.ts | 2 + proto/sync/v1/group.proto | 1 + proto/sync/v1/sync_service.proto | 4 + 5 files changed, 149 insertions(+), 113 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 6ee2c60..235a540 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -573,6 +573,9 @@ "groupId": { "type": "string" }, + "masterKey": { + "type": "string" + }, "host": { "$ref": "#/definitions/v1Host" }, @@ -585,11 +588,16 @@ "identity": { "$ref": "#/definitions/v1Identity" } - } + }, + "title": "如果是用于创建新的组,则提供master_key,用于加密rsa密钥" }, "v1UpdateResponse": { "type": "object", "properties": { + "encryptedKey": { + "type": "string", + "title": "被master_key加密后的密钥,用于解密后续的密文,返回给本地以再次存储。" + }, "host": { "$ref": "#/definitions/v1Host" }, diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 4354d95..ab166ed 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -156,12 +156,14 @@ func (x *SyncResponse) GetIdentitySet() []*Identity { return nil } +// 如果是用于创建新的组,则提供master_key,用于加密rsa密钥 type UpdateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + MasterKey string `protobuf:"bytes,3,opt,name=master_key,json=masterKey,proto3" json:"master_key,omitempty"` // Types that are assignable to Data: // // *UpdateRequest_Host @@ -210,6 +212,13 @@ func (x *UpdateRequest) GetGroupId() string { return "" } +func (x *UpdateRequest) GetMasterKey() string { + if x != nil { + return x.MasterKey + } + return "" +} + func (m *UpdateRequest) GetData() isUpdateRequest_Data { if m != nil { return m.Data @@ -278,6 +287,7 @@ type UpdateResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + EncryptedKey string `protobuf:"bytes,1,opt,name=encrypted_key,json=encryptedKey,proto3" json:"encrypted_key,omitempty"` // 被master_key加密后的密钥,用于解密后续的密文,返回给本地以再次存储。 // Types that are assignable to Data: // // *UpdateResponse_Host @@ -319,6 +329,13 @@ func (*UpdateResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{3} } +func (x *UpdateResponse) GetEncryptedKey() string { + if x != nil { + return x.EncryptedKey + } + return "" +} + func (m *UpdateResponse) GetData() isUpdateResponse_Data { if m != nil { return m.Data @@ -841,121 +858,125 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x34, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0xe9, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0x88, 0x02, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, - 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, - 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, - 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, - 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, - 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, - 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, - 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x11, - 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, - 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, - 0x69, 0x64, 0x22, 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, - 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, - 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x75, 0x70, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, + 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, + 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0xf4, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, + 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, + 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, + 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, + 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, + 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, + 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, + 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, + 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, + 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, + 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x16, 0x47, 0x65, + 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, - 0x22, 0x49, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xaa, 0x05, 0x0a, 0x0b, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, - 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, - 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x82, 0x01, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, - 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, - 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x4b, 0x65, 0x79, 0x22, 0x49, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x22, + 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xaa, 0x05, + 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, + 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, + 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, + 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, + 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, + 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, + 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, + 0x12, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, - 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, - 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, - 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, + 0x2a, 0x22, 0x27, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, + 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, + 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 6cec0b9..2c8527c 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -35,6 +35,7 @@ export type SyncResponse = { type BaseUpdateRequest = { groupId?: string + masterKey?: string } export type UpdateRequest = BaseUpdateRequest @@ -42,6 +43,7 @@ export type UpdateRequest = BaseUpdateRequest type BaseUpdateResponse = { + encryptedKey?: string } export type UpdateResponse = BaseUpdateResponse diff --git a/proto/sync/v1/group.proto b/proto/sync/v1/group.proto index 585f9b2..6acd294 100644 --- a/proto/sync/v1/group.proto +++ b/proto/sync/v1/group.proto @@ -19,4 +19,5 @@ message GroupBasic { string description = 6; string avatar = 7; string uid = 8; // 创建者 + string public_key = 9; // 公钥 这里不存私钥,私钥加密后存在用户手上 } diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index faeedfa..7ad4dd7 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -61,8 +61,10 @@ message SyncResponse { repeated Identity identity_set = 14; } +// 如果是用于创建新的组,则提供master_key,用于加密rsa密钥 message UpdateRequest { string group_id = 2; + string master_key = 3; oneof data { Host host = 11; KnownHost known_host = 12; @@ -72,6 +74,7 @@ message UpdateRequest { } message UpdateResponse { + string encrypted_key = 1; // 被master_key加密后的密钥,用于解密后续的密文,返回给本地以再次存储。 oneof data { // 返回更新数据的服务端版本,因为新建的数据会加上ID和时间 Host host = 11; KnownHost known_host = 12; @@ -82,6 +85,7 @@ message UpdateResponse { message UpdateGroupRequest { Group group = 1; + string master_key = 2; // 创建者指定master_key,用于加密密钥 } message UpdateGroupResponse {} From 5f69ad4f52a171f5348a09e5ffb2c97b671e3379 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 02:27:58 +0000 Subject: [PATCH 04/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 8 + gen/proto/sync/v1/group.pb.go | 25 ++- gen/proto/sync/v1/group.pb.ts | 1 + gen/proto/sync/v1/sync_service.pb.go | 178 +++++++++--------- gen/proto/sync/v1/sync_service.pb.ts | 1 + 5 files changed, 121 insertions(+), 92 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 235a540..5146926 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -310,6 +310,10 @@ "uid": { "type": "string", "title": "创建者" + }, + "publicKey": { + "type": "string", + "title": "公钥 这里不存私钥,私钥加密后存在用户手上" } } }, @@ -561,6 +565,10 @@ "properties": { "group": { "$ref": "#/definitions/v1Group" + }, + "masterKey": { + "type": "string", + "title": "创建者指定master_key,用于加密密钥" } } }, diff --git a/gen/proto/sync/v1/group.pb.go b/gen/proto/sync/v1/group.pb.go index 459d2b1..401f665 100644 --- a/gen/proto/sync/v1/group.pb.go +++ b/gen/proto/sync/v1/group.pb.go @@ -88,7 +88,8 @@ type GroupBasic struct { Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` - Uid string `protobuf:"bytes,8,opt,name=uid,proto3" json:"uid,omitempty"` // 创建者 + Uid string `protobuf:"bytes,8,opt,name=uid,proto3" json:"uid,omitempty"` // 创建者 + PublicKey string `protobuf:"bytes,9,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // 公钥 这里不存私钥,私钥加密后存在用户手上 } func (x *GroupBasic) Reset() { @@ -179,6 +180,13 @@ func (x *GroupBasic) GetUid() string { return "" } +func (x *GroupBasic) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + var File_sync_v1_group_proto protoreflect.FileDescriptor var file_sync_v1_group_proto_rawDesc = []byte{ @@ -191,7 +199,7 @@ var file_sync_v1_group_proto_rawDesc = []byte{ 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0xad, 0x02, 0x0a, 0x0a, + 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0xcc, 0x02, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, @@ -210,12 +218,13 @@ var file_sync_v1_group_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x42, 0x3c, 0x5a, 0x3a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, - 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, + 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, + 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/sync/v1/group.pb.ts b/gen/proto/sync/v1/group.pb.ts index 0ecc0ff..b121fbc 100644 --- a/gen/proto/sync/v1/group.pb.ts +++ b/gen/proto/sync/v1/group.pb.ts @@ -19,4 +19,5 @@ export type GroupBasic = { description?: string avatar?: string uid?: string + publicKey?: string } \ No newline at end of file diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index ab166ed..b67dbfc 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -404,7 +404,8 @@ type UpdateGroupRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + MasterKey string `protobuf:"bytes,2,opt,name=master_key,json=masterKey,proto3" json:"master_key,omitempty"` // 创建者指定master_key,用于加密密钥 } func (x *UpdateGroupRequest) Reset() { @@ -446,6 +447,13 @@ func (x *UpdateGroupRequest) GetGroup() *Group { return nil } +func (x *UpdateGroupRequest) GetMasterKey() string { + if x != nil { + return x.MasterKey + } + return "" +} + type UpdateGroupResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -890,93 +898,95 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, - 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, - 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, - 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, - 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x19, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x22, 0x49, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x22, - 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xaa, 0x05, - 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, - 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, - 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, - 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, - 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, - 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, + 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, + 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, + 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x67, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x47, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x19, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x4b, 0x65, 0x79, 0x22, 0x49, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x1c, + 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xaa, 0x05, 0x0a, + 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, + 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, + 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, + 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, + 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, - 0x12, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, - 0x2a, 0x22, 0x27, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, - 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, + 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, + 0x22, 0x27, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, + 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 2c8527c..cf5036e 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -51,6 +51,7 @@ export type UpdateResponse = BaseUpdateResponse export type UpdateGroupRequest = { group?: SyncV1Group.Group + masterKey?: string } export type UpdateGroupResponse = { From 5d10fef18a4cd4b8d60870f4b4116813078c29d0 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 10:42:17 +0800 Subject: [PATCH 05/46] feat: Gen user's keychain --- proto/sync/v1/sync_service.proto | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 7ad4dd7..5242043 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -34,6 +34,14 @@ service SyncService { option (google.api.http) = {get:"/gapi/sync/v1/sync_group"}; } + // 生成用户密钥对 + rpc GenUserKeyChain(GenUserKeyChainRequest) returns (GenUserKeyChainResponse) { + option (google.api.http) = { + post:"/gapi/sync/v1/gen_user_key_chain" + body: "*" + }; + } + // 获取mater key加密后的解密密钥,对应组 rpc GetEncryptedKey(GetEncryptedKeyRequest) returns (GetEncryptedKeyResponse) { option (google.api.http) = {get:"/gapi/sync/v1/sync_get_encrypted_key"}; @@ -116,4 +124,13 @@ message EncryptedKeyInfo { string encrypted_key = 2; } -message UpdateEncryptedKeyResponse {} \ No newline at end of file +message UpdateEncryptedKeyResponse {} + +message GenUserKeyChainRequest { + string master_key = 1; +} + +message GenUserKeyChainResponse { + string public_key = 2; + string encrypted_private_key = 3; +} \ No newline at end of file From cacb2dd89273c27b0439c02161bddc35a454f70b Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 02:43:04 +0000 Subject: [PATCH 06/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 52 +++ gen/proto/sync/v1/sync_service.pb.go | 315 +++++++++++++----- gen/proto/sync/v1/sync_service.pb.gw.go | 85 +++++ gen/proto/sync/v1/sync_service.pb.ts | 12 + gen/proto/sync/v1/sync_service_grpc.pb.go | 39 +++ 5 files changed, 420 insertions(+), 83 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 5146926..440a3c4 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -16,6 +16,39 @@ "application/json" ], "paths": { + "/gapi/sync/v1/gen_user_key_chain": { + "post": { + "summary": "生成用户密钥对", + "operationId": "SyncService_GenUserKeyChain", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GenUserKeyChainResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GenUserKeyChainRequest" + } + } + ], + "tags": [ + "SyncService" + ] + } + }, "/gapi/sync/v1/sync": { "get": { "summary": "拉取指定时间点之后的配置变动信息", @@ -258,6 +291,25 @@ } } }, + "v1GenUserKeyChainRequest": { + "type": "object", + "properties": { + "masterKey": { + "type": "string" + } + } + }, + "v1GenUserKeyChainResponse": { + "type": "object", + "properties": { + "publicKey": { + "type": "string" + }, + "encryptedPrivateKey": { + "type": "string" + } + } + }, "v1GetEncryptedKeyResponse": { "type": "object", "properties": { diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index b67dbfc..d089a73 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -828,6 +828,108 @@ func (*UpdateEncryptedKeyResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} } +type GenUserKeyChainRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MasterKey string `protobuf:"bytes,1,opt,name=master_key,json=masterKey,proto3" json:"master_key,omitempty"` +} + +func (x *GenUserKeyChainRequest) Reset() { + *x = GenUserKeyChainRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenUserKeyChainRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenUserKeyChainRequest) ProtoMessage() {} + +func (x *GenUserKeyChainRequest) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[13] + 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 GenUserKeyChainRequest.ProtoReflect.Descriptor instead. +func (*GenUserKeyChainRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{13} +} + +func (x *GenUserKeyChainRequest) GetMasterKey() string { + if x != nil { + return x.MasterKey + } + return "" +} + +type GenUserKeyChainResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_private_key,json=encryptedPrivateKey,proto3" json:"encrypted_private_key,omitempty"` +} + +func (x *GenUserKeyChainResponse) Reset() { + *x = GenUserKeyChainResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenUserKeyChainResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenUserKeyChainResponse) ProtoMessage() {} + +func (x *GenUserKeyChainResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[14] + 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 GenUserKeyChainResponse.ProtoReflect.Descriptor instead. +func (*GenUserKeyChainResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{14} +} + +func (x *GenUserKeyChainResponse) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *GenUserKeyChainResponse) GetEncryptedPrivateKey() string { + if x != nil { + return x.EncryptedPrivateKey + } + return "" +} + var File_sync_v1_sync_service_proto protoreflect.FileDescriptor var file_sync_v1_sync_service_proto_rawDesc = []byte{ @@ -939,54 +1041,73 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xaa, 0x05, 0x0a, - 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, - 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, - 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, - 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, - 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, - 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, - 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, - 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, + 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, 0x16, + 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, + 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x32, 0xae, 0x06, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, + 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x5f, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x82, 0x01, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, + 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, - 0x22, 0x27, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, - 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, + 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, + 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, + 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1001,7 +1122,7 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { return file_sync_v1_sync_service_proto_rawDescData } -var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SyncRequest)(nil), // 0: sync.v1.SyncRequest (*SyncResponse)(nil), // 1: sync.v1.SyncResponse @@ -1016,48 +1137,52 @@ var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*UpdateEncryptedKeyRequest)(nil), // 10: sync.v1.UpdateEncryptedKeyRequest (*EncryptedKeyInfo)(nil), // 11: sync.v1.EncryptedKeyInfo (*UpdateEncryptedKeyResponse)(nil), // 12: sync.v1.UpdateEncryptedKeyResponse - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp - (*Host)(nil), // 14: sync.v1.Host - (*KnownHost)(nil), // 15: sync.v1.KnownHost - (*SshKey)(nil), // 16: sync.v1.SshKey - (*Identity)(nil), // 17: sync.v1.Identity - (*Group)(nil), // 18: sync.v1.Group + (*GenUserKeyChainRequest)(nil), // 13: sync.v1.GenUserKeyChainRequest + (*GenUserKeyChainResponse)(nil), // 14: sync.v1.GenUserKeyChainResponse + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*Host)(nil), // 16: sync.v1.Host + (*KnownHost)(nil), // 17: sync.v1.KnownHost + (*SshKey)(nil), // 18: sync.v1.SshKey + (*Identity)(nil), // 19: sync.v1.Identity + (*Group)(nil), // 20: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 13, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp - 13, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp - 14, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host - 15, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost - 16, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey - 17, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity - 14, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host - 15, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost - 16, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey - 17, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity - 14, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host - 15, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost - 16, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey - 17, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity - 18, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group - 13, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 13, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp - 18, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group + 15, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp + 15, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp + 16, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host + 17, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost + 18, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey + 19, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity + 16, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host + 17, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost + 18, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey + 19, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity + 16, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host + 17, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost + 18, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey + 19, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity + 20, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group + 15, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp + 15, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp + 20, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group 11, // 18: sync.v1.GetEncryptedKeyResponse.encrypted_key_info:type_name -> sync.v1.EncryptedKeyInfo 11, // 19: sync.v1.UpdateEncryptedKeyRequest.update_encrypted_key:type_name -> sync.v1.EncryptedKeyInfo 0, // 20: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest 2, // 21: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest 4, // 22: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest 6, // 23: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 8, // 24: sync.v1.SyncService.GetEncryptedKey:input_type -> sync.v1.GetEncryptedKeyRequest - 10, // 25: sync.v1.SyncService.UpdateEncryptedKey:input_type -> sync.v1.UpdateEncryptedKeyRequest - 1, // 26: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 27: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse - 5, // 28: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 29: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 9, // 30: sync.v1.SyncService.GetEncryptedKey:output_type -> sync.v1.GetEncryptedKeyResponse - 12, // 31: sync.v1.SyncService.UpdateEncryptedKey:output_type -> sync.v1.UpdateEncryptedKeyResponse - 26, // [26:32] is the sub-list for method output_type - 20, // [20:26] is the sub-list for method input_type + 13, // 24: sync.v1.SyncService.GenUserKeyChain:input_type -> sync.v1.GenUserKeyChainRequest + 8, // 25: sync.v1.SyncService.GetEncryptedKey:input_type -> sync.v1.GetEncryptedKeyRequest + 10, // 26: sync.v1.SyncService.UpdateEncryptedKey:input_type -> sync.v1.UpdateEncryptedKeyRequest + 1, // 27: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse + 3, // 28: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 5, // 29: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 30: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 14, // 31: sync.v1.SyncService.GenUserKeyChain:output_type -> sync.v1.GenUserKeyChainResponse + 9, // 32: sync.v1.SyncService.GetEncryptedKey:output_type -> sync.v1.GetEncryptedKeyResponse + 12, // 33: sync.v1.SyncService.UpdateEncryptedKey:output_type -> sync.v1.UpdateEncryptedKeyResponse + 27, // [27:34] is the sub-list for method output_type + 20, // [20:27] is the sub-list for method input_type 20, // [20:20] is the sub-list for extension type_name 20, // [20:20] is the sub-list for extension extendee 0, // [0:20] is the sub-list for field type_name @@ -1229,6 +1354,30 @@ func file_sync_v1_sync_service_proto_init() { return nil } } + file_sync_v1_sync_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenUserKeyChainRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenUserKeyChainResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_sync_v1_sync_service_proto_msgTypes[2].OneofWrappers = []interface{}{ (*UpdateRequest_Host)(nil), @@ -1248,7 +1397,7 @@ func file_sync_v1_sync_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_sync_service_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index c6a88ab..4fb8e9e 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -171,6 +171,40 @@ func local_request_SyncService_SyncGroup_0(ctx context.Context, marshaler runtim } +func request_SyncService_GenUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GenUserKeyChainRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GenUserKeyChain(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyncService_GenUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GenUserKeyChainRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GenUserKeyChain(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_SyncService_GetEncryptedKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -347,6 +381,31 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_SyncService_GenUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GenUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/gen_user_key_chain")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SyncService_GenUserKeyChain_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GenUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -526,6 +585,28 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_SyncService_GenUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GenUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/gen_user_key_chain")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SyncService_GenUserKeyChain_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GenUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -582,6 +663,8 @@ var ( pattern_SyncService_SyncGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_group"}, "")) + pattern_SyncService_GenUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "gen_user_key_chain"}, "")) + pattern_SyncService_GetEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_get_encrypted_key"}, "")) pattern_SyncService_UpdateEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_update_encrypted_key"}, "")) @@ -596,6 +679,8 @@ var ( forward_SyncService_SyncGroup_0 = runtime.ForwardResponseMessage + forward_SyncService_GenUserKeyChain_0 = runtime.ForwardResponseMessage + forward_SyncService_GetEncryptedKey_0 = runtime.ForwardResponseMessage forward_SyncService_UpdateEncryptedKey_0 = runtime.ForwardResponseMessage diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index cf5036e..2578a60 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -86,6 +86,15 @@ export type EncryptedKeyInfo = { export type UpdateEncryptedKeyResponse = { } +export type GenUserKeyChainRequest = { + masterKey?: string +} + +export type GenUserKeyChainResponse = { + publicKey?: string + encryptedPrivateKey?: string +} + export class SyncService { static Sync(req: SyncRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) @@ -99,6 +108,9 @@ export class SyncService { static SyncGroup(req: SyncGroupRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync_group?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } + static GenUserKeyChain(req: GenUserKeyChainRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/gen_user_key_chain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } static GetEncryptedKey(req: GetEncryptedKeyRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync_get_encrypted_key?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index e95b965..5b33aee 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -23,6 +23,7 @@ const ( SyncService_Update_FullMethodName = "/sync.v1.SyncService/Update" SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" + SyncService_GenUserKeyChain_FullMethodName = "/sync.v1.SyncService/GenUserKeyChain" SyncService_GetEncryptedKey_FullMethodName = "/sync.v1.SyncService/GetEncryptedKey" SyncService_UpdateEncryptedKey_FullMethodName = "/sync.v1.SyncService/UpdateEncryptedKey" ) @@ -39,6 +40,8 @@ type SyncServiceClient interface { UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) + // 生成用户密钥对 + GenUserKeyChain(ctx context.Context, in *GenUserKeyChainRequest, opts ...grpc.CallOption) (*GenUserKeyChainResponse, error) // 获取mater key加密后的解密密钥,对应组 GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 @@ -89,6 +92,15 @@ func (c *syncServiceClient) SyncGroup(ctx context.Context, in *SyncGroupRequest, return out, nil } +func (c *syncServiceClient) GenUserKeyChain(ctx context.Context, in *GenUserKeyChainRequest, opts ...grpc.CallOption) (*GenUserKeyChainResponse, error) { + out := new(GenUserKeyChainResponse) + err := c.cc.Invoke(ctx, SyncService_GenUserKeyChain_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *syncServiceClient) GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) { out := new(GetEncryptedKeyResponse) err := c.cc.Invoke(ctx, SyncService_GetEncryptedKey_FullMethodName, in, out, opts...) @@ -119,6 +131,8 @@ type SyncServiceServer interface { UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) + // 生成用户密钥对 + GenUserKeyChain(context.Context, *GenUserKeyChainRequest) (*GenUserKeyChainResponse, error) // 获取mater key加密后的解密密钥,对应组 GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 @@ -142,6 +156,9 @@ func (UnimplementedSyncServiceServer) UpdateGroup(context.Context, *UpdateGroupR func (UnimplementedSyncServiceServer) SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncGroup not implemented") } +func (UnimplementedSyncServiceServer) GenUserKeyChain(context.Context, *GenUserKeyChainRequest) (*GenUserKeyChainResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenUserKeyChain not implemented") +} func (UnimplementedSyncServiceServer) GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetEncryptedKey not implemented") } @@ -233,6 +250,24 @@ func _SyncService_SyncGroup_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _SyncService_GenUserKeyChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenUserKeyChainRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncServiceServer).GenUserKeyChain(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_GenUserKeyChain_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).GenUserKeyChain(ctx, req.(*GenUserKeyChainRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SyncService_GetEncryptedKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetEncryptedKeyRequest) if err := dec(in); err != nil { @@ -292,6 +327,10 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SyncGroup", Handler: _SyncService_SyncGroup_Handler, }, + { + MethodName: "GenUserKeyChain", + Handler: _SyncService_GenUserKeyChain_Handler, + }, { MethodName: "GetEncryptedKey", Handler: _SyncService_GetEncryptedKey_Handler, From f8b130226ade72e7f26efd2249bd5615805e93c6 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 10:43:19 +0800 Subject: [PATCH 07/46] fix: Update --- proto/sync/v1/sync_service.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 5242043..87e0853 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -72,7 +72,6 @@ message SyncResponse { // 如果是用于创建新的组,则提供master_key,用于加密rsa密钥 message UpdateRequest { string group_id = 2; - string master_key = 3; oneof data { Host host = 11; KnownHost known_host = 12; From b32263cf665078f1812fb51a0268a01322fd1364 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 02:44:52 +0000 Subject: [PATCH 08/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 3 - gen/proto/sync/v1/sync_service.pb.go | 280 +++++++++--------- gen/proto/sync/v1/sync_service.pb.ts | 1 - 3 files changed, 135 insertions(+), 149 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 440a3c4..3cacf52 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -633,9 +633,6 @@ "groupId": { "type": "string" }, - "masterKey": { - "type": "string" - }, "host": { "$ref": "#/definitions/v1Host" }, diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index d089a73..39c0ed7 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -162,8 +162,7 @@ type UpdateRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - MasterKey string `protobuf:"bytes,3,opt,name=master_key,json=masterKey,proto3" json:"master_key,omitempty"` + GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // Types that are assignable to Data: // // *UpdateRequest_Host @@ -212,13 +211,6 @@ func (x *UpdateRequest) GetGroupId() string { return "" } -func (x *UpdateRequest) GetMasterKey() string { - if x != nil { - return x.MasterKey - } - return "" -} - func (m *UpdateRequest) GetData() isUpdateRequest_Data { if m != nil { return m.Data @@ -968,146 +960,144 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x34, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0x88, 0x02, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0xe9, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, - 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, - 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, - 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0xf4, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, - 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, - 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, - 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, - 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, - 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, - 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, - 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, - 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, - 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, - 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x67, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x47, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x19, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x4b, 0x65, 0x79, 0x22, 0x49, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x1c, - 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, 0x16, - 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, - 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x32, 0xae, 0x06, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, - 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, - 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, + 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, + 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, + 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, + 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, + 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, + 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x22, 0xf4, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, + 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, + 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, + 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, + 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, + 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, + 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, + 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, + 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, + 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x16, 0x47, 0x65, + 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x19, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x4b, 0x65, 0x79, 0x22, 0x49, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x22, + 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, + 0x16, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x32, 0xae, 0x06, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x6e, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x82, 0x01, 0x0a, 0x0f, - 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, - 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x67, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, - 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, - 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x67, 0x61, + 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x82, 0x01, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, + 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, - 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, + 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, + 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, + 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 2578a60..5b33b0b 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -35,7 +35,6 @@ export type SyncResponse = { type BaseUpdateRequest = { groupId?: string - masterKey?: string } export type UpdateRequest = BaseUpdateRequest From 1dcb3a8defcd0d8371995c9fe02956551e1ae2ee Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 11:32:20 +0800 Subject: [PATCH 09/46] feat: GetUserKeyChain --- proto/sync/v1/sync_service.proto | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 87e0853..eff1183 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -42,6 +42,11 @@ service SyncService { }; } + // 获取用户密钥对 + rpc GetUserKeyChain(GetUserKeyChainRequest) returns (GetUserKeyChainResponse) { + option (google.api.http) = {get:"/gapi/sync/v1/get_user_key_chain"}; + } + // 获取mater key加密后的解密密钥,对应组 rpc GetEncryptedKey(GetEncryptedKeyRequest) returns (GetEncryptedKeyResponse) { option (google.api.http) = {get:"/gapi/sync/v1/sync_get_encrypted_key"}; @@ -132,4 +137,11 @@ message GenUserKeyChainRequest { message GenUserKeyChainResponse { string public_key = 2; string encrypted_private_key = 3; +} + +message GetUserKeyChainRequest {} + +message GetUserKeyChainResponse { + string public_key = 2; + string encrypted_private_key = 3; } \ No newline at end of file From d0366edf716ad518b786c291f4d519b2b4736ed7 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 03:33:04 +0000 Subject: [PATCH 10/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 34 ++ gen/proto/sync/v1/sync_service.pb.go | 324 +++++++++++++----- gen/proto/sync/v1/sync_service.pb.gw.go | 69 ++++ gen/proto/sync/v1/sync_service.pb.ts | 11 + gen/proto/sync/v1/sync_service_grpc.pb.go | 39 +++ 5 files changed, 384 insertions(+), 93 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 3cacf52..157bad6 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -49,6 +49,29 @@ ] } }, + "/gapi/sync/v1/get_user_key_chain": { + "get": { + "summary": "获取用户密钥对", + "operationId": "SyncService_GetUserKeyChain", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetUserKeyChainResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "SyncService" + ] + } + }, "/gapi/sync/v1/sync": { "get": { "summary": "拉取指定时间点之后的配置变动信息", @@ -318,6 +341,17 @@ } } }, + "v1GetUserKeyChainResponse": { + "type": "object", + "properties": { + "publicKey": { + "type": "string" + }, + "encryptedPrivateKey": { + "type": "string" + } + } + }, "v1Group": { "type": "object", "properties": { diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 39c0ed7..4ce795c 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -922,6 +922,99 @@ func (x *GenUserKeyChainResponse) GetEncryptedPrivateKey() string { return "" } +type GetUserKeyChainRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetUserKeyChainRequest) Reset() { + *x = GetUserKeyChainRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserKeyChainRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserKeyChainRequest) ProtoMessage() {} + +func (x *GetUserKeyChainRequest) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[15] + 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 GetUserKeyChainRequest.ProtoReflect.Descriptor instead. +func (*GetUserKeyChainRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{15} +} + +type GetUserKeyChainResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_private_key,json=encryptedPrivateKey,proto3" json:"encrypted_private_key,omitempty"` +} + +func (x *GetUserKeyChainResponse) Reset() { + *x = GetUserKeyChainResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserKeyChainResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserKeyChainResponse) ProtoMessage() {} + +func (x *GetUserKeyChainResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[16] + 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 GetUserKeyChainResponse.ProtoReflect.Descriptor instead. +func (*GetUserKeyChainResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{16} +} + +func (x *GetUserKeyChainResponse) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *GetUserKeyChainResponse) GetEncryptedPrivateKey() string { + if x != nil { + return x.EncryptedPrivateKey + } + return "" +} + var File_sync_v1_sync_service_proto protoreflect.FileDescriptor var file_sync_v1_sync_service_proto_rawDesc = []byte{ @@ -1042,62 +1135,79 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x32, 0xae, 0x06, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, - 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, - 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x6e, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x82, 0x01, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, - 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, - 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, - 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, - 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, - 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x4b, 0x65, 0x79, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6c, + 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x32, 0xae, 0x07, 0x0a, + 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, + 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, + 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, + 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, + 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, + 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x7e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, + 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, + 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, + 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1112,7 +1222,7 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { return file_sync_v1_sync_service_proto_rawDescData } -var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SyncRequest)(nil), // 0: sync.v1.SyncRequest (*SyncResponse)(nil), // 1: sync.v1.SyncResponse @@ -1129,32 +1239,34 @@ var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*UpdateEncryptedKeyResponse)(nil), // 12: sync.v1.UpdateEncryptedKeyResponse (*GenUserKeyChainRequest)(nil), // 13: sync.v1.GenUserKeyChainRequest (*GenUserKeyChainResponse)(nil), // 14: sync.v1.GenUserKeyChainResponse - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp - (*Host)(nil), // 16: sync.v1.Host - (*KnownHost)(nil), // 17: sync.v1.KnownHost - (*SshKey)(nil), // 18: sync.v1.SshKey - (*Identity)(nil), // 19: sync.v1.Identity - (*Group)(nil), // 20: sync.v1.Group + (*GetUserKeyChainRequest)(nil), // 15: sync.v1.GetUserKeyChainRequest + (*GetUserKeyChainResponse)(nil), // 16: sync.v1.GetUserKeyChainResponse + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp + (*Host)(nil), // 18: sync.v1.Host + (*KnownHost)(nil), // 19: sync.v1.KnownHost + (*SshKey)(nil), // 20: sync.v1.SshKey + (*Identity)(nil), // 21: sync.v1.Identity + (*Group)(nil), // 22: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 15, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp - 15, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp - 16, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host - 17, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost - 18, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey - 19, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity - 16, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host - 17, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost - 18, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey - 19, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity - 16, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host - 17, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost - 18, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey - 19, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity - 20, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group - 15, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 15, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp - 20, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group + 17, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp + 17, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp + 18, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host + 19, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost + 20, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey + 21, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity + 18, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host + 19, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost + 20, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey + 21, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity + 18, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host + 19, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost + 20, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey + 21, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity + 22, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group + 17, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp + 17, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp + 22, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group 11, // 18: sync.v1.GetEncryptedKeyResponse.encrypted_key_info:type_name -> sync.v1.EncryptedKeyInfo 11, // 19: sync.v1.UpdateEncryptedKeyRequest.update_encrypted_key:type_name -> sync.v1.EncryptedKeyInfo 0, // 20: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest @@ -1162,17 +1274,19 @@ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 4, // 22: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest 6, // 23: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest 13, // 24: sync.v1.SyncService.GenUserKeyChain:input_type -> sync.v1.GenUserKeyChainRequest - 8, // 25: sync.v1.SyncService.GetEncryptedKey:input_type -> sync.v1.GetEncryptedKeyRequest - 10, // 26: sync.v1.SyncService.UpdateEncryptedKey:input_type -> sync.v1.UpdateEncryptedKeyRequest - 1, // 27: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 28: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse - 5, // 29: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 30: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 14, // 31: sync.v1.SyncService.GenUserKeyChain:output_type -> sync.v1.GenUserKeyChainResponse - 9, // 32: sync.v1.SyncService.GetEncryptedKey:output_type -> sync.v1.GetEncryptedKeyResponse - 12, // 33: sync.v1.SyncService.UpdateEncryptedKey:output_type -> sync.v1.UpdateEncryptedKeyResponse - 27, // [27:34] is the sub-list for method output_type - 20, // [20:27] is the sub-list for method input_type + 15, // 25: sync.v1.SyncService.GetUserKeyChain:input_type -> sync.v1.GetUserKeyChainRequest + 8, // 26: sync.v1.SyncService.GetEncryptedKey:input_type -> sync.v1.GetEncryptedKeyRequest + 10, // 27: sync.v1.SyncService.UpdateEncryptedKey:input_type -> sync.v1.UpdateEncryptedKeyRequest + 1, // 28: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse + 3, // 29: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 5, // 30: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 31: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 14, // 32: sync.v1.SyncService.GenUserKeyChain:output_type -> sync.v1.GenUserKeyChainResponse + 16, // 33: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse + 9, // 34: sync.v1.SyncService.GetEncryptedKey:output_type -> sync.v1.GetEncryptedKeyResponse + 12, // 35: sync.v1.SyncService.UpdateEncryptedKey:output_type -> sync.v1.UpdateEncryptedKeyResponse + 28, // [28:36] is the sub-list for method output_type + 20, // [20:28] is the sub-list for method input_type 20, // [20:20] is the sub-list for extension type_name 20, // [20:20] is the sub-list for extension extendee 0, // [0:20] is the sub-list for field type_name @@ -1368,6 +1482,30 @@ func file_sync_v1_sync_service_proto_init() { return nil } } + file_sync_v1_sync_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserKeyChainRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserKeyChainResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_sync_v1_sync_service_proto_msgTypes[2].OneofWrappers = []interface{}{ (*UpdateRequest_Host)(nil), @@ -1387,7 +1525,7 @@ func file_sync_v1_sync_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_sync_service_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index 4fb8e9e..9093267 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -205,6 +205,24 @@ func local_request_SyncService_GenUserKeyChain_0(ctx context.Context, marshaler } +func request_SyncService_GetUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserKeyChainRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetUserKeyChain(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyncService_GetUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserKeyChainRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetUserKeyChain(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_SyncService_GetEncryptedKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -406,6 +424,31 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_SyncService_GetUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GetUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/get_user_key_chain")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SyncService_GetUserKeyChain_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GetUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -607,6 +650,28 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_SyncService_GetUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GetUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/get_user_key_chain")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SyncService_GetUserKeyChain_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GetUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -665,6 +730,8 @@ var ( pattern_SyncService_GenUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "gen_user_key_chain"}, "")) + pattern_SyncService_GetUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "get_user_key_chain"}, "")) + pattern_SyncService_GetEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_get_encrypted_key"}, "")) pattern_SyncService_UpdateEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_update_encrypted_key"}, "")) @@ -681,6 +748,8 @@ var ( forward_SyncService_GenUserKeyChain_0 = runtime.ForwardResponseMessage + forward_SyncService_GetUserKeyChain_0 = runtime.ForwardResponseMessage + forward_SyncService_GetEncryptedKey_0 = runtime.ForwardResponseMessage forward_SyncService_UpdateEncryptedKey_0 = runtime.ForwardResponseMessage diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 5b33b0b..aee75aa 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -94,6 +94,14 @@ export type GenUserKeyChainResponse = { encryptedPrivateKey?: string } +export type GetUserKeyChainRequest = { +} + +export type GetUserKeyChainResponse = { + publicKey?: string + encryptedPrivateKey?: string +} + export class SyncService { static Sync(req: SyncRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) @@ -110,6 +118,9 @@ export class SyncService { static GenUserKeyChain(req: GenUserKeyChainRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/gen_user_key_chain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } + static GetUserKeyChain(req: GetUserKeyChainRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/get_user_key_chain?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + } static GetEncryptedKey(req: GetEncryptedKeyRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync_get_encrypted_key?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index 5b33aee..3e63056 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -24,6 +24,7 @@ const ( SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" SyncService_GenUserKeyChain_FullMethodName = "/sync.v1.SyncService/GenUserKeyChain" + SyncService_GetUserKeyChain_FullMethodName = "/sync.v1.SyncService/GetUserKeyChain" SyncService_GetEncryptedKey_FullMethodName = "/sync.v1.SyncService/GetEncryptedKey" SyncService_UpdateEncryptedKey_FullMethodName = "/sync.v1.SyncService/UpdateEncryptedKey" ) @@ -42,6 +43,8 @@ type SyncServiceClient interface { SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) // 生成用户密钥对 GenUserKeyChain(ctx context.Context, in *GenUserKeyChainRequest, opts ...grpc.CallOption) (*GenUserKeyChainResponse, error) + // 获取用户密钥对 + GetUserKeyChain(ctx context.Context, in *GetUserKeyChainRequest, opts ...grpc.CallOption) (*GetUserKeyChainResponse, error) // 获取mater key加密后的解密密钥,对应组 GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 @@ -101,6 +104,15 @@ func (c *syncServiceClient) GenUserKeyChain(ctx context.Context, in *GenUserKeyC return out, nil } +func (c *syncServiceClient) GetUserKeyChain(ctx context.Context, in *GetUserKeyChainRequest, opts ...grpc.CallOption) (*GetUserKeyChainResponse, error) { + out := new(GetUserKeyChainResponse) + err := c.cc.Invoke(ctx, SyncService_GetUserKeyChain_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *syncServiceClient) GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) { out := new(GetEncryptedKeyResponse) err := c.cc.Invoke(ctx, SyncService_GetEncryptedKey_FullMethodName, in, out, opts...) @@ -133,6 +145,8 @@ type SyncServiceServer interface { SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) // 生成用户密钥对 GenUserKeyChain(context.Context, *GenUserKeyChainRequest) (*GenUserKeyChainResponse, error) + // 获取用户密钥对 + GetUserKeyChain(context.Context, *GetUserKeyChainRequest) (*GetUserKeyChainResponse, error) // 获取mater key加密后的解密密钥,对应组 GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 @@ -159,6 +173,9 @@ func (UnimplementedSyncServiceServer) SyncGroup(context.Context, *SyncGroupReque func (UnimplementedSyncServiceServer) GenUserKeyChain(context.Context, *GenUserKeyChainRequest) (*GenUserKeyChainResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenUserKeyChain not implemented") } +func (UnimplementedSyncServiceServer) GetUserKeyChain(context.Context, *GetUserKeyChainRequest) (*GetUserKeyChainResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserKeyChain not implemented") +} func (UnimplementedSyncServiceServer) GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetEncryptedKey not implemented") } @@ -268,6 +285,24 @@ func _SyncService_GenUserKeyChain_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _SyncService_GetUserKeyChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserKeyChainRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncServiceServer).GetUserKeyChain(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_GetUserKeyChain_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).GetUserKeyChain(ctx, req.(*GetUserKeyChainRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SyncService_GetEncryptedKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetEncryptedKeyRequest) if err := dec(in); err != nil { @@ -331,6 +366,10 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GenUserKeyChain", Handler: _SyncService_GenUserKeyChain_Handler, }, + { + MethodName: "GetUserKeyChain", + Handler: _SyncService_GetUserKeyChain_Handler, + }, { MethodName: "GetEncryptedKey", Handler: _SyncService_GetEncryptedKey_Handler, From ff33f96ff7ce0de4a3e3a761dbd6d6c027f32b60 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 13:27:52 +0800 Subject: [PATCH 11/46] feat: UpdateUserKeyChain --- proto/sync/v1/sync_service.proto | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index eff1183..0ca6543 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -47,6 +47,14 @@ service SyncService { option (google.api.http) = {get:"/gapi/sync/v1/get_user_key_chain"}; } + // 修改用户加密后的私钥 + rpc UpdateUserKeyChain(UpdateUserKeyChainRequest) returns (UpdateUserKeyChainResponse) { + option (google.api.http) = { + post:"/gapi/sync/v1/update_user_key_chain" + body: "*" + }; + } + // 获取mater key加密后的解密密钥,对应组 rpc GetEncryptedKey(GetEncryptedKeyRequest) returns (GetEncryptedKeyResponse) { option (google.api.http) = {get:"/gapi/sync/v1/sync_get_encrypted_key"}; @@ -144,4 +152,14 @@ message GetUserKeyChainRequest {} message GetUserKeyChainResponse { string public_key = 2; string encrypted_private_key = 3; -} \ No newline at end of file +} + +message UpdateUserKeyChainRequest { + string old_master_key = 1; + string new_master_key = 2; +} + +message UpdateUserKeyChainResponse { + string public_key = 2; + string encrypted_private_key = 3; +} From fe899b2231f692e46a9ed420f38ec29e1355c55a Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 05:28:46 +0000 Subject: [PATCH 12/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 55 +++ gen/proto/sync/v1/sync_service.pb.go | 366 +++++++++++++----- gen/proto/sync/v1/sync_service.pb.gw.go | 85 ++++ gen/proto/sync/v1/sync_service.pb.ts | 13 + gen/proto/sync/v1/sync_service_grpc.pb.go | 39 ++ 5 files changed, 455 insertions(+), 103 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 157bad6..e52f77f 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -272,6 +272,39 @@ "SyncService" ] } + }, + "/gapi/sync/v1/update_user_key_chain": { + "post": { + "summary": "修改用户加密后的私钥", + "operationId": "SyncService_UpdateUserKeyChain", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateUserKeyChainResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateUserKeyChainRequest" + } + } + ], + "tags": [ + "SyncService" + ] + } } }, "definitions": { @@ -702,6 +735,28 @@ "$ref": "#/definitions/v1Identity" } } + }, + "v1UpdateUserKeyChainRequest": { + "type": "object", + "properties": { + "oldMasterKey": { + "type": "string" + }, + "newMasterKey": { + "type": "string" + } + } + }, + "v1UpdateUserKeyChainResponse": { + "type": "object", + "properties": { + "publicKey": { + "type": "string" + }, + "encryptedPrivateKey": { + "type": "string" + } + } } } } diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 4ce795c..3d1aba1 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -1015,6 +1015,116 @@ func (x *GetUserKeyChainResponse) GetEncryptedPrivateKey() string { return "" } +type UpdateUserKeyChainRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OldMasterKey string `protobuf:"bytes,1,opt,name=old_master_key,json=oldMasterKey,proto3" json:"old_master_key,omitempty"` + NewMasterKey string `protobuf:"bytes,2,opt,name=new_master_key,json=newMasterKey,proto3" json:"new_master_key,omitempty"` +} + +func (x *UpdateUserKeyChainRequest) Reset() { + *x = UpdateUserKeyChainRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserKeyChainRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserKeyChainRequest) ProtoMessage() {} + +func (x *UpdateUserKeyChainRequest) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[17] + 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 UpdateUserKeyChainRequest.ProtoReflect.Descriptor instead. +func (*UpdateUserKeyChainRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{17} +} + +func (x *UpdateUserKeyChainRequest) GetOldMasterKey() string { + if x != nil { + return x.OldMasterKey + } + return "" +} + +func (x *UpdateUserKeyChainRequest) GetNewMasterKey() string { + if x != nil { + return x.NewMasterKey + } + return "" +} + +type UpdateUserKeyChainResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_private_key,json=encryptedPrivateKey,proto3" json:"encrypted_private_key,omitempty"` +} + +func (x *UpdateUserKeyChainResponse) Reset() { + *x = UpdateUserKeyChainResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserKeyChainResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserKeyChainResponse) ProtoMessage() {} + +func (x *UpdateUserKeyChainResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_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 UpdateUserKeyChainResponse.ProtoReflect.Descriptor instead. +func (*UpdateUserKeyChainResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{18} +} + +func (x *UpdateUserKeyChainResponse) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *UpdateUserKeyChainResponse) GetEncryptedPrivateKey() string { + if x != nil { + return x.EncryptedPrivateKey + } + return "" +} + var File_sync_v1_sync_service_proto protoreflect.FileDescriptor var file_sync_v1_sync_service_proto_rawDesc = []byte{ @@ -1143,71 +1253,93 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x32, 0xae, 0x07, 0x0a, - 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, - 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, - 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, - 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, - 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, - 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, - 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x7e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, - 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, - 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, - 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x67, 0x0a, 0x19, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, + 0x5f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, + 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x4d, 0x61, 0x73, 0x74, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x6f, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x32, 0xbe, 0x08, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, + 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, + 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x7e, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x8d, + 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x82, + 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, + 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, + 0x6b, 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, + 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, + 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1222,7 +1354,7 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { return file_sync_v1_sync_service_proto_rawDescData } -var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SyncRequest)(nil), // 0: sync.v1.SyncRequest (*SyncResponse)(nil), // 1: sync.v1.SyncResponse @@ -1241,32 +1373,34 @@ var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*GenUserKeyChainResponse)(nil), // 14: sync.v1.GenUserKeyChainResponse (*GetUserKeyChainRequest)(nil), // 15: sync.v1.GetUserKeyChainRequest (*GetUserKeyChainResponse)(nil), // 16: sync.v1.GetUserKeyChainResponse - (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp - (*Host)(nil), // 18: sync.v1.Host - (*KnownHost)(nil), // 19: sync.v1.KnownHost - (*SshKey)(nil), // 20: sync.v1.SshKey - (*Identity)(nil), // 21: sync.v1.Identity - (*Group)(nil), // 22: sync.v1.Group + (*UpdateUserKeyChainRequest)(nil), // 17: sync.v1.UpdateUserKeyChainRequest + (*UpdateUserKeyChainResponse)(nil), // 18: sync.v1.UpdateUserKeyChainResponse + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (*Host)(nil), // 20: sync.v1.Host + (*KnownHost)(nil), // 21: sync.v1.KnownHost + (*SshKey)(nil), // 22: sync.v1.SshKey + (*Identity)(nil), // 23: sync.v1.Identity + (*Group)(nil), // 24: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 17, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp - 17, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp - 18, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host - 19, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost - 20, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey - 21, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity - 18, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host - 19, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost - 20, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey - 21, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity - 18, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host - 19, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost - 20, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey - 21, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity - 22, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group - 17, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 17, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp - 22, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group + 19, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp + 19, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp + 20, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host + 21, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost + 22, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey + 23, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity + 20, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host + 21, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost + 22, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey + 23, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity + 20, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host + 21, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost + 22, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey + 23, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity + 24, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group + 19, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp + 19, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp + 24, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group 11, // 18: sync.v1.GetEncryptedKeyResponse.encrypted_key_info:type_name -> sync.v1.EncryptedKeyInfo 11, // 19: sync.v1.UpdateEncryptedKeyRequest.update_encrypted_key:type_name -> sync.v1.EncryptedKeyInfo 0, // 20: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest @@ -1275,18 +1409,20 @@ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 6, // 23: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest 13, // 24: sync.v1.SyncService.GenUserKeyChain:input_type -> sync.v1.GenUserKeyChainRequest 15, // 25: sync.v1.SyncService.GetUserKeyChain:input_type -> sync.v1.GetUserKeyChainRequest - 8, // 26: sync.v1.SyncService.GetEncryptedKey:input_type -> sync.v1.GetEncryptedKeyRequest - 10, // 27: sync.v1.SyncService.UpdateEncryptedKey:input_type -> sync.v1.UpdateEncryptedKeyRequest - 1, // 28: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 29: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse - 5, // 30: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 31: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 14, // 32: sync.v1.SyncService.GenUserKeyChain:output_type -> sync.v1.GenUserKeyChainResponse - 16, // 33: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse - 9, // 34: sync.v1.SyncService.GetEncryptedKey:output_type -> sync.v1.GetEncryptedKeyResponse - 12, // 35: sync.v1.SyncService.UpdateEncryptedKey:output_type -> sync.v1.UpdateEncryptedKeyResponse - 28, // [28:36] is the sub-list for method output_type - 20, // [20:28] is the sub-list for method input_type + 17, // 26: sync.v1.SyncService.UpdateUserKeyChain:input_type -> sync.v1.UpdateUserKeyChainRequest + 8, // 27: sync.v1.SyncService.GetEncryptedKey:input_type -> sync.v1.GetEncryptedKeyRequest + 10, // 28: sync.v1.SyncService.UpdateEncryptedKey:input_type -> sync.v1.UpdateEncryptedKeyRequest + 1, // 29: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse + 3, // 30: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 5, // 31: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 32: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 14, // 33: sync.v1.SyncService.GenUserKeyChain:output_type -> sync.v1.GenUserKeyChainResponse + 16, // 34: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse + 18, // 35: sync.v1.SyncService.UpdateUserKeyChain:output_type -> sync.v1.UpdateUserKeyChainResponse + 9, // 36: sync.v1.SyncService.GetEncryptedKey:output_type -> sync.v1.GetEncryptedKeyResponse + 12, // 37: sync.v1.SyncService.UpdateEncryptedKey:output_type -> sync.v1.UpdateEncryptedKeyResponse + 29, // [29:38] is the sub-list for method output_type + 20, // [20:29] is the sub-list for method input_type 20, // [20:20] is the sub-list for extension type_name 20, // [20:20] is the sub-list for extension extendee 0, // [0:20] is the sub-list for field type_name @@ -1506,6 +1642,30 @@ func file_sync_v1_sync_service_proto_init() { return nil } } + file_sync_v1_sync_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUserKeyChainRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUserKeyChainResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_sync_v1_sync_service_proto_msgTypes[2].OneofWrappers = []interface{}{ (*UpdateRequest_Host)(nil), @@ -1525,7 +1685,7 @@ func file_sync_v1_sync_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_sync_service_proto_rawDesc, NumEnums: 0, - NumMessages: 17, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index 9093267..d9d9931 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -223,6 +223,40 @@ func local_request_SyncService_GetUserKeyChain_0(ctx context.Context, marshaler } +func request_SyncService_UpdateUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateUserKeyChainRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateUserKeyChain(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyncService_UpdateUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateUserKeyChainRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateUserKeyChain(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_SyncService_GetEncryptedKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -449,6 +483,31 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_SyncService_UpdateUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_chain")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SyncService_UpdateUserKeyChain_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_UpdateUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -672,6 +731,28 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_SyncService_UpdateUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_chain")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SyncService_UpdateUserKeyChain_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_UpdateUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -732,6 +813,8 @@ var ( pattern_SyncService_GetUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "get_user_key_chain"}, "")) + pattern_SyncService_UpdateUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_user_key_chain"}, "")) + pattern_SyncService_GetEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_get_encrypted_key"}, "")) pattern_SyncService_UpdateEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_update_encrypted_key"}, "")) @@ -750,6 +833,8 @@ var ( forward_SyncService_GetUserKeyChain_0 = runtime.ForwardResponseMessage + forward_SyncService_UpdateUserKeyChain_0 = runtime.ForwardResponseMessage + forward_SyncService_GetEncryptedKey_0 = runtime.ForwardResponseMessage forward_SyncService_UpdateEncryptedKey_0 = runtime.ForwardResponseMessage diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index aee75aa..883a0b2 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -102,6 +102,16 @@ export type GetUserKeyChainResponse = { encryptedPrivateKey?: string } +export type UpdateUserKeyChainRequest = { + oldMasterKey?: string + newMasterKey?: string +} + +export type UpdateUserKeyChainResponse = { + publicKey?: string + encryptedPrivateKey?: string +} + export class SyncService { static Sync(req: SyncRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) @@ -121,6 +131,9 @@ export class SyncService { static GetUserKeyChain(req: GetUserKeyChainRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/get_user_key_chain?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } + static UpdateUserKeyChain(req: UpdateUserKeyChainRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/update_user_key_chain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } static GetEncryptedKey(req: GetEncryptedKeyRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync_get_encrypted_key?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index 3e63056..c23462a 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -25,6 +25,7 @@ const ( SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" SyncService_GenUserKeyChain_FullMethodName = "/sync.v1.SyncService/GenUserKeyChain" SyncService_GetUserKeyChain_FullMethodName = "/sync.v1.SyncService/GetUserKeyChain" + SyncService_UpdateUserKeyChain_FullMethodName = "/sync.v1.SyncService/UpdateUserKeyChain" SyncService_GetEncryptedKey_FullMethodName = "/sync.v1.SyncService/GetEncryptedKey" SyncService_UpdateEncryptedKey_FullMethodName = "/sync.v1.SyncService/UpdateEncryptedKey" ) @@ -45,6 +46,8 @@ type SyncServiceClient interface { GenUserKeyChain(ctx context.Context, in *GenUserKeyChainRequest, opts ...grpc.CallOption) (*GenUserKeyChainResponse, error) // 获取用户密钥对 GetUserKeyChain(ctx context.Context, in *GetUserKeyChainRequest, opts ...grpc.CallOption) (*GetUserKeyChainResponse, error) + // 修改用户加密后的私钥 + UpdateUserKeyChain(ctx context.Context, in *UpdateUserKeyChainRequest, opts ...grpc.CallOption) (*UpdateUserKeyChainResponse, error) // 获取mater key加密后的解密密钥,对应组 GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 @@ -113,6 +116,15 @@ func (c *syncServiceClient) GetUserKeyChain(ctx context.Context, in *GetUserKeyC return out, nil } +func (c *syncServiceClient) UpdateUserKeyChain(ctx context.Context, in *UpdateUserKeyChainRequest, opts ...grpc.CallOption) (*UpdateUserKeyChainResponse, error) { + out := new(UpdateUserKeyChainResponse) + err := c.cc.Invoke(ctx, SyncService_UpdateUserKeyChain_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *syncServiceClient) GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) { out := new(GetEncryptedKeyResponse) err := c.cc.Invoke(ctx, SyncService_GetEncryptedKey_FullMethodName, in, out, opts...) @@ -147,6 +159,8 @@ type SyncServiceServer interface { GenUserKeyChain(context.Context, *GenUserKeyChainRequest) (*GenUserKeyChainResponse, error) // 获取用户密钥对 GetUserKeyChain(context.Context, *GetUserKeyChainRequest) (*GetUserKeyChainResponse, error) + // 修改用户加密后的私钥 + UpdateUserKeyChain(context.Context, *UpdateUserKeyChainRequest) (*UpdateUserKeyChainResponse, error) // 获取mater key加密后的解密密钥,对应组 GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 @@ -176,6 +190,9 @@ func (UnimplementedSyncServiceServer) GenUserKeyChain(context.Context, *GenUserK func (UnimplementedSyncServiceServer) GetUserKeyChain(context.Context, *GetUserKeyChainRequest) (*GetUserKeyChainResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUserKeyChain not implemented") } +func (UnimplementedSyncServiceServer) UpdateUserKeyChain(context.Context, *UpdateUserKeyChainRequest) (*UpdateUserKeyChainResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUserKeyChain not implemented") +} func (UnimplementedSyncServiceServer) GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetEncryptedKey not implemented") } @@ -303,6 +320,24 @@ func _SyncService_GetUserKeyChain_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _SyncService_UpdateUserKeyChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateUserKeyChainRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncServiceServer).UpdateUserKeyChain(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_UpdateUserKeyChain_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).UpdateUserKeyChain(ctx, req.(*UpdateUserKeyChainRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SyncService_GetEncryptedKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetEncryptedKeyRequest) if err := dec(in); err != nil { @@ -370,6 +405,10 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetUserKeyChain", Handler: _SyncService_GetUserKeyChain_Handler, }, + { + MethodName: "UpdateUserKeyChain", + Handler: _SyncService_UpdateUserKeyChain_Handler, + }, { MethodName: "GetEncryptedKey", Handler: _SyncService_GetEncryptedKey_Handler, From 4713f8f76725def45f353697579dae3ead97279a Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 14:50:51 +0800 Subject: [PATCH 13/46] fix: proto of encrypt --- proto/sync/v1/sync_service.proto | 70 ++++---------------------------- 1 file changed, 9 insertions(+), 61 deletions(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 0ca6543..bd3c97d 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -22,7 +22,7 @@ service SyncService { body: "*" }; } - // 更新组信息 如果创建一个新的组,需要同时处理生成新的密钥 + // 更新组信息 如果创建一个新的组 rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse) { option (google.api.http) = { post:"/gapi/sync/v1/update_group" @@ -33,40 +33,18 @@ service SyncService { rpc SyncGroup(SyncGroupRequest) returns (SyncGroupResponse) { option (google.api.http) = {get:"/gapi/sync/v1/sync_group"}; } - - // 生成用户密钥对 - rpc GenUserKeyChain(GenUserKeyChainRequest) returns (GenUserKeyChainResponse) { - option (google.api.http) = { - post:"/gapi/sync/v1/gen_user_key_chain" - body: "*" - }; - } - // 获取用户密钥对 rpc GetUserKeyChain(GetUserKeyChainRequest) returns (GetUserKeyChainResponse) { option (google.api.http) = {get:"/gapi/sync/v1/get_user_key_chain"}; } - // 修改用户加密后的私钥 + // 修改用户密钥对 rpc UpdateUserKeyChain(UpdateUserKeyChainRequest) returns (UpdateUserKeyChainResponse) { option (google.api.http) = { post:"/gapi/sync/v1/update_user_key_chain" body: "*" }; } - - // 获取mater key加密后的解密密钥,对应组 - rpc GetEncryptedKey(GetEncryptedKeyRequest) returns (GetEncryptedKeyResponse) { - option (google.api.http) = {get:"/gapi/sync/v1/sync_get_encrypted_key"}; - } - - // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 - rpc UpdateEncryptedKey(UpdateEncryptedKeyRequest) returns (UpdateEncryptedKeyResponse) { - option (google.api.http) = { - post:"/gapi/sync/v1/sync_update_encrypted_key" - body: "*" - }; - } } message SyncRequest { @@ -85,6 +63,8 @@ message SyncResponse { // 如果是用于创建新的组,则提供master_key,用于加密rsa密钥 message UpdateRequest { string group_id = 2; + string publicKey = 3; + string encrypted_privateKey = 4; // 创建者的私钥 oneof data { Host host = 11; KnownHost known_host = 12; @@ -105,7 +85,6 @@ message UpdateResponse { message UpdateGroupRequest { Group group = 1; - string master_key = 2; // 创建者指定master_key,用于加密密钥 } message UpdateGroupResponse {} @@ -119,47 +98,16 @@ message SyncGroupResponse { repeated Group groups = 11; } -message GetEncryptedKeyRequest { - string gid = 1; -} - -message GetEncryptedKeyResponse { - EncryptedKeyInfo encrypted_key_info = 1; -} - -message UpdateEncryptedKeyRequest { - repeated EncryptedKeyInfo update_encrypted_key = 1; -} - -message EncryptedKeyInfo { - string gid = 1; - string encrypted_key = 2; -} - -message UpdateEncryptedKeyResponse {} - -message GenUserKeyChainRequest { - string master_key = 1; -} - -message GenUserKeyChainResponse { - string public_key = 2; - string encrypted_private_key = 3; -} - message GetUserKeyChainRequest {} message GetUserKeyChainResponse { - string public_key = 2; - string encrypted_private_key = 3; + string publicKey = 2; + string encrypted_privateKey = 3; } message UpdateUserKeyChainRequest { - string old_master_key = 1; - string new_master_key = 2; + string publicKey = 1; + string encrypted_privateKey = 2; } -message UpdateUserKeyChainResponse { - string public_key = 2; - string encrypted_private_key = 3; -} +message UpdateUserKeyChainResponse {} From 57cc65aa89a57faf2560001bfd71e499af5341e0 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 06:51:54 +0000 Subject: [PATCH 14/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 179 +--- gen/proto/sync/v1/sync_service.pb.go | 906 ++++-------------- gen/proto/sync/v1/sync_service.pb.gw.go | 257 ----- gen/proto/sync/v1/sync_service.pb.ts | 47 +- gen/proto/sync/v1/sync_service_grpc.pb.go | 125 +-- 5 files changed, 221 insertions(+), 1293 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index e52f77f..ea52a59 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -16,39 +16,6 @@ "application/json" ], "paths": { - "/gapi/sync/v1/gen_user_key_chain": { - "post": { - "summary": "生成用户密钥对", - "operationId": "SyncService_GenUserKeyChain", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GenUserKeyChainResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1GenUserKeyChainRequest" - } - } - ], - "tags": [ - "SyncService" - ] - } - }, "/gapi/sync/v1/get_user_key_chain": { "get": { "summary": "获取用户密钥对", @@ -111,37 +78,6 @@ ] } }, - "/gapi/sync/v1/sync_get_encrypted_key": { - "get": { - "summary": "获取mater key加密后的解密密钥,对应组", - "operationId": "SyncService_GetEncryptedKey", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GetEncryptedKeyResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "gid", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "SyncService" - ] - } - }, "/gapi/sync/v1/sync_group": { "get": { "summary": "通过UID获取所有组信息", @@ -174,39 +110,6 @@ ] } }, - "/gapi/sync/v1/sync_update_encrypted_key": { - "post": { - "summary": "更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。", - "operationId": "SyncService_UpdateEncryptedKey", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1UpdateEncryptedKeyResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1UpdateEncryptedKeyRequest" - } - } - ], - "tags": [ - "SyncService" - ] - } - }, "/gapi/sync/v1/update": { "post": { "summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。", @@ -242,7 +145,7 @@ }, "/gapi/sync/v1/update_group": { "post": { - "summary": "更新组信息 如果创建一个新的组,需要同时处理生成新的密钥", + "summary": "更新组信息 如果创建一个新的组", "operationId": "SyncService_UpdateGroup", "responses": { "200": { @@ -275,7 +178,7 @@ }, "/gapi/sync/v1/update_user_key_chain": { "post": { - "summary": "修改用户加密后的私钥", + "summary": "修改用户密钥对", "operationId": "SyncService_UpdateUserKeyChain", "responses": { "200": { @@ -336,44 +239,6 @@ } } }, - "v1EncryptedKeyInfo": { - "type": "object", - "properties": { - "gid": { - "type": "string" - }, - "encryptedKey": { - "type": "string" - } - } - }, - "v1GenUserKeyChainRequest": { - "type": "object", - "properties": { - "masterKey": { - "type": "string" - } - } - }, - "v1GenUserKeyChainResponse": { - "type": "object", - "properties": { - "publicKey": { - "type": "string" - }, - "encryptedPrivateKey": { - "type": "string" - } - } - }, - "v1GetEncryptedKeyResponse": { - "type": "object", - "properties": { - "encryptedKeyInfo": { - "$ref": "#/definitions/v1EncryptedKeyInfo" - } - } - }, "v1GetUserKeyChainResponse": { "type": "object", "properties": { @@ -664,30 +529,11 @@ } } }, - "v1UpdateEncryptedKeyRequest": { - "type": "object", - "properties": { - "updateEncryptedKey": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1EncryptedKeyInfo" - } - } - } - }, - "v1UpdateEncryptedKeyResponse": { - "type": "object" - }, "v1UpdateGroupRequest": { "type": "object", "properties": { "group": { "$ref": "#/definitions/v1Group" - }, - "masterKey": { - "type": "string", - "title": "创建者指定master_key,用于加密密钥" } } }, @@ -700,6 +546,13 @@ "groupId": { "type": "string" }, + "publicKey": { + "type": "string" + }, + "encryptedPrivateKey": { + "type": "string", + "title": "创建者的私钥" + }, "host": { "$ref": "#/definitions/v1Host" }, @@ -737,17 +590,6 @@ } }, "v1UpdateUserKeyChainRequest": { - "type": "object", - "properties": { - "oldMasterKey": { - "type": "string" - }, - "newMasterKey": { - "type": "string" - } - } - }, - "v1UpdateUserKeyChainResponse": { "type": "object", "properties": { "publicKey": { @@ -757,6 +599,9 @@ "type": "string" } } + }, + "v1UpdateUserKeyChainResponse": { + "type": "object" } } } diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 3d1aba1..13aca1b 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -162,7 +162,9 @@ type UpdateRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + PublicKey string `protobuf:"bytes,3,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,4,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` // 创建者的私钥 // Types that are assignable to Data: // // *UpdateRequest_Host @@ -211,6 +213,20 @@ func (x *UpdateRequest) GetGroupId() string { return "" } +func (x *UpdateRequest) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *UpdateRequest) GetEncryptedPrivateKey() string { + if x != nil { + return x.EncryptedPrivateKey + } + return "" +} + func (m *UpdateRequest) GetData() isUpdateRequest_Data { if m != nil { return m.Data @@ -396,8 +412,7 @@ type UpdateGroupRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` - MasterKey string `protobuf:"bytes,2,opt,name=master_key,json=masterKey,proto3" json:"master_key,omitempty"` // 创建者指定master_key,用于加密密钥 + Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` } func (x *UpdateGroupRequest) Reset() { @@ -439,13 +454,6 @@ func (x *UpdateGroupRequest) GetGroup() *Group { return nil } -func (x *UpdateGroupRequest) GetMasterKey() string { - if x != nil { - return x.MasterKey - } - return "" -} - type UpdateGroupResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -586,342 +594,6 @@ func (x *SyncGroupResponse) GetGroups() []*Group { return nil } -type GetEncryptedKeyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` -} - -func (x *GetEncryptedKeyRequest) Reset() { - *x = GetEncryptedKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetEncryptedKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEncryptedKeyRequest) ProtoMessage() {} - -func (x *GetEncryptedKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[8] - 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 GetEncryptedKeyRequest.ProtoReflect.Descriptor instead. -func (*GetEncryptedKeyRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} -} - -func (x *GetEncryptedKeyRequest) GetGid() string { - if x != nil { - return x.Gid - } - return "" -} - -type GetEncryptedKeyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EncryptedKeyInfo *EncryptedKeyInfo `protobuf:"bytes,1,opt,name=encrypted_key_info,json=encryptedKeyInfo,proto3" json:"encrypted_key_info,omitempty"` -} - -func (x *GetEncryptedKeyResponse) Reset() { - *x = GetEncryptedKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetEncryptedKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEncryptedKeyResponse) ProtoMessage() {} - -func (x *GetEncryptedKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[9] - 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 GetEncryptedKeyResponse.ProtoReflect.Descriptor instead. -func (*GetEncryptedKeyResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} -} - -func (x *GetEncryptedKeyResponse) GetEncryptedKeyInfo() *EncryptedKeyInfo { - if x != nil { - return x.EncryptedKeyInfo - } - return nil -} - -type UpdateEncryptedKeyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UpdateEncryptedKey []*EncryptedKeyInfo `protobuf:"bytes,1,rep,name=update_encrypted_key,json=updateEncryptedKey,proto3" json:"update_encrypted_key,omitempty"` -} - -func (x *UpdateEncryptedKeyRequest) Reset() { - *x = UpdateEncryptedKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateEncryptedKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateEncryptedKeyRequest) ProtoMessage() {} - -func (x *UpdateEncryptedKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[10] - 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 UpdateEncryptedKeyRequest.ProtoReflect.Descriptor instead. -func (*UpdateEncryptedKeyRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{10} -} - -func (x *UpdateEncryptedKeyRequest) GetUpdateEncryptedKey() []*EncryptedKeyInfo { - if x != nil { - return x.UpdateEncryptedKey - } - return nil -} - -type EncryptedKeyInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - EncryptedKey string `protobuf:"bytes,2,opt,name=encrypted_key,json=encryptedKey,proto3" json:"encrypted_key,omitempty"` -} - -func (x *EncryptedKeyInfo) Reset() { - *x = EncryptedKeyInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EncryptedKeyInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EncryptedKeyInfo) ProtoMessage() {} - -func (x *EncryptedKeyInfo) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] - 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 EncryptedKeyInfo.ProtoReflect.Descriptor instead. -func (*EncryptedKeyInfo) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} -} - -func (x *EncryptedKeyInfo) GetGid() string { - if x != nil { - return x.Gid - } - return "" -} - -func (x *EncryptedKeyInfo) GetEncryptedKey() string { - if x != nil { - return x.EncryptedKey - } - return "" -} - -type UpdateEncryptedKeyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateEncryptedKeyResponse) Reset() { - *x = UpdateEncryptedKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateEncryptedKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateEncryptedKeyResponse) ProtoMessage() {} - -func (x *UpdateEncryptedKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[12] - 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 UpdateEncryptedKeyResponse.ProtoReflect.Descriptor instead. -func (*UpdateEncryptedKeyResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} -} - -type GenUserKeyChainRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MasterKey string `protobuf:"bytes,1,opt,name=master_key,json=masterKey,proto3" json:"master_key,omitempty"` -} - -func (x *GenUserKeyChainRequest) Reset() { - *x = GenUserKeyChainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenUserKeyChainRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenUserKeyChainRequest) ProtoMessage() {} - -func (x *GenUserKeyChainRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[13] - 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 GenUserKeyChainRequest.ProtoReflect.Descriptor instead. -func (*GenUserKeyChainRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{13} -} - -func (x *GenUserKeyChainRequest) GetMasterKey() string { - if x != nil { - return x.MasterKey - } - return "" -} - -type GenUserKeyChainResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_private_key,json=encryptedPrivateKey,proto3" json:"encrypted_private_key,omitempty"` -} - -func (x *GenUserKeyChainResponse) Reset() { - *x = GenUserKeyChainResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenUserKeyChainResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenUserKeyChainResponse) ProtoMessage() {} - -func (x *GenUserKeyChainResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[14] - 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 GenUserKeyChainResponse.ProtoReflect.Descriptor instead. -func (*GenUserKeyChainResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{14} -} - -func (x *GenUserKeyChainResponse) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *GenUserKeyChainResponse) GetEncryptedPrivateKey() string { - if x != nil { - return x.EncryptedPrivateKey - } - return "" -} - type GetUserKeyChainRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -931,7 +603,7 @@ type GetUserKeyChainRequest struct { func (x *GetUserKeyChainRequest) Reset() { *x = GetUserKeyChainRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[15] + mi := &file_sync_v1_sync_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -944,7 +616,7 @@ func (x *GetUserKeyChainRequest) String() string { func (*GetUserKeyChainRequest) ProtoMessage() {} func (x *GetUserKeyChainRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[15] + mi := &file_sync_v1_sync_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -957,7 +629,7 @@ func (x *GetUserKeyChainRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserKeyChainRequest.ProtoReflect.Descriptor instead. func (*GetUserKeyChainRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{15} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} } type GetUserKeyChainResponse struct { @@ -965,14 +637,14 @@ type GetUserKeyChainResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_private_key,json=encryptedPrivateKey,proto3" json:"encrypted_private_key,omitempty"` + PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` } func (x *GetUserKeyChainResponse) Reset() { *x = GetUserKeyChainResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[16] + mi := &file_sync_v1_sync_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -985,7 +657,7 @@ func (x *GetUserKeyChainResponse) String() string { func (*GetUserKeyChainResponse) ProtoMessage() {} func (x *GetUserKeyChainResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[16] + mi := &file_sync_v1_sync_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -998,7 +670,7 @@ func (x *GetUserKeyChainResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserKeyChainResponse.ProtoReflect.Descriptor instead. func (*GetUserKeyChainResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{16} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} } func (x *GetUserKeyChainResponse) GetPublicKey() string { @@ -1020,14 +692,14 @@ type UpdateUserKeyChainRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - OldMasterKey string `protobuf:"bytes,1,opt,name=old_master_key,json=oldMasterKey,proto3" json:"old_master_key,omitempty"` - NewMasterKey string `protobuf:"bytes,2,opt,name=new_master_key,json=newMasterKey,proto3" json:"new_master_key,omitempty"` + PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` } func (x *UpdateUserKeyChainRequest) Reset() { *x = UpdateUserKeyChainRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[17] + mi := &file_sync_v1_sync_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1040,7 +712,7 @@ func (x *UpdateUserKeyChainRequest) String() string { func (*UpdateUserKeyChainRequest) ProtoMessage() {} func (x *UpdateUserKeyChainRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[17] + mi := &file_sync_v1_sync_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1053,19 +725,19 @@ func (x *UpdateUserKeyChainRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserKeyChainRequest.ProtoReflect.Descriptor instead. func (*UpdateUserKeyChainRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{17} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{10} } -func (x *UpdateUserKeyChainRequest) GetOldMasterKey() string { +func (x *UpdateUserKeyChainRequest) GetPublicKey() string { if x != nil { - return x.OldMasterKey + return x.PublicKey } return "" } -func (x *UpdateUserKeyChainRequest) GetNewMasterKey() string { +func (x *UpdateUserKeyChainRequest) GetEncryptedPrivateKey() string { if x != nil { - return x.NewMasterKey + return x.EncryptedPrivateKey } return "" } @@ -1074,15 +746,12 @@ type UpdateUserKeyChainResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_private_key,json=encryptedPrivateKey,proto3" json:"encrypted_private_key,omitempty"` } func (x *UpdateUserKeyChainResponse) Reset() { *x = UpdateUserKeyChainResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[18] + mi := &file_sync_v1_sync_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1095,7 +764,7 @@ func (x *UpdateUserKeyChainResponse) String() string { func (*UpdateUserKeyChainResponse) ProtoMessage() {} func (x *UpdateUserKeyChainResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[18] + mi := &file_sync_v1_sync_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1108,21 +777,7 @@ func (x *UpdateUserKeyChainResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserKeyChainResponse.ProtoReflect.Descriptor instead. func (*UpdateUserKeyChainResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{18} -} - -func (x *UpdateUserKeyChainResponse) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *UpdateUserKeyChainResponse) GetEncryptedPrivateKey() string { - if x != nil { - return x.EncryptedPrivateKey - } - return "" + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} } var File_sync_v1_sync_service_proto protoreflect.FileDescriptor @@ -1163,183 +818,123 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x34, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0xe9, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0xba, 0x02, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, - 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, - 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, - 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x22, 0xf4, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, - 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, - 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, - 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, - 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x59, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, - 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, - 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, - 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, - 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2a, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x68, 0x0a, 0x19, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x22, 0x49, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x22, - 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, - 0x16, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x73, - 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6c, - 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x67, 0x0a, 0x19, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, - 0x5f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, - 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x4d, 0x61, 0x73, 0x74, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x6f, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, - 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x32, 0xbe, 0x08, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, - 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, - 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, - 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x55, 0x73, 0x65, + 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, + 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, + 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, + 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, + 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, + 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0xf4, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, + 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, + 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, + 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, + 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, + 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x18, 0x0a, 0x16, + 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x7e, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x8d, - 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, + 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x22, 0x6c, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, + 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x22, 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa1, + 0x05, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, + 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, + 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, + 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, + 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x7e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, + 0x12, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x12, 0x8d, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x82, - 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, - 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, - 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, - 0x6b, 0x65, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, - 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, - 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, - 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, + 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1354,7 +949,7 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { return file_sync_v1_sync_service_proto_rawDescData } -var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SyncRequest)(nil), // 0: sync.v1.SyncRequest (*SyncResponse)(nil), // 1: sync.v1.SyncResponse @@ -1364,68 +959,53 @@ var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*UpdateGroupResponse)(nil), // 5: sync.v1.UpdateGroupResponse (*SyncGroupRequest)(nil), // 6: sync.v1.SyncGroupRequest (*SyncGroupResponse)(nil), // 7: sync.v1.SyncGroupResponse - (*GetEncryptedKeyRequest)(nil), // 8: sync.v1.GetEncryptedKeyRequest - (*GetEncryptedKeyResponse)(nil), // 9: sync.v1.GetEncryptedKeyResponse - (*UpdateEncryptedKeyRequest)(nil), // 10: sync.v1.UpdateEncryptedKeyRequest - (*EncryptedKeyInfo)(nil), // 11: sync.v1.EncryptedKeyInfo - (*UpdateEncryptedKeyResponse)(nil), // 12: sync.v1.UpdateEncryptedKeyResponse - (*GenUserKeyChainRequest)(nil), // 13: sync.v1.GenUserKeyChainRequest - (*GenUserKeyChainResponse)(nil), // 14: sync.v1.GenUserKeyChainResponse - (*GetUserKeyChainRequest)(nil), // 15: sync.v1.GetUserKeyChainRequest - (*GetUserKeyChainResponse)(nil), // 16: sync.v1.GetUserKeyChainResponse - (*UpdateUserKeyChainRequest)(nil), // 17: sync.v1.UpdateUserKeyChainRequest - (*UpdateUserKeyChainResponse)(nil), // 18: sync.v1.UpdateUserKeyChainResponse - (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp - (*Host)(nil), // 20: sync.v1.Host - (*KnownHost)(nil), // 21: sync.v1.KnownHost - (*SshKey)(nil), // 22: sync.v1.SshKey - (*Identity)(nil), // 23: sync.v1.Identity - (*Group)(nil), // 24: sync.v1.Group + (*GetUserKeyChainRequest)(nil), // 8: sync.v1.GetUserKeyChainRequest + (*GetUserKeyChainResponse)(nil), // 9: sync.v1.GetUserKeyChainResponse + (*UpdateUserKeyChainRequest)(nil), // 10: sync.v1.UpdateUserKeyChainRequest + (*UpdateUserKeyChainResponse)(nil), // 11: sync.v1.UpdateUserKeyChainResponse + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp + (*Host)(nil), // 13: sync.v1.Host + (*KnownHost)(nil), // 14: sync.v1.KnownHost + (*SshKey)(nil), // 15: sync.v1.SshKey + (*Identity)(nil), // 16: sync.v1.Identity + (*Group)(nil), // 17: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 19, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp - 19, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp - 20, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host - 21, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost - 22, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey - 23, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity - 20, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host - 21, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost - 22, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey - 23, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity - 20, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host - 21, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost - 22, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey - 23, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity - 24, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group - 19, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 19, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp - 24, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group - 11, // 18: sync.v1.GetEncryptedKeyResponse.encrypted_key_info:type_name -> sync.v1.EncryptedKeyInfo - 11, // 19: sync.v1.UpdateEncryptedKeyRequest.update_encrypted_key:type_name -> sync.v1.EncryptedKeyInfo - 0, // 20: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest - 2, // 21: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest - 4, // 22: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest - 6, // 23: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 13, // 24: sync.v1.SyncService.GenUserKeyChain:input_type -> sync.v1.GenUserKeyChainRequest - 15, // 25: sync.v1.SyncService.GetUserKeyChain:input_type -> sync.v1.GetUserKeyChainRequest - 17, // 26: sync.v1.SyncService.UpdateUserKeyChain:input_type -> sync.v1.UpdateUserKeyChainRequest - 8, // 27: sync.v1.SyncService.GetEncryptedKey:input_type -> sync.v1.GetEncryptedKeyRequest - 10, // 28: sync.v1.SyncService.UpdateEncryptedKey:input_type -> sync.v1.UpdateEncryptedKeyRequest - 1, // 29: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 30: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse - 5, // 31: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 32: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 14, // 33: sync.v1.SyncService.GenUserKeyChain:output_type -> sync.v1.GenUserKeyChainResponse - 16, // 34: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse - 18, // 35: sync.v1.SyncService.UpdateUserKeyChain:output_type -> sync.v1.UpdateUserKeyChainResponse - 9, // 36: sync.v1.SyncService.GetEncryptedKey:output_type -> sync.v1.GetEncryptedKeyResponse - 12, // 37: sync.v1.SyncService.UpdateEncryptedKey:output_type -> sync.v1.UpdateEncryptedKeyResponse - 29, // [29:38] is the sub-list for method output_type - 20, // [20:29] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 12, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp + 12, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp + 13, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host + 14, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost + 15, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey + 16, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity + 13, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host + 14, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost + 15, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey + 16, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity + 13, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host + 14, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost + 15, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey + 16, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity + 17, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group + 12, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp + 12, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp + 17, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group + 0, // 18: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest + 2, // 19: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest + 4, // 20: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest + 6, // 21: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 8, // 22: sync.v1.SyncService.GetUserKeyChain:input_type -> sync.v1.GetUserKeyChainRequest + 10, // 23: sync.v1.SyncService.UpdateUserKeyChain:input_type -> sync.v1.UpdateUserKeyChainRequest + 1, // 24: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse + 3, // 25: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 5, // 26: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 27: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 9, // 28: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse + 11, // 29: sync.v1.SyncService.UpdateUserKeyChain:output_type -> sync.v1.UpdateUserKeyChainResponse + 24, // [24:30] is the sub-list for method output_type + 18, // [18:24] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_sync_v1_sync_service_proto_init() } @@ -1535,90 +1115,6 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEncryptedKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEncryptedKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEncryptedKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EncryptedKeyInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateEncryptedKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenUserKeyChainRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenUserKeyChainResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetUserKeyChainRequest); i { case 0: return &v.state @@ -1630,7 +1126,7 @@ func file_sync_v1_sync_service_proto_init() { return nil } } - file_sync_v1_sync_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_sync_v1_sync_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetUserKeyChainResponse); i { case 0: return &v.state @@ -1642,7 +1138,7 @@ func file_sync_v1_sync_service_proto_init() { return nil } } - file_sync_v1_sync_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_sync_v1_sync_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateUserKeyChainRequest); i { case 0: return &v.state @@ -1654,7 +1150,7 @@ func file_sync_v1_sync_service_proto_init() { return nil } } - file_sync_v1_sync_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_sync_v1_sync_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateUserKeyChainResponse); i { case 0: return &v.state @@ -1685,7 +1181,7 @@ func file_sync_v1_sync_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_sync_service_proto_rawDesc, NumEnums: 0, - NumMessages: 19, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index d9d9931..4741e1d 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -171,40 +171,6 @@ func local_request_SyncService_SyncGroup_0(ctx context.Context, marshaler runtim } -func request_SyncService_GenUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenUserKeyChainRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GenUserKeyChain(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SyncService_GenUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenUserKeyChainRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GenUserKeyChain(ctx, &protoReq) - return msg, metadata, err - -} - func request_SyncService_GetUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetUserKeyChainRequest var metadata runtime.ServerMetadata @@ -257,76 +223,6 @@ func local_request_SyncService_UpdateUserKeyChain_0(ctx context.Context, marshal } -var ( - filter_SyncService_GetEncryptedKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SyncService_GetEncryptedKey_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetEncryptedKeyRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_GetEncryptedKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetEncryptedKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SyncService_GetEncryptedKey_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetEncryptedKeyRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_GetEncryptedKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetEncryptedKey(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SyncService_UpdateEncryptedKey_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateEncryptedKeyRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UpdateEncryptedKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SyncService_UpdateEncryptedKey_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateEncryptedKeyRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UpdateEncryptedKey(ctx, &protoReq) - return msg, metadata, err - -} - // RegisterSyncServiceHandlerServer registers the http handlers for service SyncService to "mux". // UnaryRPC :call SyncServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -433,31 +329,6 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_SyncService_GenUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GenUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/gen_user_key_chain")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SyncService_GenUserKeyChain_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GenUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_SyncService_GetUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -508,56 +379,6 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GetEncryptedKey", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_get_encrypted_key")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SyncService_GetEncryptedKey_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GetEncryptedKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SyncService_UpdateEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateEncryptedKey", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_update_encrypted_key")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SyncService_UpdateEncryptedKey_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_UpdateEncryptedKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -687,28 +508,6 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_SyncService_GenUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GenUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/gen_user_key_chain")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SyncService_GenUserKeyChain_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GenUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_SyncService_GetUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -753,50 +552,6 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_SyncService_GetEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GetEncryptedKey", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_get_encrypted_key")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SyncService_GetEncryptedKey_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GetEncryptedKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SyncService_UpdateEncryptedKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateEncryptedKey", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_update_encrypted_key")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SyncService_UpdateEncryptedKey_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_UpdateEncryptedKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -809,15 +564,9 @@ var ( pattern_SyncService_SyncGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_group"}, "")) - pattern_SyncService_GenUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "gen_user_key_chain"}, "")) - pattern_SyncService_GetUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "get_user_key_chain"}, "")) pattern_SyncService_UpdateUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_user_key_chain"}, "")) - - pattern_SyncService_GetEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_get_encrypted_key"}, "")) - - pattern_SyncService_UpdateEncryptedKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_update_encrypted_key"}, "")) ) var ( @@ -829,13 +578,7 @@ var ( forward_SyncService_SyncGroup_0 = runtime.ForwardResponseMessage - forward_SyncService_GenUserKeyChain_0 = runtime.ForwardResponseMessage - forward_SyncService_GetUserKeyChain_0 = runtime.ForwardResponseMessage forward_SyncService_UpdateUserKeyChain_0 = runtime.ForwardResponseMessage - - forward_SyncService_GetEncryptedKey_0 = runtime.ForwardResponseMessage - - forward_SyncService_UpdateEncryptedKey_0 = runtime.ForwardResponseMessage ) diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 883a0b2..6993d1c 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -35,6 +35,8 @@ export type SyncResponse = { type BaseUpdateRequest = { groupId?: string + publicKey?: string + encryptedPrivateKey?: string } export type UpdateRequest = BaseUpdateRequest @@ -50,7 +52,6 @@ export type UpdateResponse = BaseUpdateResponse export type UpdateGroupRequest = { group?: SyncV1Group.Group - masterKey?: string } export type UpdateGroupResponse = { @@ -65,35 +66,6 @@ export type SyncGroupResponse = { groups?: SyncV1Group.Group[] } -export type GetEncryptedKeyRequest = { - gid?: string -} - -export type GetEncryptedKeyResponse = { - encryptedKeyInfo?: EncryptedKeyInfo -} - -export type UpdateEncryptedKeyRequest = { - updateEncryptedKey?: EncryptedKeyInfo[] -} - -export type EncryptedKeyInfo = { - gid?: string - encryptedKey?: string -} - -export type UpdateEncryptedKeyResponse = { -} - -export type GenUserKeyChainRequest = { - masterKey?: string -} - -export type GenUserKeyChainResponse = { - publicKey?: string - encryptedPrivateKey?: string -} - export type GetUserKeyChainRequest = { } @@ -103,13 +75,11 @@ export type GetUserKeyChainResponse = { } export type UpdateUserKeyChainRequest = { - oldMasterKey?: string - newMasterKey?: string + publicKey?: string + encryptedPrivateKey?: string } export type UpdateUserKeyChainResponse = { - publicKey?: string - encryptedPrivateKey?: string } export class SyncService { @@ -125,19 +95,10 @@ export class SyncService { static SyncGroup(req: SyncGroupRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync_group?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } - static GenUserKeyChain(req: GenUserKeyChainRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/gen_user_key_chain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } static GetUserKeyChain(req: GetUserKeyChainRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/get_user_key_chain?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } static UpdateUserKeyChain(req: UpdateUserKeyChainRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/update_user_key_chain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } - static GetEncryptedKey(req: GetEncryptedKeyRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/sync_get_encrypted_key?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) - } - static UpdateEncryptedKey(req: UpdateEncryptedKeyRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/sync_update_encrypted_key`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } } \ No newline at end of file diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index c23462a..bbcf940 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -23,11 +23,8 @@ const ( SyncService_Update_FullMethodName = "/sync.v1.SyncService/Update" SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" - SyncService_GenUserKeyChain_FullMethodName = "/sync.v1.SyncService/GenUserKeyChain" SyncService_GetUserKeyChain_FullMethodName = "/sync.v1.SyncService/GetUserKeyChain" SyncService_UpdateUserKeyChain_FullMethodName = "/sync.v1.SyncService/UpdateUserKeyChain" - SyncService_GetEncryptedKey_FullMethodName = "/sync.v1.SyncService/GetEncryptedKey" - SyncService_UpdateEncryptedKey_FullMethodName = "/sync.v1.SyncService/UpdateEncryptedKey" ) // SyncServiceClient is the client API for SyncService service. @@ -38,20 +35,14 @@ type SyncServiceClient interface { Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) - // 更新组信息 如果创建一个新的组,需要同时处理生成新的密钥 + // 更新组信息 如果创建一个新的组 UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) - // 生成用户密钥对 - GenUserKeyChain(ctx context.Context, in *GenUserKeyChainRequest, opts ...grpc.CallOption) (*GenUserKeyChainResponse, error) // 获取用户密钥对 GetUserKeyChain(ctx context.Context, in *GetUserKeyChainRequest, opts ...grpc.CallOption) (*GetUserKeyChainResponse, error) - // 修改用户加密后的私钥 + // 修改用户密钥对 UpdateUserKeyChain(ctx context.Context, in *UpdateUserKeyChainRequest, opts ...grpc.CallOption) (*UpdateUserKeyChainResponse, error) - // 获取mater key加密后的解密密钥,对应组 - GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) - // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 - UpdateEncryptedKey(ctx context.Context, in *UpdateEncryptedKeyRequest, opts ...grpc.CallOption) (*UpdateEncryptedKeyResponse, error) } type syncServiceClient struct { @@ -98,15 +89,6 @@ func (c *syncServiceClient) SyncGroup(ctx context.Context, in *SyncGroupRequest, return out, nil } -func (c *syncServiceClient) GenUserKeyChain(ctx context.Context, in *GenUserKeyChainRequest, opts ...grpc.CallOption) (*GenUserKeyChainResponse, error) { - out := new(GenUserKeyChainResponse) - err := c.cc.Invoke(ctx, SyncService_GenUserKeyChain_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *syncServiceClient) GetUserKeyChain(ctx context.Context, in *GetUserKeyChainRequest, opts ...grpc.CallOption) (*GetUserKeyChainResponse, error) { out := new(GetUserKeyChainResponse) err := c.cc.Invoke(ctx, SyncService_GetUserKeyChain_FullMethodName, in, out, opts...) @@ -125,24 +107,6 @@ func (c *syncServiceClient) UpdateUserKeyChain(ctx context.Context, in *UpdateUs return out, nil } -func (c *syncServiceClient) GetEncryptedKey(ctx context.Context, in *GetEncryptedKeyRequest, opts ...grpc.CallOption) (*GetEncryptedKeyResponse, error) { - out := new(GetEncryptedKeyResponse) - err := c.cc.Invoke(ctx, SyncService_GetEncryptedKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncServiceClient) UpdateEncryptedKey(ctx context.Context, in *UpdateEncryptedKeyRequest, opts ...grpc.CallOption) (*UpdateEncryptedKeyResponse, error) { - out := new(UpdateEncryptedKeyResponse) - err := c.cc.Invoke(ctx, SyncService_UpdateEncryptedKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // SyncServiceServer is the server API for SyncService service. // All implementations must embed UnimplementedSyncServiceServer // for forward compatibility @@ -151,20 +115,14 @@ type SyncServiceServer interface { Sync(context.Context, *SyncRequest) (*SyncResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 Update(context.Context, *UpdateRequest) (*UpdateResponse, error) - // 更新组信息 如果创建一个新的组,需要同时处理生成新的密钥 + // 更新组信息 如果创建一个新的组 UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) - // 生成用户密钥对 - GenUserKeyChain(context.Context, *GenUserKeyChainRequest) (*GenUserKeyChainResponse, error) // 获取用户密钥对 GetUserKeyChain(context.Context, *GetUserKeyChainRequest) (*GetUserKeyChainResponse, error) - // 修改用户加密后的私钥 + // 修改用户密钥对 UpdateUserKeyChain(context.Context, *UpdateUserKeyChainRequest) (*UpdateUserKeyChainResponse, error) - // 获取mater key加密后的解密密钥,对应组 - GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) - // 更新mater key后修改加密后密钥,提交多组上去,将全部相关信息修改,不能有缺失。 - UpdateEncryptedKey(context.Context, *UpdateEncryptedKeyRequest) (*UpdateEncryptedKeyResponse, error) mustEmbedUnimplementedSyncServiceServer() } @@ -184,21 +142,12 @@ func (UnimplementedSyncServiceServer) UpdateGroup(context.Context, *UpdateGroupR func (UnimplementedSyncServiceServer) SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncGroup not implemented") } -func (UnimplementedSyncServiceServer) GenUserKeyChain(context.Context, *GenUserKeyChainRequest) (*GenUserKeyChainResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenUserKeyChain not implemented") -} func (UnimplementedSyncServiceServer) GetUserKeyChain(context.Context, *GetUserKeyChainRequest) (*GetUserKeyChainResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUserKeyChain not implemented") } func (UnimplementedSyncServiceServer) UpdateUserKeyChain(context.Context, *UpdateUserKeyChainRequest) (*UpdateUserKeyChainResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUserKeyChain not implemented") } -func (UnimplementedSyncServiceServer) GetEncryptedKey(context.Context, *GetEncryptedKeyRequest) (*GetEncryptedKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetEncryptedKey not implemented") -} -func (UnimplementedSyncServiceServer) UpdateEncryptedKey(context.Context, *UpdateEncryptedKeyRequest) (*UpdateEncryptedKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateEncryptedKey not implemented") -} func (UnimplementedSyncServiceServer) mustEmbedUnimplementedSyncServiceServer() {} // UnsafeSyncServiceServer may be embedded to opt out of forward compatibility for this service. @@ -284,24 +233,6 @@ func _SyncService_SyncGroup_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -func _SyncService_GenUserKeyChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenUserKeyChainRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncServiceServer).GenUserKeyChain(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SyncService_GenUserKeyChain_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).GenUserKeyChain(ctx, req.(*GenUserKeyChainRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _SyncService_GetUserKeyChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetUserKeyChainRequest) if err := dec(in); err != nil { @@ -338,42 +269,6 @@ func _SyncService_UpdateUserKeyChain_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _SyncService_GetEncryptedKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetEncryptedKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncServiceServer).GetEncryptedKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SyncService_GetEncryptedKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).GetEncryptedKey(ctx, req.(*GetEncryptedKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncService_UpdateEncryptedKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateEncryptedKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncServiceServer).UpdateEncryptedKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SyncService_UpdateEncryptedKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).UpdateEncryptedKey(ctx, req.(*UpdateEncryptedKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - // SyncService_ServiceDesc is the grpc.ServiceDesc for SyncService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -397,10 +292,6 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SyncGroup", Handler: _SyncService_SyncGroup_Handler, }, - { - MethodName: "GenUserKeyChain", - Handler: _SyncService_GenUserKeyChain_Handler, - }, { MethodName: "GetUserKeyChain", Handler: _SyncService_GetUserKeyChain_Handler, @@ -409,14 +300,6 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateUserKeyChain", Handler: _SyncService_UpdateUserKeyChain_Handler, }, - { - MethodName: "GetEncryptedKey", - Handler: _SyncService_GetEncryptedKey_Handler, - }, - { - MethodName: "UpdateEncryptedKey", - Handler: _SyncService_UpdateEncryptedKey_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "sync/v1/sync_service.proto", From c04cebca4941df6535dfb3b18e56453647019a08 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 14:57:20 +0800 Subject: [PATCH 15/46] style: format --- proto/sync/v1/group.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/sync/v1/group.proto b/proto/sync/v1/group.proto index 6acd294..4ff1d55 100644 --- a/proto/sync/v1/group.proto +++ b/proto/sync/v1/group.proto @@ -19,5 +19,5 @@ message GroupBasic { string description = 6; string avatar = 7; string uid = 8; // 创建者 - string public_key = 9; // 公钥 这里不存私钥,私钥加密后存在用户手上 + string publicKey = 9; // 公钥 这里不存私钥,私钥加密后存在用户手上 } From d2970affc8825d2340b49f0203a7dcc464d4b499 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 06:58:47 +0000 Subject: [PATCH 16/46] update: automatic generate new proto --- gen/proto/sync/v1/group.pb.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gen/proto/sync/v1/group.pb.go b/gen/proto/sync/v1/group.pb.go index 401f665..564c04c 100644 --- a/gen/proto/sync/v1/group.pb.go +++ b/gen/proto/sync/v1/group.pb.go @@ -88,8 +88,8 @@ type GroupBasic struct { Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` - Uid string `protobuf:"bytes,8,opt,name=uid,proto3" json:"uid,omitempty"` // 创建者 - PublicKey string `protobuf:"bytes,9,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // 公钥 这里不存私钥,私钥加密后存在用户手上 + Uid string `protobuf:"bytes,8,opt,name=uid,proto3" json:"uid,omitempty"` // 创建者 + PublicKey string `protobuf:"bytes,9,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // 公钥 这里不存私钥,私钥加密后存在用户手上 } func (x *GroupBasic) Reset() { @@ -199,7 +199,7 @@ var file_sync_v1_group_proto_rawDesc = []byte{ 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0xcc, 0x02, 0x0a, 0x0a, + 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0xcb, 0x02, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, @@ -218,13 +218,13 @@ var file_sync_v1_group_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, - 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, + 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 4cf43e2441b853fcdcd32b5c58276f8ef7956058 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 16:48:40 +0800 Subject: [PATCH 17/46] fix: delete params --- proto/sync/v1/sync_service.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index bd3c97d..61da603 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -22,7 +22,7 @@ service SyncService { body: "*" }; } - // 更新组信息 如果创建一个新的组 + // 更新组信息,如果是创建组的请求则同时处理密钥 rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse) { option (google.api.http) = { post:"/gapi/sync/v1/update_group" @@ -74,7 +74,6 @@ message UpdateRequest { } message UpdateResponse { - string encrypted_key = 1; // 被master_key加密后的密钥,用于解密后续的密文,返回给本地以再次存储。 oneof data { // 返回更新数据的服务端版本,因为新建的数据会加上ID和时间 Host host = 11; KnownHost known_host = 12; From 35503abebd9bcf0f1c9c823281632a55ab6a2b72 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 08:49:22 +0000 Subject: [PATCH 18/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 6 +- gen/proto/sync/v1/sync_service.pb.go | 200 +++++++++--------- gen/proto/sync/v1/sync_service.pb.ts | 1 - gen/proto/sync/v1/sync_service_grpc.pb.go | 4 +- 4 files changed, 98 insertions(+), 113 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index ea52a59..7055580 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -145,7 +145,7 @@ }, "/gapi/sync/v1/update_group": { "post": { - "summary": "更新组信息 如果创建一个新的组", + "summary": "更新组信息,如果是创建组的请求则同时处理密钥", "operationId": "SyncService_UpdateGroup", "responses": { "200": { @@ -571,10 +571,6 @@ "v1UpdateResponse": { "type": "object", "properties": { - "encryptedKey": { - "type": "string", - "title": "被master_key加密后的密钥,用于解密后续的密文,返回给本地以再次存储。" - }, "host": { "$ref": "#/definitions/v1Host" }, diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 13aca1b..7cf23e3 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -295,7 +295,6 @@ type UpdateResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - EncryptedKey string `protobuf:"bytes,1,opt,name=encrypted_key,json=encryptedKey,proto3" json:"encrypted_key,omitempty"` // 被master_key加密后的密钥,用于解密后续的密文,返回给本地以再次存储。 // Types that are assignable to Data: // // *UpdateResponse_Host @@ -337,13 +336,6 @@ func (*UpdateResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{3} } -func (x *UpdateResponse) GetEncryptedKey() string { - if x != nil { - return x.EncryptedKey - } - return "" -} - func (m *UpdateResponse) GetData() isUpdateResponse_Data { if m != nil { return m.Data @@ -838,103 +830,101 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0xf4, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, - 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, - 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, - 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, - 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, - 0x65, 0x72, 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x18, 0x0a, 0x16, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, - 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x22, 0x6c, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, - 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x22, 0x1c, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa1, - 0x05, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, - 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, - 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, - 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, - 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x7e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, - 0x12, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x12, 0x8d, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, - 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, - 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, + 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, + 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, + 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, + 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x78, 0x0a, + 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x6a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x6c, 0x0a, + 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa1, 0x05, 0x0a, 0x0b, 0x53, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, + 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, + 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x7e, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x8d, 0x01, + 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x42, 0x3c, 0x5a, + 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, + 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 6993d1c..7efdf4e 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -44,7 +44,6 @@ export type UpdateRequest = BaseUpdateRequest type BaseUpdateResponse = { - encryptedKey?: string } export type UpdateResponse = BaseUpdateResponse diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index bbcf940..6ffdf7a 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -35,7 +35,7 @@ type SyncServiceClient interface { Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) - // 更新组信息 如果创建一个新的组 + // 更新组信息,如果是创建组的请求则同时处理密钥 UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) @@ -115,7 +115,7 @@ type SyncServiceServer interface { Sync(context.Context, *SyncRequest) (*SyncResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 Update(context.Context, *UpdateRequest) (*UpdateResponse, error) - // 更新组信息 如果创建一个新的组 + // 更新组信息,如果是创建组的请求则同时处理密钥 UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) From 9d92abadb754d2fb83eafc77e842fcd0cabb94ed Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 16:52:08 +0800 Subject: [PATCH 19/46] docs: comment --- proto/sync/v1/group.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/sync/v1/group.proto b/proto/sync/v1/group.proto index 4ff1d55..1b707f9 100644 --- a/proto/sync/v1/group.proto +++ b/proto/sync/v1/group.proto @@ -19,5 +19,5 @@ message GroupBasic { string description = 6; string avatar = 7; string uid = 8; // 创建者 - string publicKey = 9; // 公钥 这里不存私钥,私钥加密后存在用户手上 + string publicKey = 9; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 } From 320854763ce6e71702f681b4644a59727f2afd25 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 08:52:56 +0000 Subject: [PATCH 20/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 2 +- gen/proto/sync/v1/group.pb.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 7055580..c62dd1d 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -297,7 +297,7 @@ }, "publicKey": { "type": "string", - "title": "公钥 这里不存私钥,私钥加密后存在用户手上" + "title": "公钥,公钥存在服务器上,加密的私钥与相关用户关联存储" } } }, diff --git a/gen/proto/sync/v1/group.pb.go b/gen/proto/sync/v1/group.pb.go index 564c04c..2f48ffe 100644 --- a/gen/proto/sync/v1/group.pb.go +++ b/gen/proto/sync/v1/group.pb.go @@ -89,7 +89,7 @@ type GroupBasic struct { Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` Uid string `protobuf:"bytes,8,opt,name=uid,proto3" json:"uid,omitempty"` // 创建者 - PublicKey string `protobuf:"bytes,9,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // 公钥 这里不存私钥,私钥加密后存在用户手上 + PublicKey string `protobuf:"bytes,9,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 } func (x *GroupBasic) Reset() { From 0d55edef54e3ba85a1ccabca7a2cccbfd9ad3f56 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 20:06:52 +0800 Subject: [PATCH 21/46] fix: UpdateUserKeyChain --- proto/sync/v1/group.proto | 2 +- proto/sync/v1/sync_service.proto | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/proto/sync/v1/group.proto b/proto/sync/v1/group.proto index 1b707f9..b4d6117 100644 --- a/proto/sync/v1/group.proto +++ b/proto/sync/v1/group.proto @@ -19,5 +19,5 @@ message GroupBasic { string description = 6; string avatar = 7; string uid = 8; // 创建者 - string publicKey = 9; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 + string publicKey = 9; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 } diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 61da603..19e20cb 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -38,7 +38,7 @@ service SyncService { option (google.api.http) = {get:"/gapi/sync/v1/get_user_key_chain"}; } - // 修改用户密钥对 + // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 rpc UpdateUserKeyChain(UpdateUserKeyChainRequest) returns (UpdateUserKeyChainResponse) { option (google.api.http) = { post:"/gapi/sync/v1/update_user_key_chain" @@ -105,8 +105,14 @@ message GetUserKeyChainResponse { } message UpdateUserKeyChainRequest { - string publicKey = 1; - string encrypted_privateKey = 2; + string publicKey = 2; + string encrypted_privateKey = 3; + repeated UserKeyWallet user_key_wallet_set = 4; +} + +message UserKeyWallet { + string gid = 1; + string encrypted_group_privateKey = 2; } message UpdateUserKeyChainResponse {} From e5d0a21cc32c9232b4a1df89203b8321433b4f4c Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 6 Nov 2023 22:51:41 +0800 Subject: [PATCH 22/46] fix: GetUserKeyChain --- proto/sync/v1/sync_service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 19e20cb..1099297 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -37,7 +37,6 @@ service SyncService { rpc GetUserKeyChain(GetUserKeyChainRequest) returns (GetUserKeyChainResponse) { option (google.api.http) = {get:"/gapi/sync/v1/get_user_key_chain"}; } - // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 rpc UpdateUserKeyChain(UpdateUserKeyChainRequest) returns (UpdateUserKeyChainResponse) { option (google.api.http) = { @@ -102,6 +101,7 @@ message GetUserKeyChainRequest {} message GetUserKeyChainResponse { string publicKey = 2; string encrypted_privateKey = 3; + repeated UserKeyWallet user_key_wallet_set = 4; } message UpdateUserKeyChainRequest { From 0114f3a1e7418748b0e5ef88c38fbabb96b36480 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 6 Nov 2023 14:54:00 +0000 Subject: [PATCH 23/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 27 +- gen/proto/sync/v1/sync_service.pb.go | 329 ++++++++++++------ gen/proto/sync/v1/sync_service.pb.ts | 7 + gen/proto/sync/v1/sync_service_grpc.pb.go | 4 +- 4 files changed, 250 insertions(+), 117 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index c62dd1d..a9956a1 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -178,7 +178,7 @@ }, "/gapi/sync/v1/update_user_key_chain": { "post": { - "summary": "修改用户密钥对", + "summary": "修改用户密钥对,修改的时候所有相关组的加密密钥均要替换", "operationId": "SyncService_UpdateUserKeyChain", "responses": { "200": { @@ -247,6 +247,13 @@ }, "encryptedPrivateKey": { "type": "string" + }, + "userKeyWalletSet": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UserKeyWallet" + } } } }, @@ -593,11 +600,29 @@ }, "encryptedPrivateKey": { "type": "string" + }, + "userKeyWalletSet": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UserKeyWallet" + } } } }, "v1UpdateUserKeyChainResponse": { "type": "object" + }, + "v1UserKeyWallet": { + "type": "object", + "properties": { + "gid": { + "type": "string" + }, + "encryptedGroupPrivateKey": { + "type": "string" + } + } } } } diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 7cf23e3..f41d936 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -629,8 +629,9 @@ type GetUserKeyChainResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` } func (x *GetUserKeyChainResponse) Reset() { @@ -679,13 +680,21 @@ func (x *GetUserKeyChainResponse) GetEncryptedPrivateKey() string { return "" } +func (x *GetUserKeyChainResponse) GetUserKeyWalletSet() []*UserKeyWallet { + if x != nil { + return x.UserKeyWalletSet + } + return nil +} + type UpdateUserKeyChainRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` } func (x *UpdateUserKeyChainRequest) Reset() { @@ -734,6 +743,68 @@ func (x *UpdateUserKeyChainRequest) GetEncryptedPrivateKey() string { return "" } +func (x *UpdateUserKeyChainRequest) GetUserKeyWalletSet() []*UserKeyWallet { + if x != nil { + return x.UserKeyWalletSet + } + return nil +} + +type UserKeyWallet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + EncryptedGroupPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_group_privateKey,json=encryptedGroupPrivateKey,proto3" json:"encrypted_group_privateKey,omitempty"` +} + +func (x *UserKeyWallet) Reset() { + *x = UserKeyWallet{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserKeyWallet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserKeyWallet) ProtoMessage() {} + +func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[11] + 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 UserKeyWallet.ProtoReflect.Descriptor instead. +func (*UserKeyWallet) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} +} + +func (x *UserKeyWallet) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *UserKeyWallet) GetEncryptedGroupPrivateKey() string { + if x != nil { + return x.EncryptedGroupPrivateKey + } + return "" +} + type UpdateUserKeyChainResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -743,7 +814,7 @@ type UpdateUserKeyChainResponse struct { func (x *UpdateUserKeyChainResponse) Reset() { *x = UpdateUserKeyChainResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] + mi := &file_sync_v1_sync_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -756,7 +827,7 @@ func (x *UpdateUserKeyChainResponse) String() string { func (*UpdateUserKeyChainResponse) ProtoMessage() {} func (x *UpdateUserKeyChainResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] + mi := &file_sync_v1_sync_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -769,7 +840,7 @@ func (x *UpdateUserKeyChainResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserKeyChainResponse.ProtoReflect.Descriptor instead. func (*UpdateUserKeyChainResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} } var File_sync_v1_sync_service_proto protoreflect.FileDescriptor @@ -862,69 +933,84 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x6a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x6c, 0x0a, - 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa1, 0x05, 0x0a, 0x0b, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, - 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, - 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x7e, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x8d, 0x01, - 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x42, 0x3c, 0x5a, - 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, - 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, + 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x5f, 0x0a, 0x0d, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3c, + 0x0a, 0x1a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x1c, 0x0a, 0x1a, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa1, 0x05, 0x0a, 0x0b, 0x53, + 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, + 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, + 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x7e, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x8d, + 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x42, 0x3c, + 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, + 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -939,7 +1025,7 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { return file_sync_v1_sync_service_proto_rawDescData } -var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SyncRequest)(nil), // 0: sync.v1.SyncRequest (*SyncResponse)(nil), // 1: sync.v1.SyncResponse @@ -952,50 +1038,53 @@ var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*GetUserKeyChainRequest)(nil), // 8: sync.v1.GetUserKeyChainRequest (*GetUserKeyChainResponse)(nil), // 9: sync.v1.GetUserKeyChainResponse (*UpdateUserKeyChainRequest)(nil), // 10: sync.v1.UpdateUserKeyChainRequest - (*UpdateUserKeyChainResponse)(nil), // 11: sync.v1.UpdateUserKeyChainResponse - (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp - (*Host)(nil), // 13: sync.v1.Host - (*KnownHost)(nil), // 14: sync.v1.KnownHost - (*SshKey)(nil), // 15: sync.v1.SshKey - (*Identity)(nil), // 16: sync.v1.Identity - (*Group)(nil), // 17: sync.v1.Group + (*UserKeyWallet)(nil), // 11: sync.v1.UserKeyWallet + (*UpdateUserKeyChainResponse)(nil), // 12: sync.v1.UpdateUserKeyChainResponse + (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp + (*Host)(nil), // 14: sync.v1.Host + (*KnownHost)(nil), // 15: sync.v1.KnownHost + (*SshKey)(nil), // 16: sync.v1.SshKey + (*Identity)(nil), // 17: sync.v1.Identity + (*Group)(nil), // 18: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 12, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp - 12, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp - 13, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host - 14, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost - 15, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey - 16, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity - 13, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host - 14, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost - 15, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey - 16, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity - 13, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host - 14, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost - 15, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey - 16, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity - 17, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group - 12, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 12, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp - 17, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group - 0, // 18: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest - 2, // 19: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest - 4, // 20: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest - 6, // 21: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 8, // 22: sync.v1.SyncService.GetUserKeyChain:input_type -> sync.v1.GetUserKeyChainRequest - 10, // 23: sync.v1.SyncService.UpdateUserKeyChain:input_type -> sync.v1.UpdateUserKeyChainRequest - 1, // 24: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 25: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse - 5, // 26: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 27: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 9, // 28: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse - 11, // 29: sync.v1.SyncService.UpdateUserKeyChain:output_type -> sync.v1.UpdateUserKeyChainResponse - 24, // [24:30] is the sub-list for method output_type - 18, // [18:24] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 13, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp + 13, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp + 14, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host + 15, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost + 16, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey + 17, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity + 14, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host + 15, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost + 16, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey + 17, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity + 14, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host + 15, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost + 16, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey + 17, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity + 18, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group + 13, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp + 13, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp + 18, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group + 11, // 18: sync.v1.GetUserKeyChainResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 11, // 19: sync.v1.UpdateUserKeyChainRequest.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 0, // 20: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest + 2, // 21: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest + 4, // 22: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest + 6, // 23: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 8, // 24: sync.v1.SyncService.GetUserKeyChain:input_type -> sync.v1.GetUserKeyChainRequest + 10, // 25: sync.v1.SyncService.UpdateUserKeyChain:input_type -> sync.v1.UpdateUserKeyChainRequest + 1, // 26: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse + 3, // 27: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 5, // 28: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 29: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 9, // 30: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse + 12, // 31: sync.v1.SyncService.UpdateUserKeyChain:output_type -> sync.v1.UpdateUserKeyChainResponse + 26, // [26:32] is the sub-list for method output_type + 20, // [20:26] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_sync_v1_sync_service_proto_init() } @@ -1141,6 +1230,18 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserKeyWallet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateUserKeyChainResponse); i { case 0: return &v.state @@ -1171,7 +1272,7 @@ func file_sync_v1_sync_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_sync_service_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 7efdf4e..288de9f 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -71,11 +71,18 @@ export type GetUserKeyChainRequest = { export type GetUserKeyChainResponse = { publicKey?: string encryptedPrivateKey?: string + userKeyWalletSet?: UserKeyWallet[] } export type UpdateUserKeyChainRequest = { publicKey?: string encryptedPrivateKey?: string + userKeyWalletSet?: UserKeyWallet[] +} + +export type UserKeyWallet = { + gid?: string + encryptedGroupPrivateKey?: string } export type UpdateUserKeyChainResponse = { diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index 6ffdf7a..d418b5e 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -41,7 +41,7 @@ type SyncServiceClient interface { SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) // 获取用户密钥对 GetUserKeyChain(ctx context.Context, in *GetUserKeyChainRequest, opts ...grpc.CallOption) (*GetUserKeyChainResponse, error) - // 修改用户密钥对 + // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 UpdateUserKeyChain(ctx context.Context, in *UpdateUserKeyChainRequest, opts ...grpc.CallOption) (*UpdateUserKeyChainResponse, error) } @@ -121,7 +121,7 @@ type SyncServiceServer interface { SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) // 获取用户密钥对 GetUserKeyChain(context.Context, *GetUserKeyChainRequest) (*GetUserKeyChainResponse, error) - // 修改用户密钥对 + // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 UpdateUserKeyChain(context.Context, *UpdateUserKeyChainRequest) (*UpdateUserKeyChainResponse, error) mustEmbedUnimplementedSyncServiceServer() } From 8e5794c4b4e19cdeb02bda71172bcc7476ca6159 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Tue, 7 Nov 2023 11:06:15 +0800 Subject: [PATCH 24/46] fix: UpdateGroup --- proto/sync/v1/sync_service.proto | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 1099297..d1e91fe 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -59,11 +59,8 @@ message SyncResponse { repeated Identity identity_set = 14; } -// 如果是用于创建新的组,则提供master_key,用于加密rsa密钥 message UpdateRequest { string group_id = 2; - string publicKey = 3; - string encrypted_privateKey = 4; // 创建者的私钥 oneof data { Host host = 11; KnownHost known_host = 12; @@ -81,8 +78,12 @@ message UpdateResponse { } } +// 更新组信息,如果是创建组的请求则需要带上创建者的密钥 +// 密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示 message UpdateGroupRequest { - Group group = 1; + string publicKey = 1; + string encrypted_creator_privateKey = 2; + Group group = 3; } message UpdateGroupResponse {} From aa9165e27458aa29cae16d51f2df977b135b17a6 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Tue, 7 Nov 2023 11:13:28 +0800 Subject: [PATCH 25/46] fix: proto order --- proto/sync/v1/sync_service.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index d1e91fe..5e9eacf 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -81,9 +81,9 @@ message UpdateResponse { // 更新组信息,如果是创建组的请求则需要带上创建者的密钥 // 密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示 message UpdateGroupRequest { - string publicKey = 1; - string encrypted_creator_privateKey = 2; - Group group = 3; + Group group = 1; + string publicKey = 2; + string encrypted_creator_privateKey = 3; } message UpdateGroupResponse {} From 286d7e3c4ffd5ed481e5da258f2013a485f7aa5f Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Tue, 7 Nov 2023 03:14:13 +0000 Subject: [PATCH 26/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 19 ++-- gen/proto/sync/v1/sync_service.pb.go | 104 +++++++++--------- gen/proto/sync/v1/sync_service.pb.ts | 4 +- 3 files changed, 64 insertions(+), 63 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index a9956a1..c4e2635 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -541,8 +541,15 @@ "properties": { "group": { "$ref": "#/definitions/v1Group" + }, + "publicKey": { + "type": "string" + }, + "encryptedCreatorPrivateKey": { + "type": "string" } - } + }, + "title": "更新组信息,如果是创建组的请求则需要带上创建者的密钥\n密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示" }, "v1UpdateGroupResponse": { "type": "object" @@ -553,13 +560,6 @@ "groupId": { "type": "string" }, - "publicKey": { - "type": "string" - }, - "encryptedPrivateKey": { - "type": "string", - "title": "创建者的私钥" - }, "host": { "$ref": "#/definitions/v1Host" }, @@ -572,8 +572,7 @@ "identity": { "$ref": "#/definitions/v1Identity" } - }, - "title": "如果是用于创建新的组,则提供master_key,用于加密rsa密钥" + } }, "v1UpdateResponse": { "type": "object", diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index f41d936..a1cadfe 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -156,15 +156,12 @@ func (x *SyncResponse) GetIdentitySet() []*Identity { return nil } -// 如果是用于创建新的组,则提供master_key,用于加密rsa密钥 type UpdateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - PublicKey string `protobuf:"bytes,3,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,4,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` // 创建者的私钥 + GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // Types that are assignable to Data: // // *UpdateRequest_Host @@ -213,20 +210,6 @@ func (x *UpdateRequest) GetGroupId() string { return "" } -func (x *UpdateRequest) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *UpdateRequest) GetEncryptedPrivateKey() string { - if x != nil { - return x.EncryptedPrivateKey - } - return "" -} - func (m *UpdateRequest) GetData() isUpdateRequest_Data { if m != nil { return m.Data @@ -399,12 +382,16 @@ func (*UpdateResponse_SshKey) isUpdateResponse_Data() {} func (*UpdateResponse_Identity) isUpdateResponse_Data() {} +// 更新组信息,如果是创建组的请求则需要带上创建者的密钥 +// 密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示 type UpdateGroupRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedCreatorPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_creator_privateKey,json=encryptedCreatorPrivateKey,proto3" json:"encrypted_creator_privateKey,omitempty"` } func (x *UpdateGroupRequest) Reset() { @@ -446,6 +433,20 @@ func (x *UpdateGroupRequest) GetGroup() *Group { return nil } +func (x *UpdateGroupRequest) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *UpdateGroupRequest) GetEncryptedCreatorPrivateKey() string { + if x != nil { + return x.EncryptedCreatorPrivateKey + } + return "" +} + type UpdateGroupResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -881,43 +882,44 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x34, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0xba, 0x02, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0xe9, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, - 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, - 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, - 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, - 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, - 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, - 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, - 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, - 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, - 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, - 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, + 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, + 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, + 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, + 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, + 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, + 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, + 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, + 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x9a, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x40, + 0x0a, 0x1c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 288de9f..39ec2fb 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -35,8 +35,6 @@ export type SyncResponse = { type BaseUpdateRequest = { groupId?: string - publicKey?: string - encryptedPrivateKey?: string } export type UpdateRequest = BaseUpdateRequest @@ -51,6 +49,8 @@ export type UpdateResponse = BaseUpdateResponse export type UpdateGroupRequest = { group?: SyncV1Group.Group + publicKey?: string + encryptedCreatorPrivateKey?: string } export type UpdateGroupResponse = { From 0ea045d0302efdeadc577e616c755854d8bdac45 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Tue, 7 Nov 2023 11:47:44 +0800 Subject: [PATCH 27/46] fix: UserKeyChain support incremental synchronization --- proto/sync/v1/sync_service.proto | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 5e9eacf..bc91f2a 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -97,9 +97,12 @@ message SyncGroupResponse { repeated Group groups = 11; } -message GetUserKeyChainRequest {} +message GetUserKeyChainRequest { + google.protobuf.Timestamp after = 1; // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 +} message GetUserKeyChainResponse { + google.protobuf.Timestamp server_time = 1; // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 string publicKey = 2; string encrypted_privateKey = 3; repeated UserKeyWallet user_key_wallet_set = 4; From 8706b1a6f502c9ab78f014dda199c0a7d52b3943 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Tue, 7 Nov 2023 03:48:27 +0000 Subject: [PATCH 28/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 15 ++ gen/proto/sync/v1/sync_service.pb.go | 226 ++++++++++-------- gen/proto/sync/v1/sync_service.pb.gw.go | 18 ++ gen/proto/sync/v1/sync_service.pb.ts | 2 + 4 files changed, 161 insertions(+), 100 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index c4e2635..0892138 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -34,6 +34,16 @@ } } }, + "parameters": [ + { + "name": "after", + "description": "获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + } + ], "tags": [ "SyncService" ] @@ -242,6 +252,11 @@ "v1GetUserKeyChainResponse": { "type": "object", "properties": { + "serverTime": { + "type": "string", + "format": "date-time", + "title": "当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱" + }, "publicKey": { "type": "string" }, diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index a1cadfe..5a26040 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -591,6 +591,8 @@ type GetUserKeyChainRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 } func (x *GetUserKeyChainRequest) Reset() { @@ -625,14 +627,22 @@ func (*GetUserKeyChainRequest) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} } +func (x *GetUserKeyChainRequest) GetAfter() *timestamppb.Timestamp { + if x != nil { + return x.After + } + return nil +} + type GetUserKeyChainResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` - UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` + ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"` // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 + PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` } func (x *GetUserKeyChainResponse) Reset() { @@ -667,6 +677,13 @@ func (*GetUserKeyChainResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} } +func (x *GetUserKeyChainResponse) GetServerTime() *timestamppb.Timestamp { + if x != nil { + return x.ServerTime + } + return nil +} + func (x *GetUserKeyChainResponse) GetPublicKey() string { if x != nil { return x.PublicKey @@ -933,86 +950,93 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x4a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, - 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x5f, 0x0a, 0x0d, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3c, - 0x0a, 0x1a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x1c, 0x0a, 0x1a, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa1, 0x05, 0x0a, 0x0b, 0x53, - 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, - 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, - 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, - 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x7e, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x22, 0xee, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, + 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x53, 0x65, 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x8d, - 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x42, 0x3c, - 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, - 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x5f, 0x0a, 0x0d, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3c, 0x0a, + 0x1a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa1, 0x05, 0x0a, 0x0b, 0x53, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, + 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, + 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x7e, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x8d, 0x01, + 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x42, 0x3c, 0x5a, + 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, + 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1068,25 +1092,27 @@ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 13, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp 13, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp 18, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group - 11, // 18: sync.v1.GetUserKeyChainResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 11, // 19: sync.v1.UpdateUserKeyChainRequest.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 0, // 20: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest - 2, // 21: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest - 4, // 22: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest - 6, // 23: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 8, // 24: sync.v1.SyncService.GetUserKeyChain:input_type -> sync.v1.GetUserKeyChainRequest - 10, // 25: sync.v1.SyncService.UpdateUserKeyChain:input_type -> sync.v1.UpdateUserKeyChainRequest - 1, // 26: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 27: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse - 5, // 28: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 29: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 9, // 30: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse - 12, // 31: sync.v1.SyncService.UpdateUserKeyChain:output_type -> sync.v1.UpdateUserKeyChainResponse - 26, // [26:32] is the sub-list for method output_type - 20, // [20:26] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 13, // 18: sync.v1.GetUserKeyChainRequest.after:type_name -> google.protobuf.Timestamp + 13, // 19: sync.v1.GetUserKeyChainResponse.server_time:type_name -> google.protobuf.Timestamp + 11, // 20: sync.v1.GetUserKeyChainResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 11, // 21: sync.v1.UpdateUserKeyChainRequest.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 0, // 22: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest + 2, // 23: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest + 4, // 24: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest + 6, // 25: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 8, // 26: sync.v1.SyncService.GetUserKeyChain:input_type -> sync.v1.GetUserKeyChainRequest + 10, // 27: sync.v1.SyncService.UpdateUserKeyChain:input_type -> sync.v1.UpdateUserKeyChainRequest + 1, // 28: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse + 3, // 29: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 5, // 30: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 31: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 9, // 32: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse + 12, // 33: sync.v1.SyncService.UpdateUserKeyChain:output_type -> sync.v1.UpdateUserKeyChainResponse + 28, // [28:34] is the sub-list for method output_type + 22, // [22:28] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_sync_v1_sync_service_proto_init() } diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index 4741e1d..5d8cc65 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -171,10 +171,21 @@ func local_request_SyncService_SyncGroup_0(ctx context.Context, marshaler runtim } +var ( + filter_SyncService_GetUserKeyChain_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_SyncService_GetUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetUserKeyChainRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_GetUserKeyChain_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetUserKeyChain(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -184,6 +195,13 @@ func local_request_SyncService_GetUserKeyChain_0(ctx context.Context, marshaler var protoReq GetUserKeyChainRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_GetUserKeyChain_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetUserKeyChain(ctx, &protoReq) return msg, metadata, err diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 39ec2fb..89a8198 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -66,9 +66,11 @@ export type SyncGroupResponse = { } export type GetUserKeyChainRequest = { + after?: GoogleProtobufTimestamp.Timestamp } export type GetUserKeyChainResponse = { + serverTime?: GoogleProtobufTimestamp.Timestamp publicKey?: string encryptedPrivateKey?: string userKeyWalletSet?: UserKeyWallet[] From 97be35d1b4d0513621c3db731a547afd55028a44 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Tue, 7 Nov 2023 12:12:07 +0800 Subject: [PATCH 29/46] fix: parms details --- proto/sync/v1/sync_service.proto | 35 ++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index bc91f2a..909dcc4 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -34,18 +34,18 @@ service SyncService { option (google.api.http) = {get:"/gapi/sync/v1/sync_group"}; } // 获取用户密钥对 - rpc GetUserKeyChain(GetUserKeyChainRequest) returns (GetUserKeyChainResponse) { - option (google.api.http) = {get:"/gapi/sync/v1/get_user_key_chain"}; + rpc SyncUserKeyWallet(SyncUserKeyWalletRequest) returns (SyncUserKeyWalletResponse) { + option (google.api.http) = {get:"/gapi/sync/v1/sync_user_key_wallet"}; } // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 - rpc UpdateUserKeyChain(UpdateUserKeyChainRequest) returns (UpdateUserKeyChainResponse) { + rpc UpdateUserKeyWallet(UpdateUserKeyWalletRequest) returns (UpdateUserKeyWalletResponse) { option (google.api.http) = { - post:"/gapi/sync/v1/update_user_key_chain" + post:"/gapi/sync/v1/update_user_key_wallet" body: "*" }; } } - +// Sync message SyncRequest { google.protobuf.Timestamp after = 1; // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 string group_id = 2; @@ -59,6 +59,7 @@ message SyncResponse { repeated Identity identity_set = 14; } +// Update message UpdateRequest { string group_id = 2; oneof data { @@ -78,6 +79,7 @@ message UpdateResponse { } } +// UpdateGroup // 更新组信息,如果是创建组的请求则需要带上创建者的密钥 // 密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示 message UpdateGroupRequest { @@ -88,6 +90,7 @@ message UpdateGroupRequest { message UpdateGroupResponse {} +// SyncGroup message SyncGroupRequest { google.protobuf.Timestamp after = 1; } @@ -97,26 +100,32 @@ message SyncGroupResponse { repeated Group groups = 11; } -message GetUserKeyChainRequest { +// SyncUserKeyWallet +message SyncUserKeyWalletRequest { google.protobuf.Timestamp after = 1; // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 } -message GetUserKeyChainResponse { +message SyncUserKeyWalletResponse { google.protobuf.Timestamp server_time = 1; // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 string publicKey = 2; string encrypted_privateKey = 3; repeated UserKeyWallet user_key_wallet_set = 4; } -message UpdateUserKeyChainRequest { - string publicKey = 2; - string encrypted_privateKey = 3; +// UpdateUserKeyWallet +message UpdateUserKeyWalletRequest { + string publicKey = 1; + string encrypted_privateKey = 2; + repeated UserKeyWallet user_key_wallet_set = 4; +} + +message UpdateUserKeyWalletResponse { + string publicKey = 1; + string encrypted_privateKey = 2; repeated UserKeyWallet user_key_wallet_set = 4; } message UserKeyWallet { string gid = 1; string encrypted_group_privateKey = 2; -} - -message UpdateUserKeyChainResponse {} +} \ No newline at end of file From 22151d8af84ac1b1113e578d1a2b41053b2dee1a Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Tue, 7 Nov 2023 04:12:56 +0000 Subject: [PATCH 30/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 121 ++--- gen/proto/sync/v1/sync_service.pb.go | 418 ++++++++++-------- gen/proto/sync/v1/sync_service.pb.gw.go | 70 +-- gen/proto/sync/v1/sync_service.pb.ts | 23 +- gen/proto/sync/v1/sync_service_grpc.pb.go | 68 +-- 5 files changed, 381 insertions(+), 319 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 0892138..dec5cdf 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -16,15 +16,15 @@ "application/json" ], "paths": { - "/gapi/sync/v1/get_user_key_chain": { + "/gapi/sync/v1/sync": { "get": { - "summary": "获取用户密钥对", - "operationId": "SyncService_GetUserKeyChain", + "summary": "拉取指定时间点之后的配置变动信息", + "operationId": "SyncService_Sync", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetUserKeyChainResponse" + "$ref": "#/definitions/v1SyncResponse" } }, "default": { @@ -42,6 +42,12 @@ "required": false, "type": "string", "format": "date-time" + }, + { + "name": "groupId", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -49,15 +55,15 @@ ] } }, - "/gapi/sync/v1/sync": { + "/gapi/sync/v1/sync_group": { "get": { - "summary": "拉取指定时间点之后的配置变动信息", - "operationId": "SyncService_Sync", + "summary": "通过UID获取所有组信息", + "operationId": "SyncService_SyncGroup", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SyncResponse" + "$ref": "#/definitions/v1SyncGroupResponse" } }, "default": { @@ -70,17 +76,10 @@ "parameters": [ { "name": "after", - "description": "获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息", "in": "query", "required": false, "type": "string", "format": "date-time" - }, - { - "name": "groupId", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ @@ -88,15 +87,15 @@ ] } }, - "/gapi/sync/v1/sync_group": { + "/gapi/sync/v1/sync_user_key_wallet": { "get": { - "summary": "通过UID获取所有组信息", - "operationId": "SyncService_SyncGroup", + "summary": "获取用户密钥对", + "operationId": "SyncService_SyncUserKeyWallet", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SyncGroupResponse" + "$ref": "#/definitions/v1SyncUserKeyWalletResponse" } }, "default": { @@ -109,6 +108,7 @@ "parameters": [ { "name": "after", + "description": "获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息", "in": "query", "required": false, "type": "string", @@ -186,15 +186,15 @@ ] } }, - "/gapi/sync/v1/update_user_key_chain": { + "/gapi/sync/v1/update_user_key_wallet": { "post": { "summary": "修改用户密钥对,修改的时候所有相关组的加密密钥均要替换", - "operationId": "SyncService_UpdateUserKeyChain", + "operationId": "SyncService_UpdateUserKeyWallet", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateUserKeyChainResponse" + "$ref": "#/definitions/v1UpdateUserKeyWalletResponse" } }, "default": { @@ -210,7 +210,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1UpdateUserKeyChainRequest" + "$ref": "#/definitions/v1UpdateUserKeyWalletRequest" } } ], @@ -249,29 +249,6 @@ } } }, - "v1GetUserKeyChainResponse": { - "type": "object", - "properties": { - "serverTime": { - "type": "string", - "format": "date-time", - "title": "当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱" - }, - "publicKey": { - "type": "string" - }, - "encryptedPrivateKey": { - "type": "string" - }, - "userKeyWalletSet": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1UserKeyWallet" - } - } - } - }, "v1Group": { "type": "object", "properties": { @@ -551,6 +528,29 @@ } } }, + "v1SyncUserKeyWalletResponse": { + "type": "object", + "properties": { + "serverTime": { + "type": "string", + "format": "date-time", + "title": "当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱" + }, + "publicKey": { + "type": "string" + }, + "encryptedPrivateKey": { + "type": "string" + }, + "userKeyWalletSet": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UserKeyWallet" + } + } + } + }, "v1UpdateGroupRequest": { "type": "object", "properties": { @@ -564,7 +564,7 @@ "type": "string" } }, - "title": "更新组信息,如果是创建组的请求则需要带上创建者的密钥\n密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示" + "title": "UpdateGroup\n更新组信息,如果是创建组的请求则需要带上创建者的密钥\n密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示" }, "v1UpdateGroupResponse": { "type": "object" @@ -587,7 +587,8 @@ "identity": { "$ref": "#/definitions/v1Identity" } - } + }, + "title": "Update" }, "v1UpdateResponse": { "type": "object", @@ -606,7 +607,7 @@ } } }, - "v1UpdateUserKeyChainRequest": { + "v1UpdateUserKeyWalletRequest": { "type": "object", "properties": { "publicKey": { @@ -622,10 +623,26 @@ "$ref": "#/definitions/v1UserKeyWallet" } } - } + }, + "title": "UpdateUserKeyWallet" }, - "v1UpdateUserKeyChainResponse": { - "type": "object" + "v1UpdateUserKeyWalletResponse": { + "type": "object", + "properties": { + "publicKey": { + "type": "string" + }, + "encryptedPrivateKey": { + "type": "string" + }, + "userKeyWalletSet": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UserKeyWallet" + } + } + } }, "v1UserKeyWallet": { "type": "object", diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 5a26040..37375cf 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -22,6 +22,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Sync type SyncRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -156,6 +157,7 @@ func (x *SyncResponse) GetIdentitySet() []*Identity { return nil } +// Update type UpdateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -382,6 +384,7 @@ func (*UpdateResponse_SshKey) isUpdateResponse_Data() {} func (*UpdateResponse_Identity) isUpdateResponse_Data() {} +// UpdateGroup // 更新组信息,如果是创建组的请求则需要带上创建者的密钥 // 密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示 type UpdateGroupRequest struct { @@ -485,6 +488,7 @@ func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{5} } +// SyncGroup type SyncGroupRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -587,7 +591,8 @@ func (x *SyncGroupResponse) GetGroups() []*Group { return nil } -type GetUserKeyChainRequest struct { +// SyncUserKeyWallet +type SyncUserKeyWalletRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -595,8 +600,8 @@ type GetUserKeyChainRequest struct { After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 } -func (x *GetUserKeyChainRequest) Reset() { - *x = GetUserKeyChainRequest{} +func (x *SyncUserKeyWalletRequest) Reset() { + *x = SyncUserKeyWalletRequest{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -604,13 +609,13 @@ func (x *GetUserKeyChainRequest) Reset() { } } -func (x *GetUserKeyChainRequest) String() string { +func (x *SyncUserKeyWalletRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetUserKeyChainRequest) ProtoMessage() {} +func (*SyncUserKeyWalletRequest) ProtoMessage() {} -func (x *GetUserKeyChainRequest) ProtoReflect() protoreflect.Message { +func (x *SyncUserKeyWalletRequest) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -622,19 +627,19 @@ func (x *GetUserKeyChainRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetUserKeyChainRequest.ProtoReflect.Descriptor instead. -func (*GetUserKeyChainRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncUserKeyWalletRequest.ProtoReflect.Descriptor instead. +func (*SyncUserKeyWalletRequest) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} } -func (x *GetUserKeyChainRequest) GetAfter() *timestamppb.Timestamp { +func (x *SyncUserKeyWalletRequest) GetAfter() *timestamppb.Timestamp { if x != nil { return x.After } return nil } -type GetUserKeyChainResponse struct { +type SyncUserKeyWalletResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -645,8 +650,8 @@ type GetUserKeyChainResponse struct { UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` } -func (x *GetUserKeyChainResponse) Reset() { - *x = GetUserKeyChainResponse{} +func (x *SyncUserKeyWalletResponse) Reset() { + *x = SyncUserKeyWalletResponse{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -654,13 +659,13 @@ func (x *GetUserKeyChainResponse) Reset() { } } -func (x *GetUserKeyChainResponse) String() string { +func (x *SyncUserKeyWalletResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetUserKeyChainResponse) ProtoMessage() {} +func (*SyncUserKeyWalletResponse) ProtoMessage() {} -func (x *GetUserKeyChainResponse) ProtoReflect() protoreflect.Message { +func (x *SyncUserKeyWalletResponse) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -672,51 +677,52 @@ func (x *GetUserKeyChainResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetUserKeyChainResponse.ProtoReflect.Descriptor instead. -func (*GetUserKeyChainResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncUserKeyWalletResponse.ProtoReflect.Descriptor instead. +func (*SyncUserKeyWalletResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} } -func (x *GetUserKeyChainResponse) GetServerTime() *timestamppb.Timestamp { +func (x *SyncUserKeyWalletResponse) GetServerTime() *timestamppb.Timestamp { if x != nil { return x.ServerTime } return nil } -func (x *GetUserKeyChainResponse) GetPublicKey() string { +func (x *SyncUserKeyWalletResponse) GetPublicKey() string { if x != nil { return x.PublicKey } return "" } -func (x *GetUserKeyChainResponse) GetEncryptedPrivateKey() string { +func (x *SyncUserKeyWalletResponse) GetEncryptedPrivateKey() string { if x != nil { return x.EncryptedPrivateKey } return "" } -func (x *GetUserKeyChainResponse) GetUserKeyWalletSet() []*UserKeyWallet { +func (x *SyncUserKeyWalletResponse) GetUserKeyWalletSet() []*UserKeyWallet { if x != nil { return x.UserKeyWalletSet } return nil } -type UpdateUserKeyChainRequest struct { +// UpdateUserKeyWallet +type UpdateUserKeyWalletRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` } -func (x *UpdateUserKeyChainRequest) Reset() { - *x = UpdateUserKeyChainRequest{} +func (x *UpdateUserKeyWalletRequest) Reset() { + *x = UpdateUserKeyWalletRequest{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -724,13 +730,13 @@ func (x *UpdateUserKeyChainRequest) Reset() { } } -func (x *UpdateUserKeyChainRequest) String() string { +func (x *UpdateUserKeyWalletRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateUserKeyChainRequest) ProtoMessage() {} +func (*UpdateUserKeyWalletRequest) ProtoMessage() {} -func (x *UpdateUserKeyChainRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateUserKeyWalletRequest) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -742,43 +748,44 @@ func (x *UpdateUserKeyChainRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateUserKeyChainRequest.ProtoReflect.Descriptor instead. -func (*UpdateUserKeyChainRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateUserKeyWalletRequest.ProtoReflect.Descriptor instead. +func (*UpdateUserKeyWalletRequest) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{10} } -func (x *UpdateUserKeyChainRequest) GetPublicKey() string { +func (x *UpdateUserKeyWalletRequest) GetPublicKey() string { if x != nil { return x.PublicKey } return "" } -func (x *UpdateUserKeyChainRequest) GetEncryptedPrivateKey() string { +func (x *UpdateUserKeyWalletRequest) GetEncryptedPrivateKey() string { if x != nil { return x.EncryptedPrivateKey } return "" } -func (x *UpdateUserKeyChainRequest) GetUserKeyWalletSet() []*UserKeyWallet { +func (x *UpdateUserKeyWalletRequest) GetUserKeyWalletSet() []*UserKeyWallet { if x != nil { return x.UserKeyWalletSet } return nil } -type UserKeyWallet struct { +type UpdateUserKeyWalletResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - EncryptedGroupPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_group_privateKey,json=encryptedGroupPrivateKey,proto3" json:"encrypted_group_privateKey,omitempty"` + PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` } -func (x *UserKeyWallet) Reset() { - *x = UserKeyWallet{} +func (x *UpdateUserKeyWalletResponse) Reset() { + *x = UpdateUserKeyWalletResponse{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -786,13 +793,13 @@ func (x *UserKeyWallet) Reset() { } } -func (x *UserKeyWallet) String() string { +func (x *UpdateUserKeyWalletResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserKeyWallet) ProtoMessage() {} +func (*UpdateUserKeyWalletResponse) ProtoMessage() {} -func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { +func (x *UpdateUserKeyWalletResponse) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -804,33 +811,43 @@ func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserKeyWallet.ProtoReflect.Descriptor instead. -func (*UserKeyWallet) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateUserKeyWalletResponse.ProtoReflect.Descriptor instead. +func (*UpdateUserKeyWalletResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} } -func (x *UserKeyWallet) GetGid() string { +func (x *UpdateUserKeyWalletResponse) GetPublicKey() string { if x != nil { - return x.Gid + return x.PublicKey } return "" } -func (x *UserKeyWallet) GetEncryptedGroupPrivateKey() string { +func (x *UpdateUserKeyWalletResponse) GetEncryptedPrivateKey() string { if x != nil { - return x.EncryptedGroupPrivateKey + return x.EncryptedPrivateKey } return "" } -type UpdateUserKeyChainResponse struct { +func (x *UpdateUserKeyWalletResponse) GetUserKeyWalletSet() []*UserKeyWallet { + if x != nil { + return x.UserKeyWalletSet + } + return nil +} + +type UserKeyWallet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + EncryptedGroupPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_group_privateKey,json=encryptedGroupPrivateKey,proto3" json:"encrypted_group_privateKey,omitempty"` } -func (x *UpdateUserKeyChainResponse) Reset() { - *x = UpdateUserKeyChainResponse{} +func (x *UserKeyWallet) Reset() { + *x = UserKeyWallet{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -838,13 +855,13 @@ func (x *UpdateUserKeyChainResponse) Reset() { } } -func (x *UpdateUserKeyChainResponse) String() string { +func (x *UserKeyWallet) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateUserKeyChainResponse) ProtoMessage() {} +func (*UserKeyWallet) ProtoMessage() {} -func (x *UpdateUserKeyChainResponse) ProtoReflect() protoreflect.Message { +func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -856,11 +873,25 @@ func (x *UpdateUserKeyChainResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateUserKeyChainResponse.ProtoReflect.Descriptor instead. -func (*UpdateUserKeyChainResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UserKeyWallet.ProtoReflect.Descriptor instead. +func (*UserKeyWallet) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} } +func (x *UserKeyWallet) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *UserKeyWallet) GetEncryptedGroupPrivateKey() string { + if x != nil { + return x.EncryptedGroupPrivateKey + } + return "" +} + var File_sync_v1_sync_service_proto protoreflect.FileDescriptor var file_sync_v1_sync_service_proto_rawDesc = []byte{ @@ -950,93 +981,103 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x4a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, - 0x74, 0x65, 0x72, 0x22, 0xee, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, - 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x53, 0x65, 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x5f, 0x0a, 0x0d, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3c, 0x0a, - 0x1a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x1c, 0x0a, 0x1a, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa1, 0x05, 0x0a, 0x0b, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, - 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, - 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x7e, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x8d, 0x01, - 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x42, 0x3c, 0x5a, - 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, - 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x4c, 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0xf0, 0x01, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, + 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, + 0xb5, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, + 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x5f, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x32, 0xae, 0x05, 0x0a, 0x0b, 0x53, 0x79, 0x6e, + 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, + 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, + 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, + 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, 0x01, 0x0a, + 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x23, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, + 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, + 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1053,25 +1094,25 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ - (*SyncRequest)(nil), // 0: sync.v1.SyncRequest - (*SyncResponse)(nil), // 1: sync.v1.SyncResponse - (*UpdateRequest)(nil), // 2: sync.v1.UpdateRequest - (*UpdateResponse)(nil), // 3: sync.v1.UpdateResponse - (*UpdateGroupRequest)(nil), // 4: sync.v1.UpdateGroupRequest - (*UpdateGroupResponse)(nil), // 5: sync.v1.UpdateGroupResponse - (*SyncGroupRequest)(nil), // 6: sync.v1.SyncGroupRequest - (*SyncGroupResponse)(nil), // 7: sync.v1.SyncGroupResponse - (*GetUserKeyChainRequest)(nil), // 8: sync.v1.GetUserKeyChainRequest - (*GetUserKeyChainResponse)(nil), // 9: sync.v1.GetUserKeyChainResponse - (*UpdateUserKeyChainRequest)(nil), // 10: sync.v1.UpdateUserKeyChainRequest - (*UserKeyWallet)(nil), // 11: sync.v1.UserKeyWallet - (*UpdateUserKeyChainResponse)(nil), // 12: sync.v1.UpdateUserKeyChainResponse - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp - (*Host)(nil), // 14: sync.v1.Host - (*KnownHost)(nil), // 15: sync.v1.KnownHost - (*SshKey)(nil), // 16: sync.v1.SshKey - (*Identity)(nil), // 17: sync.v1.Identity - (*Group)(nil), // 18: sync.v1.Group + (*SyncRequest)(nil), // 0: sync.v1.SyncRequest + (*SyncResponse)(nil), // 1: sync.v1.SyncResponse + (*UpdateRequest)(nil), // 2: sync.v1.UpdateRequest + (*UpdateResponse)(nil), // 3: sync.v1.UpdateResponse + (*UpdateGroupRequest)(nil), // 4: sync.v1.UpdateGroupRequest + (*UpdateGroupResponse)(nil), // 5: sync.v1.UpdateGroupResponse + (*SyncGroupRequest)(nil), // 6: sync.v1.SyncGroupRequest + (*SyncGroupResponse)(nil), // 7: sync.v1.SyncGroupResponse + (*SyncUserKeyWalletRequest)(nil), // 8: sync.v1.SyncUserKeyWalletRequest + (*SyncUserKeyWalletResponse)(nil), // 9: sync.v1.SyncUserKeyWalletResponse + (*UpdateUserKeyWalletRequest)(nil), // 10: sync.v1.UpdateUserKeyWalletRequest + (*UpdateUserKeyWalletResponse)(nil), // 11: sync.v1.UpdateUserKeyWalletResponse + (*UserKeyWallet)(nil), // 12: sync.v1.UserKeyWallet + (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp + (*Host)(nil), // 14: sync.v1.Host + (*KnownHost)(nil), // 15: sync.v1.KnownHost + (*SshKey)(nil), // 16: sync.v1.SshKey + (*Identity)(nil), // 17: sync.v1.Identity + (*Group)(nil), // 18: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ 13, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp @@ -1092,27 +1133,28 @@ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 13, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp 13, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp 18, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group - 13, // 18: sync.v1.GetUserKeyChainRequest.after:type_name -> google.protobuf.Timestamp - 13, // 19: sync.v1.GetUserKeyChainResponse.server_time:type_name -> google.protobuf.Timestamp - 11, // 20: sync.v1.GetUserKeyChainResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 11, // 21: sync.v1.UpdateUserKeyChainRequest.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 0, // 22: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest - 2, // 23: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest - 4, // 24: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest - 6, // 25: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 8, // 26: sync.v1.SyncService.GetUserKeyChain:input_type -> sync.v1.GetUserKeyChainRequest - 10, // 27: sync.v1.SyncService.UpdateUserKeyChain:input_type -> sync.v1.UpdateUserKeyChainRequest - 1, // 28: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 29: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse - 5, // 30: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 31: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 9, // 32: sync.v1.SyncService.GetUserKeyChain:output_type -> sync.v1.GetUserKeyChainResponse - 12, // 33: sync.v1.SyncService.UpdateUserKeyChain:output_type -> sync.v1.UpdateUserKeyChainResponse - 28, // [28:34] is the sub-list for method output_type - 22, // [22:28] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 13, // 18: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp + 13, // 19: sync.v1.SyncUserKeyWalletResponse.server_time:type_name -> google.protobuf.Timestamp + 12, // 20: sync.v1.SyncUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 12, // 21: sync.v1.UpdateUserKeyWalletRequest.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 12, // 22: sync.v1.UpdateUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 0, // 23: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest + 2, // 24: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest + 4, // 25: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest + 6, // 26: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 8, // 27: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest + 10, // 28: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest + 1, // 29: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse + 3, // 30: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 5, // 31: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 32: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 9, // 33: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse + 11, // 34: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse + 29, // [29:35] is the sub-list for method output_type + 23, // [23:29] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_sync_v1_sync_service_proto_init() } @@ -1222,7 +1264,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserKeyChainRequest); i { + switch v := v.(*SyncUserKeyWalletRequest); i { case 0: return &v.state case 1: @@ -1234,7 +1276,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserKeyChainResponse); i { + switch v := v.(*SyncUserKeyWalletResponse); i { case 0: return &v.state case 1: @@ -1246,7 +1288,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserKeyChainRequest); i { + switch v := v.(*UpdateUserKeyWalletRequest); i { case 0: return &v.state case 1: @@ -1258,7 +1300,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserKeyWallet); i { + switch v := v.(*UpdateUserKeyWalletResponse); i { case 0: return &v.state case 1: @@ -1270,7 +1312,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserKeyChainResponse); i { + switch v := v.(*UserKeyWallet); i { case 0: return &v.state case 1: diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index 5d8cc65..d4311fc 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -172,43 +172,43 @@ func local_request_SyncService_SyncGroup_0(ctx context.Context, marshaler runtim } var ( - filter_SyncService_GetUserKeyChain_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_SyncService_SyncUserKeyWallet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_SyncService_GetUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserKeyChainRequest +func request_SyncService_SyncUserKeyWallet_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncUserKeyWalletRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_GetUserKeyChain_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_SyncUserKeyWallet_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetUserKeyChain(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.SyncUserKeyWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SyncService_GetUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserKeyChainRequest +func local_request_SyncService_SyncUserKeyWallet_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncUserKeyWalletRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_GetUserKeyChain_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_SyncUserKeyWallet_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetUserKeyChain(ctx, &protoReq) + msg, err := server.SyncUserKeyWallet(ctx, &protoReq) return msg, metadata, err } -func request_SyncService_UpdateUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateUserKeyChainRequest +func request_SyncService_UpdateUserKeyWallet_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateUserKeyWalletRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -219,13 +219,13 @@ func request_SyncService_UpdateUserKeyChain_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UpdateUserKeyChain(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.UpdateUserKeyWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SyncService_UpdateUserKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateUserKeyChainRequest +func local_request_SyncService_UpdateUserKeyWallet_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateUserKeyWalletRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -236,7 +236,7 @@ func local_request_SyncService_UpdateUserKeyChain_0(ctx context.Context, marshal return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UpdateUserKeyChain(ctx, &protoReq) + msg, err := server.UpdateUserKeyWallet(ctx, &protoReq) return msg, metadata, err } @@ -347,7 +347,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_SyncService_GetUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -355,12 +355,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GetUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/get_user_key_chain")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_user_key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_GetUserKeyChain_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_SyncUserKeyWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -368,11 +368,11 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_GetUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SyncService_UpdateUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_UpdateUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -380,12 +380,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_chain")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_UpdateUserKeyChain_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_UpdateUserKeyWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -393,7 +393,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_UpdateUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -526,47 +526,47 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_SyncService_GetUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GetUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/get_user_key_chain")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_user_key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_GetUserKeyChain_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_SyncUserKeyWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_GetUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SyncService_UpdateUserKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_UpdateUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_chain")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_UpdateUserKeyChain_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_UpdateUserKeyWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_UpdateUserKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -582,9 +582,9 @@ var ( pattern_SyncService_SyncGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_group"}, "")) - pattern_SyncService_GetUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "get_user_key_chain"}, "")) + pattern_SyncService_SyncUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_user_key_wallet"}, "")) - pattern_SyncService_UpdateUserKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_user_key_chain"}, "")) + pattern_SyncService_UpdateUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_user_key_wallet"}, "")) ) var ( @@ -596,7 +596,7 @@ var ( forward_SyncService_SyncGroup_0 = runtime.ForwardResponseMessage - forward_SyncService_GetUserKeyChain_0 = runtime.ForwardResponseMessage + forward_SyncService_SyncUserKeyWallet_0 = runtime.ForwardResponseMessage - forward_SyncService_UpdateUserKeyChain_0 = runtime.ForwardResponseMessage + forward_SyncService_UpdateUserKeyWallet_0 = runtime.ForwardResponseMessage ) diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 89a8198..eaa88e4 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -65,18 +65,24 @@ export type SyncGroupResponse = { groups?: SyncV1Group.Group[] } -export type GetUserKeyChainRequest = { +export type SyncUserKeyWalletRequest = { after?: GoogleProtobufTimestamp.Timestamp } -export type GetUserKeyChainResponse = { +export type SyncUserKeyWalletResponse = { serverTime?: GoogleProtobufTimestamp.Timestamp publicKey?: string encryptedPrivateKey?: string userKeyWalletSet?: UserKeyWallet[] } -export type UpdateUserKeyChainRequest = { +export type UpdateUserKeyWalletRequest = { + publicKey?: string + encryptedPrivateKey?: string + userKeyWalletSet?: UserKeyWallet[] +} + +export type UpdateUserKeyWalletResponse = { publicKey?: string encryptedPrivateKey?: string userKeyWalletSet?: UserKeyWallet[] @@ -87,9 +93,6 @@ export type UserKeyWallet = { encryptedGroupPrivateKey?: string } -export type UpdateUserKeyChainResponse = { -} - export class SyncService { static Sync(req: SyncRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) @@ -103,10 +106,10 @@ export class SyncService { static SyncGroup(req: SyncGroupRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync_group?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } - static GetUserKeyChain(req: GetUserKeyChainRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/get_user_key_chain?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + static SyncUserKeyWallet(req: SyncUserKeyWalletRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/sync_user_key_wallet?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } - static UpdateUserKeyChain(req: UpdateUserKeyChainRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/update_user_key_chain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + static UpdateUserKeyWallet(req: UpdateUserKeyWalletRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/update_user_key_wallet`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } } \ No newline at end of file diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index d418b5e..b71a841 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -19,12 +19,12 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - SyncService_Sync_FullMethodName = "/sync.v1.SyncService/Sync" - SyncService_Update_FullMethodName = "/sync.v1.SyncService/Update" - SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" - SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" - SyncService_GetUserKeyChain_FullMethodName = "/sync.v1.SyncService/GetUserKeyChain" - SyncService_UpdateUserKeyChain_FullMethodName = "/sync.v1.SyncService/UpdateUserKeyChain" + SyncService_Sync_FullMethodName = "/sync.v1.SyncService/Sync" + SyncService_Update_FullMethodName = "/sync.v1.SyncService/Update" + SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" + SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" + SyncService_SyncUserKeyWallet_FullMethodName = "/sync.v1.SyncService/SyncUserKeyWallet" + SyncService_UpdateUserKeyWallet_FullMethodName = "/sync.v1.SyncService/UpdateUserKeyWallet" ) // SyncServiceClient is the client API for SyncService service. @@ -40,9 +40,9 @@ type SyncServiceClient interface { // 通过UID获取所有组信息 SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) // 获取用户密钥对 - GetUserKeyChain(ctx context.Context, in *GetUserKeyChainRequest, opts ...grpc.CallOption) (*GetUserKeyChainResponse, error) + SyncUserKeyWallet(ctx context.Context, in *SyncUserKeyWalletRequest, opts ...grpc.CallOption) (*SyncUserKeyWalletResponse, error) // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 - UpdateUserKeyChain(ctx context.Context, in *UpdateUserKeyChainRequest, opts ...grpc.CallOption) (*UpdateUserKeyChainResponse, error) + UpdateUserKeyWallet(ctx context.Context, in *UpdateUserKeyWalletRequest, opts ...grpc.CallOption) (*UpdateUserKeyWalletResponse, error) } type syncServiceClient struct { @@ -89,18 +89,18 @@ func (c *syncServiceClient) SyncGroup(ctx context.Context, in *SyncGroupRequest, return out, nil } -func (c *syncServiceClient) GetUserKeyChain(ctx context.Context, in *GetUserKeyChainRequest, opts ...grpc.CallOption) (*GetUserKeyChainResponse, error) { - out := new(GetUserKeyChainResponse) - err := c.cc.Invoke(ctx, SyncService_GetUserKeyChain_FullMethodName, in, out, opts...) +func (c *syncServiceClient) SyncUserKeyWallet(ctx context.Context, in *SyncUserKeyWalletRequest, opts ...grpc.CallOption) (*SyncUserKeyWalletResponse, error) { + out := new(SyncUserKeyWalletResponse) + err := c.cc.Invoke(ctx, SyncService_SyncUserKeyWallet_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *syncServiceClient) UpdateUserKeyChain(ctx context.Context, in *UpdateUserKeyChainRequest, opts ...grpc.CallOption) (*UpdateUserKeyChainResponse, error) { - out := new(UpdateUserKeyChainResponse) - err := c.cc.Invoke(ctx, SyncService_UpdateUserKeyChain_FullMethodName, in, out, opts...) +func (c *syncServiceClient) UpdateUserKeyWallet(ctx context.Context, in *UpdateUserKeyWalletRequest, opts ...grpc.CallOption) (*UpdateUserKeyWalletResponse, error) { + out := new(UpdateUserKeyWalletResponse) + err := c.cc.Invoke(ctx, SyncService_UpdateUserKeyWallet_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -120,9 +120,9 @@ type SyncServiceServer interface { // 通过UID获取所有组信息 SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) // 获取用户密钥对 - GetUserKeyChain(context.Context, *GetUserKeyChainRequest) (*GetUserKeyChainResponse, error) + SyncUserKeyWallet(context.Context, *SyncUserKeyWalletRequest) (*SyncUserKeyWalletResponse, error) // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 - UpdateUserKeyChain(context.Context, *UpdateUserKeyChainRequest) (*UpdateUserKeyChainResponse, error) + UpdateUserKeyWallet(context.Context, *UpdateUserKeyWalletRequest) (*UpdateUserKeyWalletResponse, error) mustEmbedUnimplementedSyncServiceServer() } @@ -142,11 +142,11 @@ func (UnimplementedSyncServiceServer) UpdateGroup(context.Context, *UpdateGroupR func (UnimplementedSyncServiceServer) SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncGroup not implemented") } -func (UnimplementedSyncServiceServer) GetUserKeyChain(context.Context, *GetUserKeyChainRequest) (*GetUserKeyChainResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserKeyChain not implemented") +func (UnimplementedSyncServiceServer) SyncUserKeyWallet(context.Context, *SyncUserKeyWalletRequest) (*SyncUserKeyWalletResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncUserKeyWallet not implemented") } -func (UnimplementedSyncServiceServer) UpdateUserKeyChain(context.Context, *UpdateUserKeyChainRequest) (*UpdateUserKeyChainResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateUserKeyChain not implemented") +func (UnimplementedSyncServiceServer) UpdateUserKeyWallet(context.Context, *UpdateUserKeyWalletRequest) (*UpdateUserKeyWalletResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUserKeyWallet not implemented") } func (UnimplementedSyncServiceServer) mustEmbedUnimplementedSyncServiceServer() {} @@ -233,38 +233,38 @@ func _SyncService_SyncGroup_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -func _SyncService_GetUserKeyChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserKeyChainRequest) +func _SyncService_SyncUserKeyWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncUserKeyWalletRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SyncServiceServer).GetUserKeyChain(ctx, in) + return srv.(SyncServiceServer).SyncUserKeyWallet(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SyncService_GetUserKeyChain_FullMethodName, + FullMethod: SyncService_SyncUserKeyWallet_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).GetUserKeyChain(ctx, req.(*GetUserKeyChainRequest)) + return srv.(SyncServiceServer).SyncUserKeyWallet(ctx, req.(*SyncUserKeyWalletRequest)) } return interceptor(ctx, in, info, handler) } -func _SyncService_UpdateUserKeyChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateUserKeyChainRequest) +func _SyncService_UpdateUserKeyWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateUserKeyWalletRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SyncServiceServer).UpdateUserKeyChain(ctx, in) + return srv.(SyncServiceServer).UpdateUserKeyWallet(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SyncService_UpdateUserKeyChain_FullMethodName, + FullMethod: SyncService_UpdateUserKeyWallet_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).UpdateUserKeyChain(ctx, req.(*UpdateUserKeyChainRequest)) + return srv.(SyncServiceServer).UpdateUserKeyWallet(ctx, req.(*UpdateUserKeyWalletRequest)) } return interceptor(ctx, in, info, handler) } @@ -293,12 +293,12 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ Handler: _SyncService_SyncGroup_Handler, }, { - MethodName: "GetUserKeyChain", - Handler: _SyncService_GetUserKeyChain_Handler, + MethodName: "SyncUserKeyWallet", + Handler: _SyncService_SyncUserKeyWallet_Handler, }, { - MethodName: "UpdateUserKeyChain", - Handler: _SyncService_UpdateUserKeyChain_Handler, + MethodName: "UpdateUserKeyWallet", + Handler: _SyncService_UpdateUserKeyWallet_Handler, }, }, Streams: []grpc.StreamDesc{}, From d39295bd90f28ee52eeac6d3691d5d2d12cf87a1 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Tue, 7 Nov 2023 12:21:51 +0800 Subject: [PATCH 31/46] fix: syncKeyChian with timestamp --- proto/sync/v1/sync_service.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 909dcc4..29d4835 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -128,4 +128,7 @@ message UpdateUserKeyWalletResponse { message UserKeyWallet { string gid = 1; string encrypted_group_privateKey = 2; + google.protobuf.Timestamp created_at = 3; + google.protobuf.Timestamp updated_at = 4; + google.protobuf.Timestamp deleted_at = 5; } \ No newline at end of file From 0ade7937c19bd23853af7aee603b5118bc8ef076 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Tue, 7 Nov 2023 04:22:47 +0000 Subject: [PATCH 32/46] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 12 ++ gen/proto/sync/v1/sync_service.pb.go | 185 +++++++++++------- gen/proto/sync/v1/sync_service.pb.ts | 3 + 3 files changed, 127 insertions(+), 73 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index dec5cdf..c97491f 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -652,6 +652,18 @@ }, "encryptedGroupPrivateKey": { "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "deletedAt": { + "type": "string", + "format": "date-time" } } } diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 37375cf..ef7da67 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -842,8 +842,11 @@ type UserKeyWallet struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - EncryptedGroupPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_group_privateKey,json=encryptedGroupPrivateKey,proto3" json:"encrypted_group_privateKey,omitempty"` + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + EncryptedGroupPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_group_privateKey,json=encryptedGroupPrivateKey,proto3" json:"encrypted_group_privateKey,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` } func (x *UserKeyWallet) Reset() { @@ -892,6 +895,27 @@ func (x *UserKeyWallet) GetEncryptedGroupPrivateKey() string { return "" } +func (x *UserKeyWallet) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *UserKeyWallet) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *UserKeyWallet) GetDeletedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeletedAt + } + return nil +} + var File_sync_v1_sync_service_proto protoreflect.FileDescriptor var file_sync_v1_sync_service_proto_rawDesc = []byte{ @@ -1024,60 +1048,72 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x5f, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x32, 0xae, 0x05, 0x0a, 0x0b, 0x53, 0x79, 0x6e, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, - 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, - 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, 0x01, 0x0a, - 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x23, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, - 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, - 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x90, 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xae, 0x05, 0x0a, 0x0b, 0x53, + 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, + 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, + 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, + 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, + 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, + 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1138,23 +1174,26 @@ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 12, // 20: sync.v1.SyncUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet 12, // 21: sync.v1.UpdateUserKeyWalletRequest.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet 12, // 22: sync.v1.UpdateUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 0, // 23: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest - 2, // 24: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest - 4, // 25: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest - 6, // 26: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 8, // 27: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest - 10, // 28: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest - 1, // 29: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 30: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse - 5, // 31: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 32: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 9, // 33: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse - 11, // 34: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse - 29, // [29:35] is the sub-list for method output_type - 23, // [23:29] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name + 13, // 23: sync.v1.UserKeyWallet.created_at:type_name -> google.protobuf.Timestamp + 13, // 24: sync.v1.UserKeyWallet.updated_at:type_name -> google.protobuf.Timestamp + 13, // 25: sync.v1.UserKeyWallet.deleted_at:type_name -> google.protobuf.Timestamp + 0, // 26: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest + 2, // 27: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest + 4, // 28: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest + 6, // 29: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 8, // 30: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest + 10, // 31: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest + 1, // 32: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse + 3, // 33: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 5, // 34: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 35: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 9, // 36: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse + 11, // 37: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse + 32, // [32:38] is the sub-list for method output_type + 26, // [26:32] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_sync_v1_sync_service_proto_init() } diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index eaa88e4..aa910e2 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -91,6 +91,9 @@ export type UpdateUserKeyWalletResponse = { export type UserKeyWallet = { gid?: string encryptedGroupPrivateKey?: string + createdAt?: GoogleProtobufTimestamp.Timestamp + updatedAt?: GoogleProtobufTimestamp.Timestamp + deletedAt?: GoogleProtobufTimestamp.Timestamp } export class SyncService { From ba93d18422509e4423a6b1ebab88608a7a95b494 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Wed, 8 Nov 2023 16:55:08 +0800 Subject: [PATCH 33/46] fix: UpdateGroup with user's keychain --- proto/sync/v1/group.proto | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/proto/sync/v1/group.proto b/proto/sync/v1/group.proto index b4d6117..d70fdfc 100644 --- a/proto/sync/v1/group.proto +++ b/proto/sync/v1/group.proto @@ -7,7 +7,7 @@ option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1" message Group { GroupBasic group_basic = 1; - repeated string member_id = 2; + repeated GroupKeyChain group_keychain = 3; } message GroupBasic { @@ -21,3 +21,8 @@ message GroupBasic { string uid = 8; // 创建者 string publicKey = 9; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 } + +message GroupKeyChain{ + string member_id = 1; + string privateKey = 2; +} From cb67b18b5f8ea1ece125cc251e6dbf460efc5821 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Wed, 8 Nov 2023 17:16:42 +0800 Subject: [PATCH 34/46] fix: order of proto --- gen/openapi/sync/v1/sync_service.swagger.json | 16 +- gen/proto/sync/v1/group.pb.go | 156 +++++++++++++----- gen/proto/sync/v1/group.pb.ts | 7 +- proto/sync/v1/group.proto | 6 +- 4 files changed, 139 insertions(+), 46 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index c97491f..1b5900d 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -255,10 +255,11 @@ "groupBasic": { "$ref": "#/definitions/v1GroupBasic" }, - "memberId": { + "groupKeychain": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/v1GroupKeyChain" } } } @@ -300,6 +301,17 @@ } } }, + "v1GroupKeyChain": { + "type": "object", + "properties": { + "memberId": { + "type": "string" + }, + "privateKey": { + "type": "string" + } + } + }, "v1Host": { "type": "object", "properties": { diff --git a/gen/proto/sync/v1/group.pb.go b/gen/proto/sync/v1/group.pb.go index 2f48ffe..d776c19 100644 --- a/gen/proto/sync/v1/group.pb.go +++ b/gen/proto/sync/v1/group.pb.go @@ -26,8 +26,8 @@ type Group struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupBasic *GroupBasic `protobuf:"bytes,1,opt,name=group_basic,json=groupBasic,proto3" json:"group_basic,omitempty"` - MemberId []string `protobuf:"bytes,2,rep,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` + GroupBasic *GroupBasic `protobuf:"bytes,1,opt,name=group_basic,json=groupBasic,proto3" json:"group_basic,omitempty"` + GroupKeychain []*GroupKeyChain `protobuf:"bytes,3,rep,name=group_keychain,json=groupKeychain,proto3" json:"group_keychain,omitempty"` } func (x *Group) Reset() { @@ -69,9 +69,9 @@ func (x *Group) GetGroupBasic() *GroupBasic { return nil } -func (x *Group) GetMemberId() []string { +func (x *Group) GetGroupKeychain() []*GroupKeyChain { if x != nil { - return x.MemberId + return x.GroupKeychain } return nil } @@ -187,6 +187,61 @@ func (x *GroupBasic) GetPublicKey() string { return "" } +type GroupKeyChain struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MemberId string `protobuf:"bytes,1,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` + PrivateKey string `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty"` +} + +func (x *GroupKeyChain) Reset() { + *x = GroupKeyChain{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_group_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupKeyChain) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupKeyChain) ProtoMessage() {} + +func (x *GroupKeyChain) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_group_proto_msgTypes[2] + 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 GroupKeyChain.ProtoReflect.Descriptor instead. +func (*GroupKeyChain) Descriptor() ([]byte, []int) { + return file_sync_v1_group_proto_rawDescGZIP(), []int{2} +} + +func (x *GroupKeyChain) GetMemberId() string { + if x != nil { + return x.MemberId + } + return "" +} + +func (x *GroupKeyChain) GetPrivateKey() string { + if x != nil { + return x.PrivateKey + } + return "" +} + var File_sync_v1_group_proto protoreflect.FileDescriptor var file_sync_v1_group_proto_rawDesc = []byte{ @@ -194,33 +249,40 @@ var file_sync_v1_group_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x5a, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x34, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, + 0x7c, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x34, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x61, 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, - 0x69, 0x63, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1b, - 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0xcb, 0x02, 0x0a, 0x0a, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, + 0x69, 0x63, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x3d, + 0x0a, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0d, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0xcb, 0x02, + 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x4c, 0x0a, 0x0d, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, @@ -239,22 +301,24 @@ func file_sync_v1_group_proto_rawDescGZIP() []byte { return file_sync_v1_group_proto_rawDescData } -var file_sync_v1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_sync_v1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_sync_v1_group_proto_goTypes = []interface{}{ (*Group)(nil), // 0: sync.v1.Group (*GroupBasic)(nil), // 1: sync.v1.GroupBasic - (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp + (*GroupKeyChain)(nil), // 2: sync.v1.GroupKeyChain + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp } var file_sync_v1_group_proto_depIdxs = []int32{ 1, // 0: sync.v1.Group.group_basic:type_name -> sync.v1.GroupBasic - 2, // 1: sync.v1.GroupBasic.created_at:type_name -> google.protobuf.Timestamp - 2, // 2: sync.v1.GroupBasic.updated_at:type_name -> google.protobuf.Timestamp - 2, // 3: sync.v1.GroupBasic.deleted_at:type_name -> google.protobuf.Timestamp - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 2, // 1: sync.v1.Group.group_keychain:type_name -> sync.v1.GroupKeyChain + 3, // 2: sync.v1.GroupBasic.created_at:type_name -> google.protobuf.Timestamp + 3, // 3: sync.v1.GroupBasic.updated_at:type_name -> google.protobuf.Timestamp + 3, // 4: sync.v1.GroupBasic.deleted_at:type_name -> google.protobuf.Timestamp + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_sync_v1_group_proto_init() } @@ -287,6 +351,18 @@ func file_sync_v1_group_proto_init() { return nil } } + file_sync_v1_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupKeyChain); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -294,7 +370,7 @@ func file_sync_v1_group_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_group_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/gen/proto/sync/v1/group.pb.ts b/gen/proto/sync/v1/group.pb.ts index b121fbc..f61c215 100644 --- a/gen/proto/sync/v1/group.pb.ts +++ b/gen/proto/sync/v1/group.pb.ts @@ -7,7 +7,7 @@ import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" export type Group = { groupBasic?: GroupBasic - memberId?: string[] + groupKeychain?: GroupKeyChain[] } export type GroupBasic = { @@ -20,4 +20,9 @@ export type GroupBasic = { avatar?: string uid?: string publicKey?: string +} + +export type GroupKeyChain = { + memberId?: string + privateKey?: string } \ No newline at end of file diff --git a/proto/sync/v1/group.proto b/proto/sync/v1/group.proto index d70fdfc..e0cfb57 100644 --- a/proto/sync/v1/group.proto +++ b/proto/sync/v1/group.proto @@ -7,7 +7,7 @@ option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1" message Group { GroupBasic group_basic = 1; - repeated GroupKeyChain group_keychain = 3; + repeated GroupKeyChain group_keychain = 2; } message GroupBasic { @@ -23,6 +23,6 @@ message GroupBasic { } message GroupKeyChain{ - string member_id = 1; - string privateKey = 2; + string member_id = 11; + string privateKey = 12; } From 071bd6f9e6b5b3af68a0951f7b7f6aef28567ba0 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Sat, 11 Nov 2023 22:47:35 +0800 Subject: [PATCH 35/46] fix: name format of proto --- gen/openapi/sync/v1/sync_service.swagger.json | 90 +-- gen/proto/sync/v1/group.pb.go | 12 +- gen/proto/sync/v1/sync_service.pb.go | 596 +++++++++--------- gen/proto/sync/v1/sync_service.pb.gw.go | 70 +- gen/proto/sync/v1/sync_service.pb.ts | 20 +- gen/proto/sync/v1/sync_service_grpc.pb.go | 60 +- proto/sync/v1/sync_service.proto | 30 +- 7 files changed, 441 insertions(+), 437 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 1b5900d..6b7041a 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -16,15 +16,15 @@ "application/json" ], "paths": { - "/gapi/sync/v1/sync": { + "/gapi/sync/v1/sync_config": { "get": { "summary": "拉取指定时间点之后的配置变动信息", - "operationId": "SyncService_Sync", + "operationId": "SyncService_SyncConfig", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SyncResponse" + "$ref": "#/definitions/v1SyncConfigResponse" } }, "default": { @@ -120,15 +120,15 @@ ] } }, - "/gapi/sync/v1/update": { + "/gapi/sync/v1/update_config": { "post": { "summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。", - "operationId": "SyncService_Update", + "operationId": "SyncService_UpdateConfig", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateResponse" + "$ref": "#/definitions/v1UpdateConfigResponse" } }, "default": { @@ -144,7 +144,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1UpdateRequest" + "$ref": "#/definitions/v1UpdateConfigRequest" } } ], @@ -486,23 +486,7 @@ }, "title": "SSH 密钥" }, - "v1SyncGroupResponse": { - "type": "object", - "properties": { - "serverTime": { - "type": "string", - "format": "date-time" - }, - "groups": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1Group" - } - } - } - }, - "v1SyncResponse": { + "v1SyncConfigResponse": { "type": "object", "properties": { "serverTime": { @@ -540,6 +524,22 @@ } } }, + "v1SyncGroupResponse": { + "type": "object", + "properties": { + "serverTime": { + "type": "string", + "format": "date-time" + }, + "groups": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Group" + } + } + } + }, "v1SyncUserKeyWalletResponse": { "type": "object", "properties": { @@ -563,25 +563,7 @@ } } }, - "v1UpdateGroupRequest": { - "type": "object", - "properties": { - "group": { - "$ref": "#/definitions/v1Group" - }, - "publicKey": { - "type": "string" - }, - "encryptedCreatorPrivateKey": { - "type": "string" - } - }, - "title": "UpdateGroup\n更新组信息,如果是创建组的请求则需要带上创建者的密钥\n密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示" - }, - "v1UpdateGroupResponse": { - "type": "object" - }, - "v1UpdateRequest": { + "v1UpdateConfigRequest": { "type": "object", "properties": { "groupId": { @@ -600,9 +582,9 @@ "$ref": "#/definitions/v1Identity" } }, - "title": "Update" + "title": "UpdateConfig" }, - "v1UpdateResponse": { + "v1UpdateConfigResponse": { "type": "object", "properties": { "host": { @@ -619,6 +601,24 @@ } } }, + "v1UpdateGroupRequest": { + "type": "object", + "properties": { + "group": { + "$ref": "#/definitions/v1Group" + }, + "publicKey": { + "type": "string" + }, + "encryptedCreatorPrivateKey": { + "type": "string" + } + }, + "title": "UpdateGroup\n更新组信息,如果是创建组的请求则需要带上创建者的密钥\n密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示" + }, + "v1UpdateGroupResponse": { + "type": "object" + }, "v1UpdateUserKeyWalletRequest": { "type": "object", "properties": { diff --git a/gen/proto/sync/v1/group.pb.go b/gen/proto/sync/v1/group.pb.go index d776c19..78bd366 100644 --- a/gen/proto/sync/v1/group.pb.go +++ b/gen/proto/sync/v1/group.pb.go @@ -27,7 +27,7 @@ type Group struct { unknownFields protoimpl.UnknownFields GroupBasic *GroupBasic `protobuf:"bytes,1,opt,name=group_basic,json=groupBasic,proto3" json:"group_basic,omitempty"` - GroupKeychain []*GroupKeyChain `protobuf:"bytes,3,rep,name=group_keychain,json=groupKeychain,proto3" json:"group_keychain,omitempty"` + GroupKeychain []*GroupKeyChain `protobuf:"bytes,2,rep,name=group_keychain,json=groupKeychain,proto3" json:"group_keychain,omitempty"` } func (x *Group) Reset() { @@ -192,8 +192,8 @@ type GroupKeyChain struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MemberId string `protobuf:"bytes,1,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` - PrivateKey string `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty"` + MemberId string `protobuf:"bytes,11,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` + PrivateKey string `protobuf:"bytes,12,opt,name=privateKey,proto3" json:"privateKey,omitempty"` } func (x *GroupKeyChain) Reset() { @@ -254,7 +254,7 @@ var file_sync_v1_group_proto_rawDesc = []byte{ 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x3d, 0x0a, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0xcb, 0x02, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, @@ -279,9 +279,9 @@ var file_sync_v1_group_proto_rawDesc = []byte{ 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x4c, 0x0a, 0x0d, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index ef7da67..d6f09d8 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -22,8 +22,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Sync -type SyncRequest struct { +// SyncConfig +type SyncConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -32,8 +32,8 @@ type SyncRequest struct { GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` } -func (x *SyncRequest) Reset() { - *x = SyncRequest{} +func (x *SyncConfigRequest) Reset() { + *x = SyncConfigRequest{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -41,13 +41,13 @@ func (x *SyncRequest) Reset() { } } -func (x *SyncRequest) String() string { +func (x *SyncConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncRequest) ProtoMessage() {} +func (*SyncConfigRequest) ProtoMessage() {} -func (x *SyncRequest) ProtoReflect() protoreflect.Message { +func (x *SyncConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -59,26 +59,26 @@ func (x *SyncRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead. -func (*SyncRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncConfigRequest.ProtoReflect.Descriptor instead. +func (*SyncConfigRequest) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{0} } -func (x *SyncRequest) GetAfter() *timestamppb.Timestamp { +func (x *SyncConfigRequest) GetAfter() *timestamppb.Timestamp { if x != nil { return x.After } return nil } -func (x *SyncRequest) GetGroupId() string { +func (x *SyncConfigRequest) GetGroupId() string { if x != nil { return x.GroupId } return "" } -type SyncResponse struct { +type SyncConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -90,8 +90,8 @@ type SyncResponse struct { IdentitySet []*Identity `protobuf:"bytes,14,rep,name=identity_set,json=identitySet,proto3" json:"identity_set,omitempty"` } -func (x *SyncResponse) Reset() { - *x = SyncResponse{} +func (x *SyncConfigResponse) Reset() { + *x = SyncConfigResponse{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -99,13 +99,13 @@ func (x *SyncResponse) Reset() { } } -func (x *SyncResponse) String() string { +func (x *SyncConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncResponse) ProtoMessage() {} +func (*SyncConfigResponse) ProtoMessage() {} -func (x *SyncResponse) ProtoReflect() protoreflect.Message { +func (x *SyncConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -117,48 +117,48 @@ func (x *SyncResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead. -func (*SyncResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncConfigResponse.ProtoReflect.Descriptor instead. +func (*SyncConfigResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{1} } -func (x *SyncResponse) GetServerTime() *timestamppb.Timestamp { +func (x *SyncConfigResponse) GetServerTime() *timestamppb.Timestamp { if x != nil { return x.ServerTime } return nil } -func (x *SyncResponse) GetHostSet() []*Host { +func (x *SyncConfigResponse) GetHostSet() []*Host { if x != nil { return x.HostSet } return nil } -func (x *SyncResponse) GetKnownHostSet() []*KnownHost { +func (x *SyncConfigResponse) GetKnownHostSet() []*KnownHost { if x != nil { return x.KnownHostSet } return nil } -func (x *SyncResponse) GetSshKeySet() []*SshKey { +func (x *SyncConfigResponse) GetSshKeySet() []*SshKey { if x != nil { return x.SshKeySet } return nil } -func (x *SyncResponse) GetIdentitySet() []*Identity { +func (x *SyncConfigResponse) GetIdentitySet() []*Identity { if x != nil { return x.IdentitySet } return nil } -// Update -type UpdateRequest struct { +// UpdateConfig +type UpdateConfigRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -166,15 +166,15 @@ type UpdateRequest struct { GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // Types that are assignable to Data: // - // *UpdateRequest_Host - // *UpdateRequest_KnownHost - // *UpdateRequest_SshKey - // *UpdateRequest_Identity - Data isUpdateRequest_Data `protobuf_oneof:"data"` + // *UpdateConfigRequest_Host + // *UpdateConfigRequest_KnownHost + // *UpdateConfigRequest_SshKey + // *UpdateConfigRequest_Identity + Data isUpdateConfigRequest_Data `protobuf_oneof:"data"` } -func (x *UpdateRequest) Reset() { - *x = UpdateRequest{} +func (x *UpdateConfigRequest) Reset() { + *x = UpdateConfigRequest{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -182,13 +182,13 @@ func (x *UpdateRequest) Reset() { } } -func (x *UpdateRequest) String() string { +func (x *UpdateConfigRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateRequest) ProtoMessage() {} +func (*UpdateConfigRequest) ProtoMessage() {} -func (x *UpdateRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -200,97 +200,97 @@ func (x *UpdateRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead. -func (*UpdateRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateConfigRequest.ProtoReflect.Descriptor instead. +func (*UpdateConfigRequest) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{2} } -func (x *UpdateRequest) GetGroupId() string { +func (x *UpdateConfigRequest) GetGroupId() string { if x != nil { return x.GroupId } return "" } -func (m *UpdateRequest) GetData() isUpdateRequest_Data { +func (m *UpdateConfigRequest) GetData() isUpdateConfigRequest_Data { if m != nil { return m.Data } return nil } -func (x *UpdateRequest) GetHost() *Host { - if x, ok := x.GetData().(*UpdateRequest_Host); ok { +func (x *UpdateConfigRequest) GetHost() *Host { + if x, ok := x.GetData().(*UpdateConfigRequest_Host); ok { return x.Host } return nil } -func (x *UpdateRequest) GetKnownHost() *KnownHost { - if x, ok := x.GetData().(*UpdateRequest_KnownHost); ok { +func (x *UpdateConfigRequest) GetKnownHost() *KnownHost { + if x, ok := x.GetData().(*UpdateConfigRequest_KnownHost); ok { return x.KnownHost } return nil } -func (x *UpdateRequest) GetSshKey() *SshKey { - if x, ok := x.GetData().(*UpdateRequest_SshKey); ok { +func (x *UpdateConfigRequest) GetSshKey() *SshKey { + if x, ok := x.GetData().(*UpdateConfigRequest_SshKey); ok { return x.SshKey } return nil } -func (x *UpdateRequest) GetIdentity() *Identity { - if x, ok := x.GetData().(*UpdateRequest_Identity); ok { +func (x *UpdateConfigRequest) GetIdentity() *Identity { + if x, ok := x.GetData().(*UpdateConfigRequest_Identity); ok { return x.Identity } return nil } -type isUpdateRequest_Data interface { - isUpdateRequest_Data() +type isUpdateConfigRequest_Data interface { + isUpdateConfigRequest_Data() } -type UpdateRequest_Host struct { +type UpdateConfigRequest_Host struct { Host *Host `protobuf:"bytes,11,opt,name=host,proto3,oneof"` } -type UpdateRequest_KnownHost struct { +type UpdateConfigRequest_KnownHost struct { KnownHost *KnownHost `protobuf:"bytes,12,opt,name=known_host,json=knownHost,proto3,oneof"` } -type UpdateRequest_SshKey struct { +type UpdateConfigRequest_SshKey struct { SshKey *SshKey `protobuf:"bytes,13,opt,name=ssh_key,json=sshKey,proto3,oneof"` } -type UpdateRequest_Identity struct { +type UpdateConfigRequest_Identity struct { Identity *Identity `protobuf:"bytes,14,opt,name=identity,proto3,oneof"` } -func (*UpdateRequest_Host) isUpdateRequest_Data() {} +func (*UpdateConfigRequest_Host) isUpdateConfigRequest_Data() {} -func (*UpdateRequest_KnownHost) isUpdateRequest_Data() {} +func (*UpdateConfigRequest_KnownHost) isUpdateConfigRequest_Data() {} -func (*UpdateRequest_SshKey) isUpdateRequest_Data() {} +func (*UpdateConfigRequest_SshKey) isUpdateConfigRequest_Data() {} -func (*UpdateRequest_Identity) isUpdateRequest_Data() {} +func (*UpdateConfigRequest_Identity) isUpdateConfigRequest_Data() {} -type UpdateResponse struct { +type UpdateConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Types that are assignable to Data: // - // *UpdateResponse_Host - // *UpdateResponse_KnownHost - // *UpdateResponse_SshKey - // *UpdateResponse_Identity - Data isUpdateResponse_Data `protobuf_oneof:"data"` + // *UpdateConfigResponse_Host + // *UpdateConfigResponse_KnownHost + // *UpdateConfigResponse_SshKey + // *UpdateConfigResponse_Identity + Data isUpdateConfigResponse_Data `protobuf_oneof:"data"` } -func (x *UpdateResponse) Reset() { - *x = UpdateResponse{} +func (x *UpdateConfigResponse) Reset() { + *x = UpdateConfigResponse{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -298,13 +298,13 @@ func (x *UpdateResponse) Reset() { } } -func (x *UpdateResponse) String() string { +func (x *UpdateConfigResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateResponse) ProtoMessage() {} +func (*UpdateConfigResponse) ProtoMessage() {} -func (x *UpdateResponse) ProtoReflect() protoreflect.Message { +func (x *UpdateConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -316,73 +316,73 @@ func (x *UpdateResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead. -func (*UpdateResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateConfigResponse.ProtoReflect.Descriptor instead. +func (*UpdateConfigResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{3} } -func (m *UpdateResponse) GetData() isUpdateResponse_Data { +func (m *UpdateConfigResponse) GetData() isUpdateConfigResponse_Data { if m != nil { return m.Data } return nil } -func (x *UpdateResponse) GetHost() *Host { - if x, ok := x.GetData().(*UpdateResponse_Host); ok { +func (x *UpdateConfigResponse) GetHost() *Host { + if x, ok := x.GetData().(*UpdateConfigResponse_Host); ok { return x.Host } return nil } -func (x *UpdateResponse) GetKnownHost() *KnownHost { - if x, ok := x.GetData().(*UpdateResponse_KnownHost); ok { +func (x *UpdateConfigResponse) GetKnownHost() *KnownHost { + if x, ok := x.GetData().(*UpdateConfigResponse_KnownHost); ok { return x.KnownHost } return nil } -func (x *UpdateResponse) GetSshKey() *SshKey { - if x, ok := x.GetData().(*UpdateResponse_SshKey); ok { +func (x *UpdateConfigResponse) GetSshKey() *SshKey { + if x, ok := x.GetData().(*UpdateConfigResponse_SshKey); ok { return x.SshKey } return nil } -func (x *UpdateResponse) GetIdentity() *Identity { - if x, ok := x.GetData().(*UpdateResponse_Identity); ok { +func (x *UpdateConfigResponse) GetIdentity() *Identity { + if x, ok := x.GetData().(*UpdateConfigResponse_Identity); ok { return x.Identity } return nil } -type isUpdateResponse_Data interface { - isUpdateResponse_Data() +type isUpdateConfigResponse_Data interface { + isUpdateConfigResponse_Data() } -type UpdateResponse_Host struct { +type UpdateConfigResponse_Host struct { Host *Host `protobuf:"bytes,11,opt,name=host,proto3,oneof"` } -type UpdateResponse_KnownHost struct { +type UpdateConfigResponse_KnownHost struct { KnownHost *KnownHost `protobuf:"bytes,12,opt,name=known_host,json=knownHost,proto3,oneof"` } -type UpdateResponse_SshKey struct { +type UpdateConfigResponse_SshKey struct { SshKey *SshKey `protobuf:"bytes,13,opt,name=ssh_key,json=sshKey,proto3,oneof"` } -type UpdateResponse_Identity struct { +type UpdateConfigResponse_Identity struct { Identity *Identity `protobuf:"bytes,14,opt,name=identity,proto3,oneof"` } -func (*UpdateResponse_Host) isUpdateResponse_Data() {} +func (*UpdateConfigResponse_Host) isUpdateConfigResponse_Data() {} -func (*UpdateResponse_KnownHost) isUpdateResponse_Data() {} +func (*UpdateConfigResponse_KnownHost) isUpdateConfigResponse_Data() {} -func (*UpdateResponse_SshKey) isUpdateResponse_Data() {} +func (*UpdateConfigResponse_SshKey) isUpdateConfigResponse_Data() {} -func (*UpdateResponse_Identity) isUpdateResponse_Data() {} +func (*UpdateConfigResponse_Identity) isUpdateConfigResponse_Data() {} // UpdateGroup // 更新组信息,如果是创建组的请求则需要带上创建者的密钥 @@ -394,7 +394,7 @@ type UpdateGroupRequest struct { Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedCreatorPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_creator_privateKey,json=encryptedCreatorPrivateKey,proto3" json:"encrypted_creator_privateKey,omitempty"` + EncryptedCreatorPrivateKey string `protobuf:"bytes,3,opt,name=encryptedCreatorPrivateKey,proto3" json:"encryptedCreatorPrivateKey,omitempty"` } func (x *UpdateGroupRequest) Reset() { @@ -646,7 +646,7 @@ type SyncUserKeyWalletResponse struct { ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"` // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` } @@ -717,7 +717,7 @@ type UpdateUserKeyWalletRequest struct { unknownFields protoimpl.UnknownFields PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` } @@ -780,7 +780,7 @@ type UpdateUserKeyWalletResponse struct { unknownFields protoimpl.UnknownFields PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_privateKey,json=encryptedPrivateKey,proto3" json:"encrypted_privateKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` } @@ -843,7 +843,7 @@ type UserKeyWallet struct { unknownFields protoimpl.UnknownFields Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - EncryptedGroupPrivateKey string `protobuf:"bytes,2,opt,name=encrypted_group_privateKey,json=encryptedGroupPrivateKey,proto3" json:"encrypted_group_privateKey,omitempty"` + EncryptedGroupPrivateKey string `protobuf:"bytes,2,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` DeletedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` @@ -931,46 +931,34 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x1a, 0x19, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x5a, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, - 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x96, 0x02, 0x0a, - 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, - 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x07, 0x68, 0x6f, 0x73, - 0x74, 0x53, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x0e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, - 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2f, - 0x0a, 0x0b, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, - 0x68, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, - 0x34, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, - 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0xe9, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x22, 0x60, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, - 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, - 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, - 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x22, 0xcf, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, + 0x49, 0x64, 0x22, 0x9c, 0x02, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, + 0x65, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, + 0x12, 0x38, 0x0a, 0x0e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, + 0x65, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0c, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x0b, 0x73, 0x73, + 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, + 0x52, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, + 0x74, 0x22, 0xef, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, @@ -982,138 +970,154 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x9a, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x40, - 0x0a, 0x1c, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, - 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x78, 0x0a, - 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x4c, 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, - 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0xf0, 0x01, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, - 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, - 0xb5, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x31, 0x0a, - 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x90, 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x61, 0x74, 0x61, 0x22, 0xd5, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, + 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, + 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, + 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x98, 0x01, 0x0a, 0x12, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x1a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, + 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, + 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x4c, 0x0a, + 0x18, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xae, 0x05, 0x0a, 0x0b, 0x53, - 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x53, 0x79, - 0x6e, 0x63, 0x12, 0x14, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, - 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x5a, 0x0a, 0x06, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, - 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, - 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0xef, 0x01, 0x0a, 0x19, + 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb3, 0x01, + 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, + 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x53, 0x65, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x8e, 0x02, 0x0a, 0x0d, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3a, + 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xe0, 0x05, 0x0a, 0x0b, + 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0a, 0x53, + 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, + 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, + 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, + 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x86, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, - 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, - 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x74, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, + 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, + 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1130,10 +1134,10 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ - (*SyncRequest)(nil), // 0: sync.v1.SyncRequest - (*SyncResponse)(nil), // 1: sync.v1.SyncResponse - (*UpdateRequest)(nil), // 2: sync.v1.UpdateRequest - (*UpdateResponse)(nil), // 3: sync.v1.UpdateResponse + (*SyncConfigRequest)(nil), // 0: sync.v1.SyncConfigRequest + (*SyncConfigResponse)(nil), // 1: sync.v1.SyncConfigResponse + (*UpdateConfigRequest)(nil), // 2: sync.v1.UpdateConfigRequest + (*UpdateConfigResponse)(nil), // 3: sync.v1.UpdateConfigResponse (*UpdateGroupRequest)(nil), // 4: sync.v1.UpdateGroupRequest (*UpdateGroupResponse)(nil), // 5: sync.v1.UpdateGroupResponse (*SyncGroupRequest)(nil), // 6: sync.v1.SyncGroupRequest @@ -1151,20 +1155,20 @@ var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*Group)(nil), // 18: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 13, // 0: sync.v1.SyncRequest.after:type_name -> google.protobuf.Timestamp - 13, // 1: sync.v1.SyncResponse.server_time:type_name -> google.protobuf.Timestamp - 14, // 2: sync.v1.SyncResponse.host_set:type_name -> sync.v1.Host - 15, // 3: sync.v1.SyncResponse.known_host_set:type_name -> sync.v1.KnownHost - 16, // 4: sync.v1.SyncResponse.ssh_key_set:type_name -> sync.v1.SshKey - 17, // 5: sync.v1.SyncResponse.identity_set:type_name -> sync.v1.Identity - 14, // 6: sync.v1.UpdateRequest.host:type_name -> sync.v1.Host - 15, // 7: sync.v1.UpdateRequest.known_host:type_name -> sync.v1.KnownHost - 16, // 8: sync.v1.UpdateRequest.ssh_key:type_name -> sync.v1.SshKey - 17, // 9: sync.v1.UpdateRequest.identity:type_name -> sync.v1.Identity - 14, // 10: sync.v1.UpdateResponse.host:type_name -> sync.v1.Host - 15, // 11: sync.v1.UpdateResponse.known_host:type_name -> sync.v1.KnownHost - 16, // 12: sync.v1.UpdateResponse.ssh_key:type_name -> sync.v1.SshKey - 17, // 13: sync.v1.UpdateResponse.identity:type_name -> sync.v1.Identity + 13, // 0: sync.v1.SyncConfigRequest.after:type_name -> google.protobuf.Timestamp + 13, // 1: sync.v1.SyncConfigResponse.server_time:type_name -> google.protobuf.Timestamp + 14, // 2: sync.v1.SyncConfigResponse.host_set:type_name -> sync.v1.Host + 15, // 3: sync.v1.SyncConfigResponse.known_host_set:type_name -> sync.v1.KnownHost + 16, // 4: sync.v1.SyncConfigResponse.ssh_key_set:type_name -> sync.v1.SshKey + 17, // 5: sync.v1.SyncConfigResponse.identity_set:type_name -> sync.v1.Identity + 14, // 6: sync.v1.UpdateConfigRequest.host:type_name -> sync.v1.Host + 15, // 7: sync.v1.UpdateConfigRequest.known_host:type_name -> sync.v1.KnownHost + 16, // 8: sync.v1.UpdateConfigRequest.ssh_key:type_name -> sync.v1.SshKey + 17, // 9: sync.v1.UpdateConfigRequest.identity:type_name -> sync.v1.Identity + 14, // 10: sync.v1.UpdateConfigResponse.host:type_name -> sync.v1.Host + 15, // 11: sync.v1.UpdateConfigResponse.known_host:type_name -> sync.v1.KnownHost + 16, // 12: sync.v1.UpdateConfigResponse.ssh_key:type_name -> sync.v1.SshKey + 17, // 13: sync.v1.UpdateConfigResponse.identity:type_name -> sync.v1.Identity 18, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group 13, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp 13, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp @@ -1177,14 +1181,14 @@ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 13, // 23: sync.v1.UserKeyWallet.created_at:type_name -> google.protobuf.Timestamp 13, // 24: sync.v1.UserKeyWallet.updated_at:type_name -> google.protobuf.Timestamp 13, // 25: sync.v1.UserKeyWallet.deleted_at:type_name -> google.protobuf.Timestamp - 0, // 26: sync.v1.SyncService.Sync:input_type -> sync.v1.SyncRequest - 2, // 27: sync.v1.SyncService.Update:input_type -> sync.v1.UpdateRequest + 0, // 26: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest + 2, // 27: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest 4, // 28: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest 6, // 29: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest 8, // 30: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest 10, // 31: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest - 1, // 32: sync.v1.SyncService.Sync:output_type -> sync.v1.SyncResponse - 3, // 33: sync.v1.SyncService.Update:output_type -> sync.v1.UpdateResponse + 1, // 32: sync.v1.SyncService.SyncConfig:output_type -> sync.v1.SyncConfigResponse + 3, // 33: sync.v1.SyncService.UpdateConfig:output_type -> sync.v1.UpdateConfigResponse 5, // 34: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse 7, // 35: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse 9, // 36: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse @@ -1207,7 +1211,7 @@ func file_sync_v1_sync_service_proto_init() { file_sync_v1_group_proto_init() if !protoimpl.UnsafeEnabled { file_sync_v1_sync_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncRequest); i { + switch v := v.(*SyncConfigRequest); i { case 0: return &v.state case 1: @@ -1219,7 +1223,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncResponse); i { + switch v := v.(*SyncConfigResponse); i { case 0: return &v.state case 1: @@ -1231,7 +1235,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateRequest); i { + switch v := v.(*UpdateConfigRequest); i { case 0: return &v.state case 1: @@ -1243,7 +1247,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResponse); i { + switch v := v.(*UpdateConfigResponse); i { case 0: return &v.state case 1: @@ -1364,16 +1368,16 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*UpdateRequest_Host)(nil), - (*UpdateRequest_KnownHost)(nil), - (*UpdateRequest_SshKey)(nil), - (*UpdateRequest_Identity)(nil), + (*UpdateConfigRequest_Host)(nil), + (*UpdateConfigRequest_KnownHost)(nil), + (*UpdateConfigRequest_SshKey)(nil), + (*UpdateConfigRequest_Identity)(nil), } file_sync_v1_sync_service_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*UpdateResponse_Host)(nil), - (*UpdateResponse_KnownHost)(nil), - (*UpdateResponse_SshKey)(nil), - (*UpdateResponse_Identity)(nil), + (*UpdateConfigResponse_Host)(nil), + (*UpdateConfigResponse_KnownHost)(nil), + (*UpdateConfigResponse_SshKey)(nil), + (*UpdateConfigResponse_Identity)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index d4311fc..81660cf 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -32,43 +32,43 @@ var _ = utilities.NewDoubleArray var _ = metadata.Join var ( - filter_SyncService_Sync_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_SyncService_SyncConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_SyncService_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncRequest +func request_SyncService_SyncConfig_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncConfigRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_Sync_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_SyncConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Sync(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.SyncConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SyncService_Sync_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncRequest +func local_request_SyncService_SyncConfig_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncConfigRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_Sync_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_SyncConfig_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Sync(ctx, &protoReq) + msg, err := server.SyncConfig(ctx, &protoReq) return msg, metadata, err } -func request_SyncService_Update_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateRequest +func request_SyncService_UpdateConfig_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateConfigRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -79,13 +79,13 @@ func request_SyncService_Update_0(ctx context.Context, marshaler runtime.Marshal return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Update(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.UpdateConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SyncService_Update_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateRequest +func local_request_SyncService_UpdateConfig_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateConfigRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -96,7 +96,7 @@ func local_request_SyncService_Update_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Update(ctx, &protoReq) + msg, err := server.UpdateConfig(ctx, &protoReq) return msg, metadata, err } @@ -247,7 +247,7 @@ func local_request_SyncService_UpdateUserKeyWallet_0(ctx context.Context, marsha // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSyncServiceHandlerFromEndpoint instead. func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SyncServiceServer) error { - mux.Handle("GET", pattern_SyncService_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -255,12 +255,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/Sync", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_Sync_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_SyncConfig_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -268,11 +268,11 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_Sync_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SyncService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_UpdateConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -280,12 +280,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/Update", runtime.WithHTTPPathPattern("/gapi/sync/v1/update")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_Update_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_UpdateConfig_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -293,7 +293,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -438,47 +438,47 @@ func RegisterSyncServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // "SyncServiceClient" to call the correct interceptors. func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SyncServiceClient) error { - mux.Handle("GET", pattern_SyncService_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/Sync", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_Sync_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_SyncConfig_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_Sync_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SyncService_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_UpdateConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/Update", runtime.WithHTTPPathPattern("/gapi/sync/v1/update")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_Update_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_UpdateConfig_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -574,9 +574,9 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } var ( - pattern_SyncService_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1}, []string{"gapi", "sync", "v1"}, "")) + pattern_SyncService_SyncConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_config"}, "")) - pattern_SyncService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update"}, "")) + pattern_SyncService_UpdateConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_config"}, "")) pattern_SyncService_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_group"}, "")) @@ -588,9 +588,9 @@ var ( ) var ( - forward_SyncService_Sync_0 = runtime.ForwardResponseMessage + forward_SyncService_SyncConfig_0 = runtime.ForwardResponseMessage - forward_SyncService_Update_0 = runtime.ForwardResponseMessage + forward_SyncService_UpdateConfig_0 = runtime.ForwardResponseMessage forward_SyncService_UpdateGroup_0 = runtime.ForwardResponseMessage diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index aa910e2..750add5 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -19,12 +19,12 @@ type OneOf = (K extends string & keyof T ? { [k in K]: T[K] } & Absent : never) : never); -export type SyncRequest = { +export type SyncConfigRequest = { after?: GoogleProtobufTimestamp.Timestamp groupId?: string } -export type SyncResponse = { +export type SyncConfigResponse = { serverTime?: GoogleProtobufTimestamp.Timestamp hostSet?: SyncV1Host.Host[] knownHostSet?: SyncV1Known_hosts.KnownHost[] @@ -33,18 +33,18 @@ export type SyncResponse = { } -type BaseUpdateRequest = { +type BaseUpdateConfigRequest = { groupId?: string } -export type UpdateRequest = BaseUpdateRequest +export type UpdateConfigRequest = BaseUpdateConfigRequest & OneOf<{ host: SyncV1Host.Host; knownHost: SyncV1Known_hosts.KnownHost; sshKey: SyncV1Keychain.SshKey; identity: SyncV1Keychain.Identity }> -type BaseUpdateResponse = { +type BaseUpdateConfigResponse = { } -export type UpdateResponse = BaseUpdateResponse +export type UpdateConfigResponse = BaseUpdateConfigResponse & OneOf<{ host: SyncV1Host.Host; knownHost: SyncV1Known_hosts.KnownHost; sshKey: SyncV1Keychain.SshKey; identity: SyncV1Keychain.Identity }> export type UpdateGroupRequest = { @@ -97,11 +97,11 @@ export type UserKeyWallet = { } export class SyncService { - static Sync(req: SyncRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/sync?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + static SyncConfig(req: SyncConfigRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/sync_config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } - static Update(req: UpdateRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/update`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + static UpdateConfig(req: UpdateConfigRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/update_config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } static UpdateGroup(req: UpdateGroupRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/update_group`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index b71a841..ead2787 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -19,8 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - SyncService_Sync_FullMethodName = "/sync.v1.SyncService/Sync" - SyncService_Update_FullMethodName = "/sync.v1.SyncService/Update" + SyncService_SyncConfig_FullMethodName = "/sync.v1.SyncService/SyncConfig" + SyncService_UpdateConfig_FullMethodName = "/sync.v1.SyncService/UpdateConfig" SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" SyncService_SyncUserKeyWallet_FullMethodName = "/sync.v1.SyncService/SyncUserKeyWallet" @@ -32,9 +32,9 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type SyncServiceClient interface { // 拉取指定时间点之后的配置变动信息 - Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) + SyncConfig(ctx context.Context, in *SyncConfigRequest, opts ...grpc.CallOption) (*SyncConfigResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 - Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) + UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*UpdateConfigResponse, error) // 更新组信息,如果是创建组的请求则同时处理密钥 UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 @@ -53,18 +53,18 @@ func NewSyncServiceClient(cc grpc.ClientConnInterface) SyncServiceClient { return &syncServiceClient{cc} } -func (c *syncServiceClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { - out := new(SyncResponse) - err := c.cc.Invoke(ctx, SyncService_Sync_FullMethodName, in, out, opts...) +func (c *syncServiceClient) SyncConfig(ctx context.Context, in *SyncConfigRequest, opts ...grpc.CallOption) (*SyncConfigResponse, error) { + out := new(SyncConfigResponse) + err := c.cc.Invoke(ctx, SyncService_SyncConfig_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *syncServiceClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) { - out := new(UpdateResponse) - err := c.cc.Invoke(ctx, SyncService_Update_FullMethodName, in, out, opts...) +func (c *syncServiceClient) UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*UpdateConfigResponse, error) { + out := new(UpdateConfigResponse) + err := c.cc.Invoke(ctx, SyncService_UpdateConfig_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -112,9 +112,9 @@ func (c *syncServiceClient) UpdateUserKeyWallet(ctx context.Context, in *UpdateU // for forward compatibility type SyncServiceServer interface { // 拉取指定时间点之后的配置变动信息 - Sync(context.Context, *SyncRequest) (*SyncResponse, error) + SyncConfig(context.Context, *SyncConfigRequest) (*SyncConfigResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 - Update(context.Context, *UpdateRequest) (*UpdateResponse, error) + UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) // 更新组信息,如果是创建组的请求则同时处理密钥 UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 @@ -130,11 +130,11 @@ type SyncServiceServer interface { type UnimplementedSyncServiceServer struct { } -func (UnimplementedSyncServiceServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") +func (UnimplementedSyncServiceServer) SyncConfig(context.Context, *SyncConfigRequest) (*SyncConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncConfig not implemented") } -func (UnimplementedSyncServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +func (UnimplementedSyncServiceServer) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateConfig not implemented") } func (UnimplementedSyncServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") @@ -161,38 +161,38 @@ func RegisterSyncServiceServer(s grpc.ServiceRegistrar, srv SyncServiceServer) { s.RegisterService(&SyncService_ServiceDesc, srv) } -func _SyncService_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SyncRequest) +func _SyncService_SyncConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncConfigRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SyncServiceServer).Sync(ctx, in) + return srv.(SyncServiceServer).SyncConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SyncService_Sync_FullMethodName, + FullMethod: SyncService_SyncConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).Sync(ctx, req.(*SyncRequest)) + return srv.(SyncServiceServer).SyncConfig(ctx, req.(*SyncConfigRequest)) } return interceptor(ctx, in, info, handler) } -func _SyncService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateRequest) +func _SyncService_UpdateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateConfigRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SyncServiceServer).Update(ctx, in) + return srv.(SyncServiceServer).UpdateConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SyncService_Update_FullMethodName, + FullMethod: SyncService_UpdateConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).Update(ctx, req.(*UpdateRequest)) + return srv.(SyncServiceServer).UpdateConfig(ctx, req.(*UpdateConfigRequest)) } return interceptor(ctx, in, info, handler) } @@ -277,12 +277,12 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*SyncServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Sync", - Handler: _SyncService_Sync_Handler, + MethodName: "SyncConfig", + Handler: _SyncService_SyncConfig_Handler, }, { - MethodName: "Update", - Handler: _SyncService_Update_Handler, + MethodName: "UpdateConfig", + Handler: _SyncService_UpdateConfig_Handler, }, { MethodName: "UpdateGroup", diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 29d4835..c910d84 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -12,13 +12,13 @@ option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1" service SyncService { // 拉取指定时间点之后的配置变动信息 - rpc Sync(SyncRequest) returns (SyncResponse) { - option (google.api.http) = {get: "/gapi/sync/v1/sync"}; + rpc SyncConfig(SyncConfigRequest) returns (SyncConfigResponse) { + option (google.api.http) = {get: "/gapi/sync/v1/sync_config"}; } // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 - rpc Update(UpdateRequest) returns (UpdateResponse) { + rpc UpdateConfig(UpdateConfigRequest) returns (UpdateConfigResponse) { option (google.api.http) = { - post:"/gapi/sync/v1/update" + post:"/gapi/sync/v1/update_config" body: "*" }; } @@ -45,13 +45,13 @@ service SyncService { }; } } -// Sync -message SyncRequest { +// SyncConfig +message SyncConfigRequest { google.protobuf.Timestamp after = 1; // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 string group_id = 2; } -message SyncResponse { +message SyncConfigResponse { google.protobuf.Timestamp server_time = 1; // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 repeated Host host_set = 11; repeated KnownHost known_host_set = 12; @@ -59,8 +59,8 @@ message SyncResponse { repeated Identity identity_set = 14; } -// Update -message UpdateRequest { +// UpdateConfig +message UpdateConfigRequest { string group_id = 2; oneof data { Host host = 11; @@ -70,7 +70,7 @@ message UpdateRequest { } } -message UpdateResponse { +message UpdateConfigResponse { oneof data { // 返回更新数据的服务端版本,因为新建的数据会加上ID和时间 Host host = 11; KnownHost known_host = 12; @@ -85,7 +85,7 @@ message UpdateResponse { message UpdateGroupRequest { Group group = 1; string publicKey = 2; - string encrypted_creator_privateKey = 3; + string encryptedCreatorPrivateKey = 3; } message UpdateGroupResponse {} @@ -108,26 +108,26 @@ message SyncUserKeyWalletRequest { message SyncUserKeyWalletResponse { google.protobuf.Timestamp server_time = 1; // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 string publicKey = 2; - string encrypted_privateKey = 3; + string encryptedPrivateKey = 3; repeated UserKeyWallet user_key_wallet_set = 4; } // UpdateUserKeyWallet message UpdateUserKeyWalletRequest { string publicKey = 1; - string encrypted_privateKey = 2; + string encryptedPrivateKey = 2; repeated UserKeyWallet user_key_wallet_set = 4; } message UpdateUserKeyWalletResponse { string publicKey = 1; - string encrypted_privateKey = 2; + string encryptedPrivateKey = 2; repeated UserKeyWallet user_key_wallet_set = 4; } message UserKeyWallet { string gid = 1; - string encrypted_group_privateKey = 2; + string encryptedGroupPrivateKey = 2; google.protobuf.Timestamp created_at = 3; google.protobuf.Timestamp updated_at = 4; google.protobuf.Timestamp deleted_at = 5; From 149bd95d6839e43f2e83b7dcb057b7aa2300b9fa Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Tue, 14 Nov 2023 10:52:32 +0800 Subject: [PATCH 36/46] fix: Separate key creation from group creation --- proto/sync/v1/sync_service.proto | 36 ++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index c910d84..23b697c 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -15,14 +15,21 @@ service SyncService { rpc SyncConfig(SyncConfigRequest) returns (SyncConfigResponse) { option (google.api.http) = {get: "/gapi/sync/v1/sync_config"}; } - // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 + // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 rpc UpdateConfig(UpdateConfigRequest) returns (UpdateConfigResponse) { option (google.api.http) = { post:"/gapi/sync/v1/update_config" body: "*" }; } - // 更新组信息,如果是创建组的请求则同时处理密钥 + // 组的所有者修改组的密钥链 + rpc UpdateGroupKeyChain(UpdateGroupKeyChainRequest) returns (UpdateGroupKeyChainResponse) { + option (google.api.http) = { + post:"/gapi/sync/v1/update_group_key_chain" + body: "*" + }; + } + // 更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。 rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse) { option (google.api.http) = { post:"/gapi/sync/v1/update_group" @@ -79,13 +86,19 @@ message UpdateConfigResponse { } } +// UpdateGroupKeyChain +message UpdateGroupKeyChainRequest{ + string group_id = 1; + string publicKey = 2; + string encryptedGroupPrivateKey = 3; + repeated UserKeyWallet user_key_wallet = 4; +} + +message UpdateGroupKeyChainResponse{} + // UpdateGroup -// 更新组信息,如果是创建组的请求则需要带上创建者的密钥 -// 密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示 message UpdateGroupRequest { Group group = 1; - string publicKey = 2; - string encryptedCreatorPrivateKey = 3; } message UpdateGroupResponse {} @@ -126,9 +139,10 @@ message UpdateUserKeyWalletResponse { } message UserKeyWallet { - string gid = 1; - string encryptedGroupPrivateKey = 2; - google.protobuf.Timestamp created_at = 3; - google.protobuf.Timestamp updated_at = 4; - google.protobuf.Timestamp deleted_at = 5; + string uid = 1; + string gid = 2; + string encryptedGroupPrivateKey = 3; + google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp updated_at = 5; + google.protobuf.Timestamp deleted_at = 6; } \ No newline at end of file From 13c17082d25edc8cc6da2a05b819d533d7fd250c Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Tue, 14 Nov 2023 10:57:00 +0800 Subject: [PATCH 37/46] chore: push gen file(workflow fail) --- gen/openapi/sync/v1/sync_service.swagger.json | 69 +- gen/proto/sync/v1/sync_service.pb.go | 648 +++++++++++------- gen/proto/sync/v1/sync_service.pb.gw.go | 85 +++ gen/proto/sync/v1/sync_service.pb.ts | 16 +- gen/proto/sync/v1/sync_service_grpc.pb.go | 47 +- 5 files changed, 602 insertions(+), 263 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 6b7041a..94f151f 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -122,7 +122,7 @@ }, "/gapi/sync/v1/update_config": { "post": { - "summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。", + "summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。", "operationId": "SyncService_UpdateConfig", "responses": { "200": { @@ -155,7 +155,7 @@ }, "/gapi/sync/v1/update_group": { "post": { - "summary": "更新组信息,如果是创建组的请求则同时处理密钥", + "summary": "更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。", "operationId": "SyncService_UpdateGroup", "responses": { "200": { @@ -186,6 +186,39 @@ ] } }, + "/gapi/sync/v1/update_group_key_chain": { + "post": { + "summary": "组的所有者修改组的密钥链", + "operationId": "SyncService_UpdateGroupKeyChain", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateGroupKeyChainResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateGroupKeyChainRequest" + } + } + ], + "tags": [ + "SyncService" + ] + } + }, "/gapi/sync/v1/update_user_key_wallet": { "post": { "summary": "修改用户密钥对,修改的时候所有相关组的加密密钥均要替换", @@ -601,20 +634,39 @@ } } }, - "v1UpdateGroupRequest": { + "v1UpdateGroupKeyChainRequest": { "type": "object", "properties": { - "group": { - "$ref": "#/definitions/v1Group" + "groupId": { + "type": "string" }, "publicKey": { "type": "string" }, - "encryptedCreatorPrivateKey": { + "encryptedGroupPrivateKey": { "type": "string" + }, + "userKeyWallet": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UserKeyWallet" + } } }, - "title": "UpdateGroup\n更新组信息,如果是创建组的请求则需要带上创建者的密钥\n密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示" + "title": "UpdateGroupKeyChain" + }, + "v1UpdateGroupKeyChainResponse": { + "type": "object" + }, + "v1UpdateGroupRequest": { + "type": "object", + "properties": { + "group": { + "$ref": "#/definitions/v1Group" + } + }, + "title": "UpdateGroup" }, "v1UpdateGroupResponse": { "type": "object" @@ -659,6 +711,9 @@ "v1UserKeyWallet": { "type": "object", "properties": { + "uid": { + "type": "string" + }, "gid": { "type": "string" }, diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index d6f09d8..242689c 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -384,21 +384,20 @@ func (*UpdateConfigResponse_SshKey) isUpdateConfigResponse_Data() {} func (*UpdateConfigResponse_Identity) isUpdateConfigResponse_Data() {} -// UpdateGroup -// 更新组信息,如果是创建组的请求则需要带上创建者的密钥 -// 密钥以1 2 字段为准,内部的密钥是为了在返回请求中展示 -type UpdateGroupRequest struct { +// UpdateGroupKeyChain +type UpdateGroupKeyChainRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` - PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedCreatorPrivateKey string `protobuf:"bytes,3,opt,name=encryptedCreatorPrivateKey,proto3" json:"encryptedCreatorPrivateKey,omitempty"` + GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` + UserKeyWallet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet,json=userKeyWallet,proto3" json:"user_key_wallet,omitempty"` } -func (x *UpdateGroupRequest) Reset() { - *x = UpdateGroupRequest{} +func (x *UpdateGroupKeyChainRequest) Reset() { + *x = UpdateGroupKeyChainRequest{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -406,13 +405,13 @@ func (x *UpdateGroupRequest) Reset() { } } -func (x *UpdateGroupRequest) String() string { +func (x *UpdateGroupKeyChainRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateGroupRequest) ProtoMessage() {} +func (*UpdateGroupKeyChainRequest) ProtoMessage() {} -func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateGroupKeyChainRequest) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -424,32 +423,125 @@ func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateGroupRequest.ProtoReflect.Descriptor instead. -func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateGroupKeyChainRequest.ProtoReflect.Descriptor instead. +func (*UpdateGroupKeyChainRequest) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{4} } -func (x *UpdateGroupRequest) GetGroup() *Group { +func (x *UpdateGroupKeyChainRequest) GetGroupId() string { if x != nil { - return x.Group + return x.GroupId } - return nil + return "" } -func (x *UpdateGroupRequest) GetPublicKey() string { +func (x *UpdateGroupKeyChainRequest) GetPublicKey() string { if x != nil { return x.PublicKey } return "" } -func (x *UpdateGroupRequest) GetEncryptedCreatorPrivateKey() string { +func (x *UpdateGroupKeyChainRequest) GetEncryptedGroupPrivateKey() string { if x != nil { - return x.EncryptedCreatorPrivateKey + return x.EncryptedGroupPrivateKey } return "" } +func (x *UpdateGroupKeyChainRequest) GetUserKeyWallet() []*UserKeyWallet { + if x != nil { + return x.UserKeyWallet + } + return nil +} + +type UpdateGroupKeyChainResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateGroupKeyChainResponse) Reset() { + *x = UpdateGroupKeyChainResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGroupKeyChainResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGroupKeyChainResponse) ProtoMessage() {} + +func (x *UpdateGroupKeyChainResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[5] + 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 UpdateGroupKeyChainResponse.ProtoReflect.Descriptor instead. +func (*UpdateGroupKeyChainResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{5} +} + +// UpdateGroup +type UpdateGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` +} + +func (x *UpdateGroupRequest) Reset() { + *x = UpdateGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGroupRequest) ProtoMessage() {} + +func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[6] + 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 UpdateGroupRequest.ProtoReflect.Descriptor instead. +func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateGroupRequest) GetGroup() *Group { + if x != nil { + return x.Group + } + return nil +} + type UpdateGroupResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -459,7 +551,7 @@ type UpdateGroupResponse struct { func (x *UpdateGroupResponse) Reset() { *x = UpdateGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[5] + mi := &file_sync_v1_sync_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -472,7 +564,7 @@ func (x *UpdateGroupResponse) String() string { func (*UpdateGroupResponse) ProtoMessage() {} func (x *UpdateGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[5] + mi := &file_sync_v1_sync_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -485,7 +577,7 @@ func (x *UpdateGroupResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateGroupResponse.ProtoReflect.Descriptor instead. func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{5} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{7} } // SyncGroup @@ -500,7 +592,7 @@ type SyncGroupRequest struct { func (x *SyncGroupRequest) Reset() { *x = SyncGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[6] + mi := &file_sync_v1_sync_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -513,7 +605,7 @@ func (x *SyncGroupRequest) String() string { func (*SyncGroupRequest) ProtoMessage() {} func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[6] + mi := &file_sync_v1_sync_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -526,7 +618,7 @@ func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncGroupRequest.ProtoReflect.Descriptor instead. func (*SyncGroupRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{6} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} } func (x *SyncGroupRequest) GetAfter() *timestamppb.Timestamp { @@ -548,7 +640,7 @@ type SyncGroupResponse struct { func (x *SyncGroupResponse) Reset() { *x = SyncGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[7] + mi := &file_sync_v1_sync_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -561,7 +653,7 @@ func (x *SyncGroupResponse) String() string { func (*SyncGroupResponse) ProtoMessage() {} func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[7] + mi := &file_sync_v1_sync_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -574,7 +666,7 @@ func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncGroupResponse.ProtoReflect.Descriptor instead. func (*SyncGroupResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{7} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} } func (x *SyncGroupResponse) GetServerTime() *timestamppb.Timestamp { @@ -603,7 +695,7 @@ type SyncUserKeyWalletRequest struct { func (x *SyncUserKeyWalletRequest) Reset() { *x = SyncUserKeyWalletRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[8] + mi := &file_sync_v1_sync_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -616,7 +708,7 @@ func (x *SyncUserKeyWalletRequest) String() string { func (*SyncUserKeyWalletRequest) ProtoMessage() {} func (x *SyncUserKeyWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[8] + mi := &file_sync_v1_sync_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -629,7 +721,7 @@ func (x *SyncUserKeyWalletRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncUserKeyWalletRequest.ProtoReflect.Descriptor instead. func (*SyncUserKeyWalletRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{10} } func (x *SyncUserKeyWalletRequest) GetAfter() *timestamppb.Timestamp { @@ -653,7 +745,7 @@ type SyncUserKeyWalletResponse struct { func (x *SyncUserKeyWalletResponse) Reset() { *x = SyncUserKeyWalletResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[9] + mi := &file_sync_v1_sync_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -666,7 +758,7 @@ func (x *SyncUserKeyWalletResponse) String() string { func (*SyncUserKeyWalletResponse) ProtoMessage() {} func (x *SyncUserKeyWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[9] + mi := &file_sync_v1_sync_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -679,7 +771,7 @@ func (x *SyncUserKeyWalletResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncUserKeyWalletResponse.ProtoReflect.Descriptor instead. func (*SyncUserKeyWalletResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} } func (x *SyncUserKeyWalletResponse) GetServerTime() *timestamppb.Timestamp { @@ -724,7 +816,7 @@ type UpdateUserKeyWalletRequest struct { func (x *UpdateUserKeyWalletRequest) Reset() { *x = UpdateUserKeyWalletRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[10] + mi := &file_sync_v1_sync_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -737,7 +829,7 @@ func (x *UpdateUserKeyWalletRequest) String() string { func (*UpdateUserKeyWalletRequest) ProtoMessage() {} func (x *UpdateUserKeyWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[10] + mi := &file_sync_v1_sync_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -750,7 +842,7 @@ func (x *UpdateUserKeyWalletRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserKeyWalletRequest.ProtoReflect.Descriptor instead. func (*UpdateUserKeyWalletRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{10} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} } func (x *UpdateUserKeyWalletRequest) GetPublicKey() string { @@ -787,7 +879,7 @@ type UpdateUserKeyWalletResponse struct { func (x *UpdateUserKeyWalletResponse) Reset() { *x = UpdateUserKeyWalletResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] + mi := &file_sync_v1_sync_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -800,7 +892,7 @@ func (x *UpdateUserKeyWalletResponse) String() string { func (*UpdateUserKeyWalletResponse) ProtoMessage() {} func (x *UpdateUserKeyWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] + mi := &file_sync_v1_sync_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -813,7 +905,7 @@ func (x *UpdateUserKeyWalletResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserKeyWalletResponse.ProtoReflect.Descriptor instead. func (*UpdateUserKeyWalletResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{13} } func (x *UpdateUserKeyWalletResponse) GetPublicKey() string { @@ -842,17 +934,18 @@ type UserKeyWallet struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - EncryptedGroupPrivateKey string `protobuf:"bytes,2,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` } func (x *UserKeyWallet) Reset() { *x = UserKeyWallet{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[12] + mi := &file_sync_v1_sync_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -865,7 +958,7 @@ func (x *UserKeyWallet) String() string { func (*UserKeyWallet) ProtoMessage() {} func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[12] + mi := &file_sync_v1_sync_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -878,7 +971,14 @@ func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { // Deprecated: Use UserKeyWallet.ProtoReflect.Descriptor instead. func (*UserKeyWallet) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{14} +} + +func (x *UserKeyWallet) GetUid() string { + if x != nil { + return x.Uid + } + return "" } func (x *UserKeyWallet) GetGid() string { @@ -983,141 +1083,160 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x98, 0x01, 0x0a, 0x12, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x1a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, - 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, - 0x74, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x4c, 0x0a, - 0x18, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0xef, 0x01, 0x0a, 0x19, - 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb3, 0x01, - 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, - 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x53, 0x65, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0x8e, 0x02, 0x0a, 0x0d, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3a, - 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, + 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd1, 0x01, 0x0a, 0x1a, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, + 0x3e, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, + 0x1d, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, + 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, + 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x22, 0x4c, 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, + 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, + 0xef, 0x01, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, + 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, + 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, + 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, + 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, + 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xa0, + 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x67, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xe0, 0x05, 0x0a, 0x0b, - 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0a, 0x53, - 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x67, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, - 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, - 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, - 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, - 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x86, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, - 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, - 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x32, 0xf4, 0x06, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x68, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, + 0x12, 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, + 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, 0x01, 0x0a, 0x11, + 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, + 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, + 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, + 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, + 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, + 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1132,72 +1251,77 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { return file_sync_v1_sync_service_proto_rawDescData } -var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SyncConfigRequest)(nil), // 0: sync.v1.SyncConfigRequest (*SyncConfigResponse)(nil), // 1: sync.v1.SyncConfigResponse (*UpdateConfigRequest)(nil), // 2: sync.v1.UpdateConfigRequest (*UpdateConfigResponse)(nil), // 3: sync.v1.UpdateConfigResponse - (*UpdateGroupRequest)(nil), // 4: sync.v1.UpdateGroupRequest - (*UpdateGroupResponse)(nil), // 5: sync.v1.UpdateGroupResponse - (*SyncGroupRequest)(nil), // 6: sync.v1.SyncGroupRequest - (*SyncGroupResponse)(nil), // 7: sync.v1.SyncGroupResponse - (*SyncUserKeyWalletRequest)(nil), // 8: sync.v1.SyncUserKeyWalletRequest - (*SyncUserKeyWalletResponse)(nil), // 9: sync.v1.SyncUserKeyWalletResponse - (*UpdateUserKeyWalletRequest)(nil), // 10: sync.v1.UpdateUserKeyWalletRequest - (*UpdateUserKeyWalletResponse)(nil), // 11: sync.v1.UpdateUserKeyWalletResponse - (*UserKeyWallet)(nil), // 12: sync.v1.UserKeyWallet - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp - (*Host)(nil), // 14: sync.v1.Host - (*KnownHost)(nil), // 15: sync.v1.KnownHost - (*SshKey)(nil), // 16: sync.v1.SshKey - (*Identity)(nil), // 17: sync.v1.Identity - (*Group)(nil), // 18: sync.v1.Group + (*UpdateGroupKeyChainRequest)(nil), // 4: sync.v1.UpdateGroupKeyChainRequest + (*UpdateGroupKeyChainResponse)(nil), // 5: sync.v1.UpdateGroupKeyChainResponse + (*UpdateGroupRequest)(nil), // 6: sync.v1.UpdateGroupRequest + (*UpdateGroupResponse)(nil), // 7: sync.v1.UpdateGroupResponse + (*SyncGroupRequest)(nil), // 8: sync.v1.SyncGroupRequest + (*SyncGroupResponse)(nil), // 9: sync.v1.SyncGroupResponse + (*SyncUserKeyWalletRequest)(nil), // 10: sync.v1.SyncUserKeyWalletRequest + (*SyncUserKeyWalletResponse)(nil), // 11: sync.v1.SyncUserKeyWalletResponse + (*UpdateUserKeyWalletRequest)(nil), // 12: sync.v1.UpdateUserKeyWalletRequest + (*UpdateUserKeyWalletResponse)(nil), // 13: sync.v1.UpdateUserKeyWalletResponse + (*UserKeyWallet)(nil), // 14: sync.v1.UserKeyWallet + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*Host)(nil), // 16: sync.v1.Host + (*KnownHost)(nil), // 17: sync.v1.KnownHost + (*SshKey)(nil), // 18: sync.v1.SshKey + (*Identity)(nil), // 19: sync.v1.Identity + (*Group)(nil), // 20: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 13, // 0: sync.v1.SyncConfigRequest.after:type_name -> google.protobuf.Timestamp - 13, // 1: sync.v1.SyncConfigResponse.server_time:type_name -> google.protobuf.Timestamp - 14, // 2: sync.v1.SyncConfigResponse.host_set:type_name -> sync.v1.Host - 15, // 3: sync.v1.SyncConfigResponse.known_host_set:type_name -> sync.v1.KnownHost - 16, // 4: sync.v1.SyncConfigResponse.ssh_key_set:type_name -> sync.v1.SshKey - 17, // 5: sync.v1.SyncConfigResponse.identity_set:type_name -> sync.v1.Identity - 14, // 6: sync.v1.UpdateConfigRequest.host:type_name -> sync.v1.Host - 15, // 7: sync.v1.UpdateConfigRequest.known_host:type_name -> sync.v1.KnownHost - 16, // 8: sync.v1.UpdateConfigRequest.ssh_key:type_name -> sync.v1.SshKey - 17, // 9: sync.v1.UpdateConfigRequest.identity:type_name -> sync.v1.Identity - 14, // 10: sync.v1.UpdateConfigResponse.host:type_name -> sync.v1.Host - 15, // 11: sync.v1.UpdateConfigResponse.known_host:type_name -> sync.v1.KnownHost - 16, // 12: sync.v1.UpdateConfigResponse.ssh_key:type_name -> sync.v1.SshKey - 17, // 13: sync.v1.UpdateConfigResponse.identity:type_name -> sync.v1.Identity - 18, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group - 13, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 13, // 16: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp - 18, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group - 13, // 18: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp - 13, // 19: sync.v1.SyncUserKeyWalletResponse.server_time:type_name -> google.protobuf.Timestamp - 12, // 20: sync.v1.SyncUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 12, // 21: sync.v1.UpdateUserKeyWalletRequest.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 12, // 22: sync.v1.UpdateUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 13, // 23: sync.v1.UserKeyWallet.created_at:type_name -> google.protobuf.Timestamp - 13, // 24: sync.v1.UserKeyWallet.updated_at:type_name -> google.protobuf.Timestamp - 13, // 25: sync.v1.UserKeyWallet.deleted_at:type_name -> google.protobuf.Timestamp - 0, // 26: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest - 2, // 27: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest - 4, // 28: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest - 6, // 29: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 8, // 30: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest - 10, // 31: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest - 1, // 32: sync.v1.SyncService.SyncConfig:output_type -> sync.v1.SyncConfigResponse - 3, // 33: sync.v1.SyncService.UpdateConfig:output_type -> sync.v1.UpdateConfigResponse - 5, // 34: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 35: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 9, // 36: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse - 11, // 37: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse - 32, // [32:38] is the sub-list for method output_type - 26, // [26:32] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 15, // 0: sync.v1.SyncConfigRequest.after:type_name -> google.protobuf.Timestamp + 15, // 1: sync.v1.SyncConfigResponse.server_time:type_name -> google.protobuf.Timestamp + 16, // 2: sync.v1.SyncConfigResponse.host_set:type_name -> sync.v1.Host + 17, // 3: sync.v1.SyncConfigResponse.known_host_set:type_name -> sync.v1.KnownHost + 18, // 4: sync.v1.SyncConfigResponse.ssh_key_set:type_name -> sync.v1.SshKey + 19, // 5: sync.v1.SyncConfigResponse.identity_set:type_name -> sync.v1.Identity + 16, // 6: sync.v1.UpdateConfigRequest.host:type_name -> sync.v1.Host + 17, // 7: sync.v1.UpdateConfigRequest.known_host:type_name -> sync.v1.KnownHost + 18, // 8: sync.v1.UpdateConfigRequest.ssh_key:type_name -> sync.v1.SshKey + 19, // 9: sync.v1.UpdateConfigRequest.identity:type_name -> sync.v1.Identity + 16, // 10: sync.v1.UpdateConfigResponse.host:type_name -> sync.v1.Host + 17, // 11: sync.v1.UpdateConfigResponse.known_host:type_name -> sync.v1.KnownHost + 18, // 12: sync.v1.UpdateConfigResponse.ssh_key:type_name -> sync.v1.SshKey + 19, // 13: sync.v1.UpdateConfigResponse.identity:type_name -> sync.v1.Identity + 14, // 14: sync.v1.UpdateGroupKeyChainRequest.user_key_wallet:type_name -> sync.v1.UserKeyWallet + 20, // 15: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group + 15, // 16: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp + 15, // 17: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp + 20, // 18: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group + 15, // 19: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp + 15, // 20: sync.v1.SyncUserKeyWalletResponse.server_time:type_name -> google.protobuf.Timestamp + 14, // 21: sync.v1.SyncUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 14, // 22: sync.v1.UpdateUserKeyWalletRequest.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 14, // 23: sync.v1.UpdateUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet + 15, // 24: sync.v1.UserKeyWallet.created_at:type_name -> google.protobuf.Timestamp + 15, // 25: sync.v1.UserKeyWallet.updated_at:type_name -> google.protobuf.Timestamp + 15, // 26: sync.v1.UserKeyWallet.deleted_at:type_name -> google.protobuf.Timestamp + 0, // 27: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest + 2, // 28: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest + 4, // 29: sync.v1.SyncService.UpdateGroupKeyChain:input_type -> sync.v1.UpdateGroupKeyChainRequest + 6, // 30: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest + 8, // 31: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 10, // 32: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest + 12, // 33: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest + 1, // 34: sync.v1.SyncService.SyncConfig:output_type -> sync.v1.SyncConfigResponse + 3, // 35: sync.v1.SyncService.UpdateConfig:output_type -> sync.v1.UpdateConfigResponse + 5, // 36: sync.v1.SyncService.UpdateGroupKeyChain:output_type -> sync.v1.UpdateGroupKeyChainResponse + 7, // 37: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 9, // 38: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 11, // 39: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse + 13, // 40: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse + 34, // [34:41] is the sub-list for method output_type + 27, // [27:34] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_sync_v1_sync_service_proto_init() } @@ -1259,7 +1383,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupRequest); i { + switch v := v.(*UpdateGroupKeyChainRequest); i { case 0: return &v.state case 1: @@ -1271,7 +1395,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupResponse); i { + switch v := v.(*UpdateGroupKeyChainResponse); i { case 0: return &v.state case 1: @@ -1283,7 +1407,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncGroupRequest); i { + switch v := v.(*UpdateGroupRequest); i { case 0: return &v.state case 1: @@ -1295,7 +1419,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncGroupResponse); i { + switch v := v.(*UpdateGroupResponse); i { case 0: return &v.state case 1: @@ -1307,7 +1431,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncUserKeyWalletRequest); i { + switch v := v.(*SyncGroupRequest); i { case 0: return &v.state case 1: @@ -1319,7 +1443,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncUserKeyWalletResponse); i { + switch v := v.(*SyncGroupResponse); i { case 0: return &v.state case 1: @@ -1331,7 +1455,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserKeyWalletRequest); i { + switch v := v.(*SyncUserKeyWalletRequest); i { case 0: return &v.state case 1: @@ -1343,7 +1467,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserKeyWalletResponse); i { + switch v := v.(*SyncUserKeyWalletResponse); i { case 0: return &v.state case 1: @@ -1355,6 +1479,30 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUserKeyWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUserKeyWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserKeyWallet); i { case 0: return &v.state @@ -1385,7 +1533,7 @@ func file_sync_v1_sync_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_sync_service_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index 81660cf..2bfcba6 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -101,6 +101,40 @@ func local_request_SyncService_UpdateConfig_0(ctx context.Context, marshaler run } +func request_SyncService_UpdateGroupKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateGroupKeyChainRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateGroupKeyChain(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyncService_UpdateGroupKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateGroupKeyChainRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateGroupKeyChain(ctx, &protoReq) + return msg, metadata, err + +} + func request_SyncService_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateGroupRequest var metadata runtime.ServerMetadata @@ -297,6 +331,31 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_SyncService_UpdateGroupKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroupKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group_key_chain")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SyncService_UpdateGroupKeyChain_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_UpdateGroupKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_SyncService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -482,6 +541,28 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_SyncService_UpdateGroupKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroupKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group_key_chain")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SyncService_UpdateGroupKeyChain_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_UpdateGroupKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_SyncService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -578,6 +659,8 @@ var ( pattern_SyncService_UpdateConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_config"}, "")) + pattern_SyncService_UpdateGroupKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_group_key_chain"}, "")) + pattern_SyncService_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_group"}, "")) pattern_SyncService_SyncGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_group"}, "")) @@ -592,6 +675,8 @@ var ( forward_SyncService_UpdateConfig_0 = runtime.ForwardResponseMessage + forward_SyncService_UpdateGroupKeyChain_0 = runtime.ForwardResponseMessage + forward_SyncService_UpdateGroup_0 = runtime.ForwardResponseMessage forward_SyncService_SyncGroup_0 = runtime.ForwardResponseMessage diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 750add5..fac9e36 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -47,10 +47,18 @@ type BaseUpdateConfigResponse = { export type UpdateConfigResponse = BaseUpdateConfigResponse & OneOf<{ host: SyncV1Host.Host; knownHost: SyncV1Known_hosts.KnownHost; sshKey: SyncV1Keychain.SshKey; identity: SyncV1Keychain.Identity }> +export type UpdateGroupKeyChainRequest = { + groupId?: string + publicKey?: string + encryptedGroupPrivateKey?: string + userKeyWallet?: UserKeyWallet[] +} + +export type UpdateGroupKeyChainResponse = { +} + export type UpdateGroupRequest = { group?: SyncV1Group.Group - publicKey?: string - encryptedCreatorPrivateKey?: string } export type UpdateGroupResponse = { @@ -89,6 +97,7 @@ export type UpdateUserKeyWalletResponse = { } export type UserKeyWallet = { + uid?: string gid?: string encryptedGroupPrivateKey?: string createdAt?: GoogleProtobufTimestamp.Timestamp @@ -103,6 +112,9 @@ export class SyncService { static UpdateConfig(req: UpdateConfigRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/update_config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } + static UpdateGroupKeyChain(req: UpdateGroupKeyChainRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/update_group_key_chain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } static UpdateGroup(req: UpdateGroupRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/update_group`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index ead2787..d4d080b 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( SyncService_SyncConfig_FullMethodName = "/sync.v1.SyncService/SyncConfig" SyncService_UpdateConfig_FullMethodName = "/sync.v1.SyncService/UpdateConfig" + SyncService_UpdateGroupKeyChain_FullMethodName = "/sync.v1.SyncService/UpdateGroupKeyChain" SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" SyncService_SyncUserKeyWallet_FullMethodName = "/sync.v1.SyncService/SyncUserKeyWallet" @@ -33,9 +34,11 @@ const ( type SyncServiceClient interface { // 拉取指定时间点之后的配置变动信息 SyncConfig(ctx context.Context, in *SyncConfigRequest, opts ...grpc.CallOption) (*SyncConfigResponse, error) - // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 + // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*UpdateConfigResponse, error) - // 更新组信息,如果是创建组的请求则同时处理密钥 + // 组的所有者修改组的密钥链 + UpdateGroupKeyChain(ctx context.Context, in *UpdateGroupKeyChainRequest, opts ...grpc.CallOption) (*UpdateGroupKeyChainResponse, error) + // 更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。 UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) @@ -71,6 +74,15 @@ func (c *syncServiceClient) UpdateConfig(ctx context.Context, in *UpdateConfigRe return out, nil } +func (c *syncServiceClient) UpdateGroupKeyChain(ctx context.Context, in *UpdateGroupKeyChainRequest, opts ...grpc.CallOption) (*UpdateGroupKeyChainResponse, error) { + out := new(UpdateGroupKeyChainResponse) + err := c.cc.Invoke(ctx, SyncService_UpdateGroupKeyChain_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *syncServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) { out := new(UpdateGroupResponse) err := c.cc.Invoke(ctx, SyncService_UpdateGroup_FullMethodName, in, out, opts...) @@ -113,9 +125,11 @@ func (c *syncServiceClient) UpdateUserKeyWallet(ctx context.Context, in *UpdateU type SyncServiceServer interface { // 拉取指定时间点之后的配置变动信息 SyncConfig(context.Context, *SyncConfigRequest) (*SyncConfigResponse, error) - // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 + // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) - // 更新组信息,如果是创建组的请求则同时处理密钥 + // 组的所有者修改组的密钥链 + UpdateGroupKeyChain(context.Context, *UpdateGroupKeyChainRequest) (*UpdateGroupKeyChainResponse, error) + // 更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。 UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) @@ -136,6 +150,9 @@ func (UnimplementedSyncServiceServer) SyncConfig(context.Context, *SyncConfigReq func (UnimplementedSyncServiceServer) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateConfig not implemented") } +func (UnimplementedSyncServiceServer) UpdateGroupKeyChain(context.Context, *UpdateGroupKeyChainRequest) (*UpdateGroupKeyChainResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupKeyChain not implemented") +} func (UnimplementedSyncServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") } @@ -197,6 +214,24 @@ func _SyncService_UpdateConfig_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _SyncService_UpdateGroupKeyChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGroupKeyChainRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncServiceServer).UpdateGroupKeyChain(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_UpdateGroupKeyChain_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).UpdateGroupKeyChain(ctx, req.(*UpdateGroupKeyChainRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SyncService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateGroupRequest) if err := dec(in); err != nil { @@ -284,6 +319,10 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateConfig", Handler: _SyncService_UpdateConfig_Handler, }, + { + MethodName: "UpdateGroupKeyChain", + Handler: _SyncService_UpdateGroupKeyChain_Handler, + }, { MethodName: "UpdateGroup", Handler: _SyncService_UpdateGroup_Handler, From 84c264487fa3f9a7849c892f9a959114317ff628 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Wed, 15 Nov 2023 18:58:26 +0800 Subject: [PATCH 38/46] chore: Use camelCase naming instead --- gen/proto/auth/v1/auth_service.pb.go | 414 ++++++++++++------------- gen/proto/sync/v1/group.pb.go | 98 +++--- gen/proto/sync/v1/host.pb.go | 88 +++--- gen/proto/sync/v1/keychain.pb.go | 124 ++++---- gen/proto/sync/v1/known_hosts.pb.go | 59 ++-- gen/proto/sync/v1/sync_service.pb.go | 443 +++++++++++++-------------- proto/auth/v1/auth_service.proto | 4 +- proto/sync/v1/group.proto | 12 +- proto/sync/v1/host.proto | 10 +- proto/sync/v1/keychain.proto | 18 +- proto/sync/v1/known_hosts.proto | 8 +- proto/sync/v1/sync_service.proto | 40 +-- 12 files changed, 658 insertions(+), 660 deletions(-) diff --git a/gen/proto/auth/v1/auth_service.pb.go b/gen/proto/auth/v1/auth_service.pb.go index 5daa121..5df8ea9 100644 --- a/gen/proto/auth/v1/auth_service.pb.go +++ b/gen/proto/auth/v1/auth_service.pb.go @@ -678,7 +678,7 @@ type TOTPStatus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IsActive bool `protobuf:"varint,1,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + IsActive bool `protobuf:"varint,1,opt,name=isActive,proto3" json:"isActive,omitempty"` } func (x *TOTPStatus) Reset() { @@ -1521,7 +1521,7 @@ type CheckEmailMFARequest struct { unknownFields protoimpl.UnknownFields Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - VerificationCode string `protobuf:"bytes,2,opt,name=verification_code,json=verificationCode,proto3" json:"verification_code,omitempty"` + VerificationCode string `protobuf:"bytes,2,opt,name=verificationCode,proto3" json:"verificationCode,omitempty"` } func (x *CheckEmailMFARequest) Reset() { @@ -1849,217 +1849,217 @@ var file_auth_v1_auth_service_proto_rawDesc = []byte{ 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x29, 0x0a, - 0x0a, 0x54, 0x4f, 0x54, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, - 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x69, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x5d, 0x0a, 0x0b, 0x45, 0x6d, 0x61, 0x69, - 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1c, 0x0a, - 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, - 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x4d, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, - 0x74, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, - 0x74, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x38, 0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, - 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, - 0x22, 0x30, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x74, 0x70, 0x43, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x74, 0x70, 0x43, 0x6f, - 0x64, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, - 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x10, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, - 0x08, 0x74, 0x6f, 0x74, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x74, 0x6f, 0x74, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, - 0x0a, 0x12, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x22, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x65, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x65, - 0x77, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x2a, 0x0a, - 0x12, 0x41, 0x64, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, - 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x5b, 0x0a, 0x17, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, - 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x1a, 0x0a, - 0x18, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, - 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x19, 0x53, 0x65, 0x74, - 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x1c, - 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, - 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x0a, 0x17, + 0x52, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x28, 0x0a, + 0x0a, 0x54, 0x4f, 0x54, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, + 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x5d, 0x0a, 0x0b, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1c, 0x0a, 0x09, + 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x4d, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x74, + 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x74, + 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x38, 0x0a, 0x12, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, + 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x72, + 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x22, + 0x30, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x74, 0x70, 0x43, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x74, 0x70, 0x43, 0x6f, 0x64, + 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, 0x50, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x10, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x74, 0x6f, 0x74, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x74, 0x6f, 0x74, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x0a, + 0x12, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x63, 0x0a, 0x13, 0x52, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, + 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, + 0x65, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x65, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x65, 0x77, + 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x2a, 0x0a, 0x12, + 0x41, 0x64, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x45, + 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x5b, 0x0a, 0x17, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x1a, 0x0a, 0x18, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x6c, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x1c, 0x0a, + 0x1a, 0x53, 0x65, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x0a, 0x17, 0x53, + 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x1a, 0x0a, - 0x18, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, - 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x59, 0x0a, 0x14, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x64, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, - 0x16, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x19, 0x0a, - 0x17, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x64, 0x6f, 0x54, 0x74, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x73, 0x75, 0x64, 0x6f, 0x54, 0x74, 0x6c, 0x32, 0x81, 0x10, 0x0a, 0x0b, 0x41, 0x75, - 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x08, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x83, 0x01, - 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x12, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, - 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2d, 0x66, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x12, 0x56, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x15, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, - 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x77, 0x0a, 0x0d, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2d, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x72, - 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x70, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4d, - 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, - 0x22, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x66, 0x61, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x6f, 0x0a, 0x0a, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, - 0x74, 0x6f, 0x74, 0x70, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x73, 0x0a, 0x0b, 0x44, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x12, 0x1b, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, 0x50, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x64, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x16, 0x44, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x19, 0x0a, 0x17, 0x44, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x34, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x64, 0x6f, 0x54, 0x74, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x73, 0x75, 0x64, 0x6f, 0x54, 0x74, 0x6c, 0x32, 0x81, 0x10, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, + 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x76, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x83, 0x01, 0x0a, 0x10, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x12, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, + 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x12, 0x56, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x15, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x77, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x70, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4d, 0x46, 0x41, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4d, 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, + 0x61, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x6f, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x12, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x74, 0x6f, + 0x74, 0x70, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x73, 0x0a, 0x0b, 0x44, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x12, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, + 0x61, 0x2f, 0x74, 0x6f, 0x74, 0x70, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x6b, + 0x0a, 0x09, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x4f, 0x54, 0x50, 0x12, 0x19, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x4f, 0x54, 0x50, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, + 0x2f, 0x74, 0x6f, 0x74, 0x70, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x73, 0x0a, 0x0b, 0x52, + 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x4f, 0x54, 0x50, 0x12, 0x1b, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, + 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x66, 0x61, 0x2f, 0x74, 0x6f, 0x74, 0x70, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x12, 0x6b, 0x0a, 0x09, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x4f, 0x54, 0x50, 0x12, 0x19, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x4f, 0x54, - 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, - 0x1c, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x66, 0x61, 0x2f, 0x74, 0x6f, 0x74, 0x70, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x73, 0x0a, - 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x4f, 0x54, 0x50, 0x12, 0x1b, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x4f, - 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x54, 0x4f, 0x54, 0x50, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, - 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x74, 0x6f, 0x74, 0x70, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x12, 0x70, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, - 0x41, 0x12, 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, - 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x6d, 0x61, 0x69, - 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x2f, 0x61, 0x64, 0x64, 0x12, 0x84, 0x01, 0x0a, 0x10, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x12, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6d, 0x66, 0x61, 0x2f, 0x74, 0x6f, 0x74, 0x70, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x12, 0x70, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x12, + 0x1b, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x6d, 0x61, + 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, + 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x61, + 0x64, 0x64, 0x12, 0x84, 0x01, 0x0a, 0x10, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, + 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x12, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, + 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, - 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x12, - 0x53, 0x65, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, - 0x46, 0x41, 0x12, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, - 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, - 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, + 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x53, 0x65, + 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, + 0x12, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, + 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x73, 0x65, + 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x80, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x6e, + 0x64, 0x43, 0x6f, 0x64, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x12, 0x20, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, + 0x64, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, + 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x78, 0x0a, 0x0d, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x12, 0x1d, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2f, - 0x73, 0x65, 0x74, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x80, 0x01, 0x0a, 0x10, 0x53, - 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x12, - 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, - 0x64, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, - 0x43, 0x6f, 0x64, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, - 0x1c, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x78, 0x0a, - 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x12, 0x1d, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x12, 0x1f, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, - 0x69, 0x6c, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x10, 0x47, - 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, - 0x1c, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3c, 0x5a, - 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, - 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x4d, 0x46, 0x41, 0x12, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x4d, 0x46, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x4d, 0x46, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3c, 0x5a, 0x3a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, + 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x76, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/gen/proto/sync/v1/group.pb.go b/gen/proto/sync/v1/group.pb.go index 78bd366..8eed32f 100644 --- a/gen/proto/sync/v1/group.pb.go +++ b/gen/proto/sync/v1/group.pb.go @@ -26,8 +26,8 @@ type Group struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupBasic *GroupBasic `protobuf:"bytes,1,opt,name=group_basic,json=groupBasic,proto3" json:"group_basic,omitempty"` - GroupKeychain []*GroupKeyChain `protobuf:"bytes,2,rep,name=group_keychain,json=groupKeychain,proto3" json:"group_keychain,omitempty"` + GroupBasic *GroupBasic `protobuf:"bytes,1,opt,name=groupBasic,proto3" json:"groupBasic,omitempty"` + GroupKeychain []*GroupKeyChain `protobuf:"bytes,2,rep,name=groupKeychain,proto3" json:"groupKeychain,omitempty"` } func (x *Group) Reset() { @@ -82,9 +82,9 @@ type GroupBasic struct { unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` @@ -192,7 +192,7 @@ type GroupKeyChain struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MemberId string `protobuf:"bytes,11,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"` + MemberId string `protobuf:"bytes,11,opt,name=memberId,proto3" json:"memberId,omitempty"` PrivateKey string `protobuf:"bytes,12,opt,name=privateKey,proto3" json:"privateKey,omitempty"` } @@ -249,44 +249,44 @@ var file_sync_v1_group_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x7c, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x34, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x5f, 0x62, 0x61, 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, - 0x69, 0x63, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x3d, - 0x0a, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0d, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0xcb, 0x02, - 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x4c, 0x0a, 0x0d, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, - 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x7a, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x33, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, + 0x63, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x3c, 0x0a, + 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0d, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0xc8, 0x02, 0x0a, 0x0a, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, + 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x0d, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, + 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, + 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -309,11 +309,11 @@ var file_sync_v1_group_proto_goTypes = []interface{}{ (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp } var file_sync_v1_group_proto_depIdxs = []int32{ - 1, // 0: sync.v1.Group.group_basic:type_name -> sync.v1.GroupBasic - 2, // 1: sync.v1.Group.group_keychain:type_name -> sync.v1.GroupKeyChain - 3, // 2: sync.v1.GroupBasic.created_at:type_name -> google.protobuf.Timestamp - 3, // 3: sync.v1.GroupBasic.updated_at:type_name -> google.protobuf.Timestamp - 3, // 4: sync.v1.GroupBasic.deleted_at:type_name -> google.protobuf.Timestamp + 1, // 0: sync.v1.Group.groupBasic:type_name -> sync.v1.GroupBasic + 2, // 1: sync.v1.Group.groupKeychain:type_name -> sync.v1.GroupKeyChain + 3, // 2: sync.v1.GroupBasic.createdAt:type_name -> google.protobuf.Timestamp + 3, // 3: sync.v1.GroupBasic.updatedAt:type_name -> google.protobuf.Timestamp + 3, // 4: sync.v1.GroupBasic.deletedAt:type_name -> google.protobuf.Timestamp 5, // [5:5] is the sub-list for method output_type 5, // [5:5] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name diff --git a/gen/proto/sync/v1/host.pb.go b/gen/proto/sync/v1/host.pb.go index 87202f1..2d79d05 100644 --- a/gen/proto/sync/v1/host.pb.go +++ b/gen/proto/sync/v1/host.pb.go @@ -26,19 +26,19 @@ type Host struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 内部唯一ID ulid - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 创建时间 - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // 更新时间 - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` // 删除时间 - Label string `protobuf:"bytes,11,opt,name=label,proto3" json:"label,omitempty"` // 标签 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 内部唯一ID ulid + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间 + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // 更新时间 + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` // 删除时间 + Label string `protobuf:"bytes,11,opt,name=label,proto3" json:"label,omitempty"` // 标签 Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags,omitempty"` Address string `protobuf:"bytes,13,opt,name=address,proto3" json:"address,omitempty"` // ip或host Port int64 `protobuf:"varint,14,opt,name=port,proto3" json:"port,omitempty"` - Charset string `protobuf:"bytes,15,opt,name=charset,proto3" json:"charset,omitempty"` // 字符集 - Username string `protobuf:"bytes,21,opt,name=username,proto3" json:"username,omitempty"` // 用户名 - Password string `protobuf:"bytes,22,opt,name=password,proto3" json:"password,omitempty"` // 密码 - KeyId string `protobuf:"bytes,23,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // 密钥ID - IdentityId string `protobuf:"bytes,24,opt,name=identity_id,json=identityId,proto3" json:"identity_id,omitempty"` // 身份ID 若身份ID不为空,则覆盖手动配置 + Charset string `protobuf:"bytes,15,opt,name=charset,proto3" json:"charset,omitempty"` // 字符集 + Username string `protobuf:"bytes,21,opt,name=username,proto3" json:"username,omitempty"` // 用户名 + Password string `protobuf:"bytes,22,opt,name=password,proto3" json:"password,omitempty"` // 密码 + KeyId string `protobuf:"bytes,23,opt,name=keyId,proto3" json:"keyId,omitempty"` // 密钥ID + IdentityId string `protobuf:"bytes,24,opt,name=identityId,proto3" json:"identityId,omitempty"` // 身份ID 若身份ID不为空,则覆盖手动配置 } func (x *Host) Reset() { @@ -170,38 +170,38 @@ var file_sync_v1_host_proto_rawDesc = []byte{ 0x0a, 0x12, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x03, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, - 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, - 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, - 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x49, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x49, 0x64, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, + 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, + 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -222,9 +222,9 @@ var file_sync_v1_host_proto_goTypes = []interface{}{ (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } var file_sync_v1_host_proto_depIdxs = []int32{ - 1, // 0: sync.v1.Host.created_at:type_name -> google.protobuf.Timestamp - 1, // 1: sync.v1.Host.updated_at:type_name -> google.protobuf.Timestamp - 1, // 2: sync.v1.Host.deleted_at:type_name -> google.protobuf.Timestamp + 1, // 0: sync.v1.Host.createdAt:type_name -> google.protobuf.Timestamp + 1, // 1: sync.v1.Host.updatedAt:type_name -> google.protobuf.Timestamp + 1, // 2: sync.v1.Host.deletedAt:type_name -> google.protobuf.Timestamp 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name diff --git a/gen/proto/sync/v1/keychain.pb.go b/gen/proto/sync/v1/keychain.pb.go index acbc60d..ee4d4c4 100644 --- a/gen/proto/sync/v1/keychain.pb.go +++ b/gen/proto/sync/v1/keychain.pb.go @@ -27,14 +27,14 @@ type SshKey struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 内部唯一ID ulid - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 创建时间 - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // 更新时间 - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` // 删除时间 - Label string `protobuf:"bytes,11,opt,name=label,proto3" json:"label,omitempty"` // 标签 - PrivateKey string `protobuf:"bytes,12,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // 私钥 - PublicKey string `protobuf:"bytes,13,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // 公钥 - Certificate string `protobuf:"bytes,14,opt,name=certificate,proto3" json:"certificate,omitempty"` // 证书 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 内部唯一ID ulid + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间 + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // 更新时间 + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` // 删除时间 + Label string `protobuf:"bytes,11,opt,name=label,proto3" json:"label,omitempty"` // 标签 + PrivateKey string `protobuf:"bytes,12,opt,name=privateKey,proto3" json:"privateKey,omitempty"` // 私钥 + PublicKey string `protobuf:"bytes,13,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // 公钥 + Certificate string `protobuf:"bytes,14,opt,name=certificate,proto3" json:"certificate,omitempty"` // 证书 } func (x *SshKey) Reset() { @@ -132,14 +132,14 @@ type Identity struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 内部唯一ID ulid - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 创建时间 - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // 更新时间 - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` // 删除时间 - Label string `protobuf:"bytes,11,opt,name=label,proto3" json:"label,omitempty"` // 标签 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 内部唯一ID ulid + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间 + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // 更新时间 + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` // 删除时间 + Label string `protobuf:"bytes,11,opt,name=label,proto3" json:"label,omitempty"` // 标签 Username string `protobuf:"bytes,12,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,13,opt,name=password,proto3" json:"password,omitempty"` - KeyId string `protobuf:"bytes,14,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` // 密钥ID + KeyId string `protobuf:"bytes,14,opt,name=keyId,proto3" json:"keyId,omitempty"` // 密钥ID } func (x *Identity) Reset() { @@ -237,50 +237,50 @@ var file_sync_v1_keychain_proto_rawDesc = []byte{ 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xc1, 0x02, 0x0a, 0x06, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x74, 0x6f, 0x22, 0xbc, 0x02, 0x0a, 0x06, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, + 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x22, 0xac, 0x02, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, + 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0xb0, 0x02, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, - 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, - 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6b, 0x65, + 0x79, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, + 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, + 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -302,12 +302,12 @@ var file_sync_v1_keychain_proto_goTypes = []interface{}{ (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp } var file_sync_v1_keychain_proto_depIdxs = []int32{ - 2, // 0: sync.v1.SshKey.created_at:type_name -> google.protobuf.Timestamp - 2, // 1: sync.v1.SshKey.updated_at:type_name -> google.protobuf.Timestamp - 2, // 2: sync.v1.SshKey.deleted_at:type_name -> google.protobuf.Timestamp - 2, // 3: sync.v1.Identity.created_at:type_name -> google.protobuf.Timestamp - 2, // 4: sync.v1.Identity.updated_at:type_name -> google.protobuf.Timestamp - 2, // 5: sync.v1.Identity.deleted_at:type_name -> google.protobuf.Timestamp + 2, // 0: sync.v1.SshKey.createdAt:type_name -> google.protobuf.Timestamp + 2, // 1: sync.v1.SshKey.updatedAt:type_name -> google.protobuf.Timestamp + 2, // 2: sync.v1.SshKey.deletedAt:type_name -> google.protobuf.Timestamp + 2, // 3: sync.v1.Identity.createdAt:type_name -> google.protobuf.Timestamp + 2, // 4: sync.v1.Identity.updatedAt:type_name -> google.protobuf.Timestamp + 2, // 5: sync.v1.Identity.deletedAt:type_name -> google.protobuf.Timestamp 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name diff --git a/gen/proto/sync/v1/known_hosts.pb.go b/gen/proto/sync/v1/known_hosts.pb.go index 9f36317..57e4951 100644 --- a/gen/proto/sync/v1/known_hosts.pb.go +++ b/gen/proto/sync/v1/known_hosts.pb.go @@ -26,12 +26,12 @@ type KnownHost struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 内部唯一ID ulid - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 创建时间 - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // 更新时间 - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` // 删除时间 - Address string `protobuf:"bytes,11,opt,name=address,proto3" json:"address,omitempty"` // ip或host - PublicKey string `protobuf:"bytes,12,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // 公钥 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 内部唯一ID ulid + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间 + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // 更新时间 + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` // 删除时间 + Address string `protobuf:"bytes,11,opt,name=address,proto3" json:"address,omitempty"` // ip或host + PublicKey string `protobuf:"bytes,12,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // 公钥 } func (x *KnownHost) Reset() { @@ -115,28 +115,27 @@ var file_sync_v1_known_hosts_proto_rawDesc = []byte{ 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x02, 0x0a, 0x09, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x02, 0x0a, 0x09, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, - 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, - 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, - 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, + 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -157,9 +156,9 @@ var file_sync_v1_known_hosts_proto_goTypes = []interface{}{ (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } var file_sync_v1_known_hosts_proto_depIdxs = []int32{ - 1, // 0: sync.v1.KnownHost.created_at:type_name -> google.protobuf.Timestamp - 1, // 1: sync.v1.KnownHost.updated_at:type_name -> google.protobuf.Timestamp - 1, // 2: sync.v1.KnownHost.deleted_at:type_name -> google.protobuf.Timestamp + 1, // 0: sync.v1.KnownHost.createdAt:type_name -> google.protobuf.Timestamp + 1, // 1: sync.v1.KnownHost.updatedAt:type_name -> google.protobuf.Timestamp + 1, // 2: sync.v1.KnownHost.deletedAt:type_name -> google.protobuf.Timestamp 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 242689c..c764dcf 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -29,7 +29,7 @@ type SyncConfigRequest struct { unknownFields protoimpl.UnknownFields After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 - GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + GroupId string `protobuf:"bytes,2,opt,name=groupId,proto3" json:"groupId,omitempty"` } func (x *SyncConfigRequest) Reset() { @@ -84,10 +84,10 @@ type SyncConfigResponse struct { unknownFields protoimpl.UnknownFields ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"` // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 - HostSet []*Host `protobuf:"bytes,11,rep,name=host_set,json=hostSet,proto3" json:"host_set,omitempty"` - KnownHostSet []*KnownHost `protobuf:"bytes,12,rep,name=known_host_set,json=knownHostSet,proto3" json:"known_host_set,omitempty"` - SshKeySet []*SshKey `protobuf:"bytes,13,rep,name=ssh_key_set,json=sshKeySet,proto3" json:"ssh_key_set,omitempty"` - IdentitySet []*Identity `protobuf:"bytes,14,rep,name=identity_set,json=identitySet,proto3" json:"identity_set,omitempty"` + HostSet []*Host `protobuf:"bytes,11,rep,name=hostSet,proto3" json:"hostSet,omitempty"` + KnownHostSet []*KnownHost `protobuf:"bytes,12,rep,name=knownHostSet,proto3" json:"knownHostSet,omitempty"` + SshKeySet []*SshKey `protobuf:"bytes,13,rep,name=sshKeySet,proto3" json:"sshKeySet,omitempty"` + IdentitySet []*Identity `protobuf:"bytes,14,rep,name=identitySet,proto3" json:"identitySet,omitempty"` } func (x *SyncConfigResponse) Reset() { @@ -163,7 +163,7 @@ type UpdateConfigRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + GroupId string `protobuf:"bytes,2,opt,name=groupId,proto3" json:"groupId,omitempty"` // Types that are assignable to Data: // // *UpdateConfigRequest_Host @@ -256,11 +256,11 @@ type UpdateConfigRequest_Host struct { } type UpdateConfigRequest_KnownHost struct { - KnownHost *KnownHost `protobuf:"bytes,12,opt,name=known_host,json=knownHost,proto3,oneof"` + KnownHost *KnownHost `protobuf:"bytes,12,opt,name=knownHost,proto3,oneof"` } type UpdateConfigRequest_SshKey struct { - SshKey *SshKey `protobuf:"bytes,13,opt,name=ssh_key,json=sshKey,proto3,oneof"` + SshKey *SshKey `protobuf:"bytes,13,opt,name=sshKey,proto3,oneof"` } type UpdateConfigRequest_Identity struct { @@ -365,11 +365,11 @@ type UpdateConfigResponse_Host struct { } type UpdateConfigResponse_KnownHost struct { - KnownHost *KnownHost `protobuf:"bytes,12,opt,name=known_host,json=knownHost,proto3,oneof"` + KnownHost *KnownHost `protobuf:"bytes,12,opt,name=knownHost,proto3,oneof"` } type UpdateConfigResponse_SshKey struct { - SshKey *SshKey `protobuf:"bytes,13,opt,name=ssh_key,json=sshKey,proto3,oneof"` + SshKey *SshKey `protobuf:"bytes,13,opt,name=sshKey,proto3,oneof"` } type UpdateConfigResponse_Identity struct { @@ -390,10 +390,10 @@ type UpdateGroupKeyChainRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + GroupId string `protobuf:"bytes,1,opt,name=groupId,proto3" json:"groupId,omitempty"` PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` - UserKeyWallet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet,json=userKeyWallet,proto3" json:"user_key_wallet,omitempty"` + UserKeyWallet []*UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWallet,proto3" json:"userKeyWallet,omitempty"` } func (x *UpdateGroupKeyChainRequest) Reset() { @@ -633,7 +633,7 @@ type SyncGroupResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"` + ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=serverTime,proto3" json:"serverTime,omitempty"` Groups []*Group `protobuf:"bytes,11,rep,name=groups,proto3" json:"groups,omitempty"` } @@ -736,10 +736,10 @@ type SyncUserKeyWalletResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"` // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 + ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=serverTime,proto3" json:"serverTime,omitempty"` // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` - UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` + UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` } func (x *SyncUserKeyWalletResponse) Reset() { @@ -810,7 +810,7 @@ type UpdateUserKeyWalletRequest struct { PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` - UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` + UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` } func (x *UpdateUserKeyWalletRequest) Reset() { @@ -873,7 +873,7 @@ type UpdateUserKeyWalletResponse struct { PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` - UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=user_key_wallet_set,json=userKeyWalletSet,proto3" json:"user_key_wallet_set,omitempty"` + UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` } func (x *UpdateUserKeyWalletResponse) Reset() { @@ -937,9 +937,9 @@ type UserKeyWallet struct { Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` } func (x *UserKeyWallet) Reset() { @@ -1031,86 +1031,85 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x1a, 0x19, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x60, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x22, 0x5f, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x22, 0x9c, 0x02, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, - 0x65, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, - 0x12, 0x38, 0x0a, 0x0e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, - 0x65, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0c, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x0b, 0x73, 0x73, - 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, - 0x52, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, - 0x74, 0x22, 0xef, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, - 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, - 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, - 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x22, 0xd5, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, + 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x64, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, + 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x36, + 0x0a, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x18, 0x0c, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, + 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, + 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, + 0x53, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x73, 0x73, 0x68, 0x4b, + 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x53, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0xec, 0x01, 0x0a, 0x13, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, - 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x73, 0x68, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, - 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd1, 0x01, 0x0a, 0x1a, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, - 0x3e, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, - 0x1d, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, - 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, - 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x78, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x74, 0x12, 0x32, 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, + 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, + 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd3, 0x01, 0x0a, 0x14, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, + 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x48, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x73, + 0x73, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, + 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, + 0xce, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, + 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x22, 0x1d, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, + 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x77, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, + 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, @@ -1121,122 +1120,122 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, - 0xef, 0x01, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, - 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, - 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, - 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, - 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0xeb, 0x01, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, + 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb0, 0x01, + 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, + 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, + 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, + 0x22, 0xb1, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xa0, - 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x67, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x32, 0xf4, 0x06, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x68, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, - 0x12, 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x0c, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, - 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, - 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, - 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, 0x01, 0x0a, 0x11, - 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x53, 0x65, 0x74, 0x22, 0x9d, 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x32, 0xf4, 0x06, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x23, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, + 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, + 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, - 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, - 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, - 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, - 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, - 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, + 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, + 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1278,31 +1277,31 @@ var file_sync_v1_sync_service_proto_goTypes = []interface{}{ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 15, // 0: sync.v1.SyncConfigRequest.after:type_name -> google.protobuf.Timestamp 15, // 1: sync.v1.SyncConfigResponse.server_time:type_name -> google.protobuf.Timestamp - 16, // 2: sync.v1.SyncConfigResponse.host_set:type_name -> sync.v1.Host - 17, // 3: sync.v1.SyncConfigResponse.known_host_set:type_name -> sync.v1.KnownHost - 18, // 4: sync.v1.SyncConfigResponse.ssh_key_set:type_name -> sync.v1.SshKey - 19, // 5: sync.v1.SyncConfigResponse.identity_set:type_name -> sync.v1.Identity + 16, // 2: sync.v1.SyncConfigResponse.hostSet:type_name -> sync.v1.Host + 17, // 3: sync.v1.SyncConfigResponse.knownHostSet:type_name -> sync.v1.KnownHost + 18, // 4: sync.v1.SyncConfigResponse.sshKeySet:type_name -> sync.v1.SshKey + 19, // 5: sync.v1.SyncConfigResponse.identitySet:type_name -> sync.v1.Identity 16, // 6: sync.v1.UpdateConfigRequest.host:type_name -> sync.v1.Host - 17, // 7: sync.v1.UpdateConfigRequest.known_host:type_name -> sync.v1.KnownHost - 18, // 8: sync.v1.UpdateConfigRequest.ssh_key:type_name -> sync.v1.SshKey + 17, // 7: sync.v1.UpdateConfigRequest.knownHost:type_name -> sync.v1.KnownHost + 18, // 8: sync.v1.UpdateConfigRequest.sshKey:type_name -> sync.v1.SshKey 19, // 9: sync.v1.UpdateConfigRequest.identity:type_name -> sync.v1.Identity 16, // 10: sync.v1.UpdateConfigResponse.host:type_name -> sync.v1.Host - 17, // 11: sync.v1.UpdateConfigResponse.known_host:type_name -> sync.v1.KnownHost - 18, // 12: sync.v1.UpdateConfigResponse.ssh_key:type_name -> sync.v1.SshKey + 17, // 11: sync.v1.UpdateConfigResponse.knownHost:type_name -> sync.v1.KnownHost + 18, // 12: sync.v1.UpdateConfigResponse.sshKey:type_name -> sync.v1.SshKey 19, // 13: sync.v1.UpdateConfigResponse.identity:type_name -> sync.v1.Identity - 14, // 14: sync.v1.UpdateGroupKeyChainRequest.user_key_wallet:type_name -> sync.v1.UserKeyWallet + 14, // 14: sync.v1.UpdateGroupKeyChainRequest.userKeyWallet:type_name -> sync.v1.UserKeyWallet 20, // 15: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group 15, // 16: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 15, // 17: sync.v1.SyncGroupResponse.server_time:type_name -> google.protobuf.Timestamp + 15, // 17: sync.v1.SyncGroupResponse.serverTime:type_name -> google.protobuf.Timestamp 20, // 18: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group 15, // 19: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp - 15, // 20: sync.v1.SyncUserKeyWalletResponse.server_time:type_name -> google.protobuf.Timestamp - 14, // 21: sync.v1.SyncUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 14, // 22: sync.v1.UpdateUserKeyWalletRequest.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 14, // 23: sync.v1.UpdateUserKeyWalletResponse.user_key_wallet_set:type_name -> sync.v1.UserKeyWallet - 15, // 24: sync.v1.UserKeyWallet.created_at:type_name -> google.protobuf.Timestamp - 15, // 25: sync.v1.UserKeyWallet.updated_at:type_name -> google.protobuf.Timestamp - 15, // 26: sync.v1.UserKeyWallet.deleted_at:type_name -> google.protobuf.Timestamp + 15, // 20: sync.v1.SyncUserKeyWalletResponse.serverTime:type_name -> google.protobuf.Timestamp + 14, // 21: sync.v1.SyncUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 14, // 22: sync.v1.UpdateUserKeyWalletRequest.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 14, // 23: sync.v1.UpdateUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 15, // 24: sync.v1.UserKeyWallet.createdAt:type_name -> google.protobuf.Timestamp + 15, // 25: sync.v1.UserKeyWallet.updatedAt:type_name -> google.protobuf.Timestamp + 15, // 26: sync.v1.UserKeyWallet.deletedAt:type_name -> google.protobuf.Timestamp 0, // 27: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest 2, // 28: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest 4, // 29: sync.v1.SyncService.UpdateGroupKeyChain:input_type -> sync.v1.UpdateGroupKeyChainRequest diff --git a/proto/auth/v1/auth_service.proto b/proto/auth/v1/auth_service.proto index 9a015c2..d9d7e24 100644 --- a/proto/auth/v1/auth_service.proto +++ b/proto/auth/v1/auth_service.proto @@ -189,7 +189,7 @@ message GetMFAStatusResponse { } message TOTPStatus { - bool is_active = 1; + bool isActive = 1; } message EmailStatus { @@ -251,7 +251,7 @@ message SendCodeEmailMFAResponse{} message CheckEmailMFARequest { string email = 1; - string verification_code = 2; + string verificationCode = 2; } message CheckEmailMFAResponse {} diff --git a/proto/sync/v1/group.proto b/proto/sync/v1/group.proto index e0cfb57..72e0ca2 100644 --- a/proto/sync/v1/group.proto +++ b/proto/sync/v1/group.proto @@ -6,15 +6,15 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1"; message Group { - GroupBasic group_basic = 1; - repeated GroupKeyChain group_keychain = 2; + GroupBasic groupBasic = 1; + repeated GroupKeyChain groupKeychain = 2; } message GroupBasic { string id = 1; - google.protobuf.Timestamp created_at = 2; - google.protobuf.Timestamp updated_at = 3; - google.protobuf.Timestamp deleted_at = 4; + google.protobuf.Timestamp createdAt = 2; + google.protobuf.Timestamp updatedAt = 3; + google.protobuf.Timestamp deletedAt = 4; string name = 5; string description = 6; string avatar = 7; @@ -23,6 +23,6 @@ message GroupBasic { } message GroupKeyChain{ - string member_id = 11; + string memberId = 11; string privateKey = 12; } diff --git a/proto/sync/v1/host.proto b/proto/sync/v1/host.proto index 24431f1..d5840fb 100644 --- a/proto/sync/v1/host.proto +++ b/proto/sync/v1/host.proto @@ -7,9 +7,9 @@ option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1" message Host { string id = 1; // 内部唯一ID ulid - google.protobuf.Timestamp created_at = 2; // 创建时间 - google.protobuf.Timestamp updated_at = 3; // 更新时间 - google.protobuf.Timestamp deleted_at = 4; // 删除时间 + google.protobuf.Timestamp createdAt = 2; // 创建时间 + google.protobuf.Timestamp updatedAt = 3; // 更新时间 + google.protobuf.Timestamp deletedAt = 4; // 删除时间 string label = 11; // 标签 repeated string tags = 12; @@ -20,6 +20,6 @@ message Host { string username = 21; // 用户名 string password = 22; // 密码 - string key_id = 23; // 密钥ID - string identity_id = 24; // 身份ID 若身份ID不为空,则覆盖手动配置 + string keyId = 23; // 密钥ID + string identityId = 24; // 身份ID 若身份ID不为空,则覆盖手动配置 } \ No newline at end of file diff --git a/proto/sync/v1/keychain.proto b/proto/sync/v1/keychain.proto index 34feb59..0936230 100644 --- a/proto/sync/v1/keychain.proto +++ b/proto/sync/v1/keychain.proto @@ -8,13 +8,13 @@ option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1" // SSH 密钥 message SshKey { string id = 1; // 内部唯一ID ulid - google.protobuf.Timestamp created_at = 2; // 创建时间 - google.protobuf.Timestamp updated_at = 3; // 更新时间 - google.protobuf.Timestamp deleted_at = 4; // 删除时间 + google.protobuf.Timestamp createdAt = 2; // 创建时间 + google.protobuf.Timestamp updatedAt = 3; // 更新时间 + google.protobuf.Timestamp deletedAt = 4; // 删除时间 string label = 11; // 标签 - string private_key = 12; // 私钥 - string public_key = 13; // 公钥 + string privateKey = 12; // 私钥 + string publicKey = 13; // 公钥 string certificate = 14; // 证书 } @@ -22,14 +22,14 @@ message SshKey { // 这些凭据可以快速添加为身份并与主机条目链接。当凭据发生更改时,不必更新每台主机而只需更新身份即可。 message Identity { string id = 1; // 内部唯一ID ulid - google.protobuf.Timestamp created_at = 2; // 创建时间 - google.protobuf.Timestamp updated_at = 3; // 更新时间 - google.protobuf.Timestamp deleted_at = 4; // 删除时间 + google.protobuf.Timestamp createdAt = 2; // 创建时间 + google.protobuf.Timestamp updatedAt = 3; // 更新时间 + google.protobuf.Timestamp deletedAt = 4; // 删除时间 string label = 11; // 标签 string username = 12; string password = 13; - string key_id = 14; // 密钥ID + string keyId = 14; // 密钥ID } // TODO: FIDO2,Certificate,BiometricKey \ No newline at end of file diff --git a/proto/sync/v1/known_hosts.proto b/proto/sync/v1/known_hosts.proto index 44e18b8..7f7a476 100644 --- a/proto/sync/v1/known_hosts.proto +++ b/proto/sync/v1/known_hosts.proto @@ -7,10 +7,10 @@ option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1" message KnownHost { string id = 1; // 内部唯一ID ulid - google.protobuf.Timestamp created_at = 2; // 创建时间 - google.protobuf.Timestamp updated_at = 3; // 更新时间 - google.protobuf.Timestamp deleted_at = 4; // 删除时间 + google.protobuf.Timestamp createdAt = 2; // 创建时间 + google.protobuf.Timestamp updatedAt = 3; // 更新时间 + google.protobuf.Timestamp deletedAt = 4; // 删除时间 string address = 11; // ip或host - string public_key = 12; // 公钥 + string publicKey = 12; // 公钥 } \ No newline at end of file diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 23b697c..7e675e2 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -55,24 +55,24 @@ service SyncService { // SyncConfig message SyncConfigRequest { google.protobuf.Timestamp after = 1; // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 - string group_id = 2; + string groupId = 2; } message SyncConfigResponse { google.protobuf.Timestamp server_time = 1; // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 - repeated Host host_set = 11; - repeated KnownHost known_host_set = 12; - repeated SshKey ssh_key_set = 13; - repeated Identity identity_set = 14; + repeated Host hostSet = 11; + repeated KnownHost knownHostSet = 12; + repeated SshKey sshKeySet = 13; + repeated Identity identitySet = 14; } // UpdateConfig message UpdateConfigRequest { - string group_id = 2; + string groupId = 2; oneof data { Host host = 11; - KnownHost known_host = 12; - SshKey ssh_key = 13; + KnownHost knownHost = 12; + SshKey sshKey = 13; Identity identity = 14; } } @@ -80,18 +80,18 @@ message UpdateConfigRequest { message UpdateConfigResponse { oneof data { // 返回更新数据的服务端版本,因为新建的数据会加上ID和时间 Host host = 11; - KnownHost known_host = 12; - SshKey ssh_key = 13; + KnownHost knownHost = 12; + SshKey sshKey = 13; Identity identity = 14; } } // UpdateGroupKeyChain message UpdateGroupKeyChainRequest{ - string group_id = 1; + string groupId = 1; string publicKey = 2; string encryptedGroupPrivateKey = 3; - repeated UserKeyWallet user_key_wallet = 4; + repeated UserKeyWallet userKeyWallet = 4; } message UpdateGroupKeyChainResponse{} @@ -109,7 +109,7 @@ message SyncGroupRequest { } message SyncGroupResponse { - google.protobuf.Timestamp server_time = 1; + google.protobuf.Timestamp serverTime = 1; repeated Group groups = 11; } @@ -119,30 +119,30 @@ message SyncUserKeyWalletRequest { } message SyncUserKeyWalletResponse { - google.protobuf.Timestamp server_time = 1; // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 + google.protobuf.Timestamp serverTime = 1; // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 string publicKey = 2; string encryptedPrivateKey = 3; - repeated UserKeyWallet user_key_wallet_set = 4; + repeated UserKeyWallet userKeyWalletSet = 4; } // UpdateUserKeyWallet message UpdateUserKeyWalletRequest { string publicKey = 1; string encryptedPrivateKey = 2; - repeated UserKeyWallet user_key_wallet_set = 4; + repeated UserKeyWallet userKeyWalletSet = 4; } message UpdateUserKeyWalletResponse { string publicKey = 1; string encryptedPrivateKey = 2; - repeated UserKeyWallet user_key_wallet_set = 4; + repeated UserKeyWallet userKeyWalletSet = 4; } message UserKeyWallet { string uid = 1; string gid = 2; string encryptedGroupPrivateKey = 3; - google.protobuf.Timestamp created_at = 4; - google.protobuf.Timestamp updated_at = 5; - google.protobuf.Timestamp deleted_at = 6; + google.protobuf.Timestamp createdAt = 4; + google.protobuf.Timestamp updatedAt = 5; + google.protobuf.Timestamp deletedAt = 6; } \ No newline at end of file From 8d9d0ad46d998a283bd32335ffbf22713f78d767 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Tue, 21 Nov 2023 15:27:24 +0800 Subject: [PATCH 39/46] fix: Invite process --- gen/openapi/sync/v1/sync_service.swagger.json | 205 +++-- gen/proto/sync/v1/sync_service.pb.go | 837 ++++++++++++------ gen/proto/sync/v1/sync_service.pb.gw.go | 326 +++++-- gen/proto/sync/v1/sync_service.pb.ts | 47 +- gen/proto/sync/v1/sync_service_grpc.pb.go | 156 +++- proto/sync/v1/sync_service.proto | 65 +- 6 files changed, 1141 insertions(+), 495 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 94f151f..9d1ddcb 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -16,6 +16,105 @@ "application/json" ], "paths": { + "/gapi/sync/v1/group_delete_user": { + "post": { + "summary": "删除用户", + "operationId": "SyncService_GroupDeleteUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GroupDeleteUserResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GroupDeleteUserRequest" + } + } + ], + "tags": [ + "SyncService" + ] + } + }, + "/gapi/sync/v1/group_invite_accept": { + "post": { + "summary": "邀请用户加入", + "operationId": "SyncService_GroupInviteAccept", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GroupInviteAcceptResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GroupInviteAcceptRequest" + } + } + ], + "tags": [ + "SyncService" + ] + } + }, + "/gapi/sync/v1/group_invite_user": { + "post": { + "summary": "邀请用户加入,加密的密钥由邀请者那边去取被邀请者的公钥加密后存储", + "operationId": "SyncService_GroupInviteUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GroupInviteUserResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GroupInviteUserRequest" + } + } + ], + "tags": [ + "SyncService" + ] + } + }, "/gapi/sync/v1/sync_config": { "get": { "summary": "拉取指定时间点之后的配置变动信息", @@ -186,39 +285,6 @@ ] } }, - "/gapi/sync/v1/update_group_key_chain": { - "post": { - "summary": "组的所有者修改组的密钥链", - "operationId": "SyncService_UpdateGroupKeyChain", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1UpdateGroupKeyChainResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1UpdateGroupKeyChainRequest" - } - } - ], - "tags": [ - "SyncService" - ] - } - }, "/gapi/sync/v1/update_user_key_wallet": { "post": { "summary": "修改用户密钥对,修改的时候所有相关组的加密密钥均要替换", @@ -334,6 +400,54 @@ } } }, + "v1GroupDeleteUserRequest": { + "type": "object", + "properties": { + "userDeletedUid": { + "type": "string" + }, + "gid": { + "type": "string" + } + }, + "title": "GroupDeleteUser" + }, + "v1GroupDeleteUserResponse": { + "type": "object" + }, + "v1GroupInviteAcceptRequest": { + "type": "object", + "properties": { + "gid": { + "type": "string" + }, + "isAccept": { + "type": "boolean" + } + }, + "title": "GroupInviteAccept" + }, + "v1GroupInviteAcceptResponse": { + "type": "object" + }, + "v1GroupInviteUserRequest": { + "type": "object", + "properties": { + "gid": { + "type": "string" + }, + "inviteeUid": { + "type": "string" + }, + "encryptedGroupPrivateKey": { + "type": "string" + } + }, + "title": "GroupInviteUser" + }, + "v1GroupInviteUserResponse": { + "type": "object" + }, "v1GroupKeyChain": { "type": "object", "properties": { @@ -634,31 +748,6 @@ } } }, - "v1UpdateGroupKeyChainRequest": { - "type": "object", - "properties": { - "groupId": { - "type": "string" - }, - "publicKey": { - "type": "string" - }, - "encryptedGroupPrivateKey": { - "type": "string" - }, - "userKeyWallet": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1UserKeyWallet" - } - } - }, - "title": "UpdateGroupKeyChain" - }, - "v1UpdateGroupKeyChainResponse": { - "type": "object" - }, "v1UpdateGroupRequest": { "type": "object", "properties": { diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index c764dcf..59971ca 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -384,116 +384,6 @@ func (*UpdateConfigResponse_SshKey) isUpdateConfigResponse_Data() {} func (*UpdateConfigResponse_Identity) isUpdateConfigResponse_Data() {} -// UpdateGroupKeyChain -type UpdateGroupKeyChainRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupId string `protobuf:"bytes,1,opt,name=groupId,proto3" json:"groupId,omitempty"` - PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` - UserKeyWallet []*UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWallet,proto3" json:"userKeyWallet,omitempty"` -} - -func (x *UpdateGroupKeyChainRequest) Reset() { - *x = UpdateGroupKeyChainRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateGroupKeyChainRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateGroupKeyChainRequest) ProtoMessage() {} - -func (x *UpdateGroupKeyChainRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[4] - 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 UpdateGroupKeyChainRequest.ProtoReflect.Descriptor instead. -func (*UpdateGroupKeyChainRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{4} -} - -func (x *UpdateGroupKeyChainRequest) GetGroupId() string { - if x != nil { - return x.GroupId - } - return "" -} - -func (x *UpdateGroupKeyChainRequest) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *UpdateGroupKeyChainRequest) GetEncryptedGroupPrivateKey() string { - if x != nil { - return x.EncryptedGroupPrivateKey - } - return "" -} - -func (x *UpdateGroupKeyChainRequest) GetUserKeyWallet() []*UserKeyWallet { - if x != nil { - return x.UserKeyWallet - } - return nil -} - -type UpdateGroupKeyChainResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateGroupKeyChainResponse) Reset() { - *x = UpdateGroupKeyChainResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateGroupKeyChainResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateGroupKeyChainResponse) ProtoMessage() {} - -func (x *UpdateGroupKeyChainResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[5] - 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 UpdateGroupKeyChainResponse.ProtoReflect.Descriptor instead. -func (*UpdateGroupKeyChainResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{5} -} - // UpdateGroup type UpdateGroupRequest struct { state protoimpl.MessageState @@ -506,7 +396,7 @@ type UpdateGroupRequest struct { func (x *UpdateGroupRequest) Reset() { *x = UpdateGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[6] + mi := &file_sync_v1_sync_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -519,7 +409,7 @@ func (x *UpdateGroupRequest) String() string { func (*UpdateGroupRequest) ProtoMessage() {} func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[6] + mi := &file_sync_v1_sync_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -532,7 +422,7 @@ func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateGroupRequest.ProtoReflect.Descriptor instead. func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{6} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{4} } func (x *UpdateGroupRequest) GetGroup() *Group { @@ -551,7 +441,7 @@ type UpdateGroupResponse struct { func (x *UpdateGroupResponse) Reset() { *x = UpdateGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[7] + mi := &file_sync_v1_sync_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -564,7 +454,7 @@ func (x *UpdateGroupResponse) String() string { func (*UpdateGroupResponse) ProtoMessage() {} func (x *UpdateGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[7] + mi := &file_sync_v1_sync_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -577,7 +467,7 @@ func (x *UpdateGroupResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateGroupResponse.ProtoReflect.Descriptor instead. func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{7} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{5} } // SyncGroup @@ -592,7 +482,7 @@ type SyncGroupRequest struct { func (x *SyncGroupRequest) Reset() { *x = SyncGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[8] + mi := &file_sync_v1_sync_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -605,7 +495,7 @@ func (x *SyncGroupRequest) String() string { func (*SyncGroupRequest) ProtoMessage() {} func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[8] + mi := &file_sync_v1_sync_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -618,7 +508,7 @@ func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncGroupRequest.ProtoReflect.Descriptor instead. func (*SyncGroupRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{6} } func (x *SyncGroupRequest) GetAfter() *timestamppb.Timestamp { @@ -640,7 +530,7 @@ type SyncGroupResponse struct { func (x *SyncGroupResponse) Reset() { *x = SyncGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[9] + mi := &file_sync_v1_sync_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -653,7 +543,7 @@ func (x *SyncGroupResponse) String() string { func (*SyncGroupResponse) ProtoMessage() {} func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[9] + mi := &file_sync_v1_sync_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -666,7 +556,7 @@ func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncGroupResponse.ProtoReflect.Descriptor instead. func (*SyncGroupResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{7} } func (x *SyncGroupResponse) GetServerTime() *timestamppb.Timestamp { @@ -695,7 +585,7 @@ type SyncUserKeyWalletRequest struct { func (x *SyncUserKeyWalletRequest) Reset() { *x = SyncUserKeyWalletRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[10] + mi := &file_sync_v1_sync_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -708,7 +598,7 @@ func (x *SyncUserKeyWalletRequest) String() string { func (*SyncUserKeyWalletRequest) ProtoMessage() {} func (x *SyncUserKeyWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[10] + mi := &file_sync_v1_sync_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -721,7 +611,7 @@ func (x *SyncUserKeyWalletRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncUserKeyWalletRequest.ProtoReflect.Descriptor instead. func (*SyncUserKeyWalletRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{10} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} } func (x *SyncUserKeyWalletRequest) GetAfter() *timestamppb.Timestamp { @@ -745,7 +635,7 @@ type SyncUserKeyWalletResponse struct { func (x *SyncUserKeyWalletResponse) Reset() { *x = SyncUserKeyWalletResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] + mi := &file_sync_v1_sync_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -758,7 +648,7 @@ func (x *SyncUserKeyWalletResponse) String() string { func (*SyncUserKeyWalletResponse) ProtoMessage() {} func (x *SyncUserKeyWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] + mi := &file_sync_v1_sync_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -771,7 +661,7 @@ func (x *SyncUserKeyWalletResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncUserKeyWalletResponse.ProtoReflect.Descriptor instead. func (*SyncUserKeyWalletResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} } func (x *SyncUserKeyWalletResponse) GetServerTime() *timestamppb.Timestamp { @@ -816,7 +706,7 @@ type UpdateUserKeyWalletRequest struct { func (x *UpdateUserKeyWalletRequest) Reset() { *x = UpdateUserKeyWalletRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[12] + mi := &file_sync_v1_sync_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -829,7 +719,7 @@ func (x *UpdateUserKeyWalletRequest) String() string { func (*UpdateUserKeyWalletRequest) ProtoMessage() {} func (x *UpdateUserKeyWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[12] + mi := &file_sync_v1_sync_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -842,7 +732,7 @@ func (x *UpdateUserKeyWalletRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserKeyWalletRequest.ProtoReflect.Descriptor instead. func (*UpdateUserKeyWalletRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{10} } func (x *UpdateUserKeyWalletRequest) GetPublicKey() string { @@ -879,7 +769,7 @@ type UpdateUserKeyWalletResponse struct { func (x *UpdateUserKeyWalletResponse) Reset() { *x = UpdateUserKeyWalletResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[13] + mi := &file_sync_v1_sync_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -892,7 +782,7 @@ func (x *UpdateUserKeyWalletResponse) String() string { func (*UpdateUserKeyWalletResponse) ProtoMessage() {} func (x *UpdateUserKeyWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[13] + mi := &file_sync_v1_sync_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -905,7 +795,7 @@ func (x *UpdateUserKeyWalletResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserKeyWalletResponse.ProtoReflect.Descriptor instead. func (*UpdateUserKeyWalletResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{13} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} } func (x *UpdateUserKeyWalletResponse) GetPublicKey() string { @@ -945,7 +835,7 @@ type UserKeyWallet struct { func (x *UserKeyWallet) Reset() { *x = UserKeyWallet{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[14] + mi := &file_sync_v1_sync_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -958,7 +848,7 @@ func (x *UserKeyWallet) String() string { func (*UserKeyWallet) ProtoMessage() {} func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[14] + mi := &file_sync_v1_sync_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -971,7 +861,7 @@ func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { // Deprecated: Use UserKeyWallet.ProtoReflect.Descriptor instead. func (*UserKeyWallet) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{14} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} } func (x *UserKeyWallet) GetUid() string { @@ -1016,6 +906,296 @@ func (x *UserKeyWallet) GetDeletedAt() *timestamppb.Timestamp { return nil } +// GroupInviteUser +type GroupInviteUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + InviteeUid string `protobuf:"bytes,2,opt,name=inviteeUid,proto3" json:"inviteeUid,omitempty"` + EncryptedGroupPrivateKey string `protobuf:"bytes,4,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` +} + +func (x *GroupInviteUserRequest) Reset() { + *x = GroupInviteUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupInviteUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupInviteUserRequest) ProtoMessage() {} + +func (x *GroupInviteUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[13] + 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 GroupInviteUserRequest.ProtoReflect.Descriptor instead. +func (*GroupInviteUserRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{13} +} + +func (x *GroupInviteUserRequest) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *GroupInviteUserRequest) GetInviteeUid() string { + if x != nil { + return x.InviteeUid + } + return "" +} + +func (x *GroupInviteUserRequest) GetEncryptedGroupPrivateKey() string { + if x != nil { + return x.EncryptedGroupPrivateKey + } + return "" +} + +type GroupInviteUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GroupInviteUserResponse) Reset() { + *x = GroupInviteUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupInviteUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupInviteUserResponse) ProtoMessage() {} + +func (x *GroupInviteUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[14] + 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 GroupInviteUserResponse.ProtoReflect.Descriptor instead. +func (*GroupInviteUserResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{14} +} + +// GroupInviteAccept +type GroupInviteAcceptRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` + IsAccept bool `protobuf:"varint,2,opt,name=isAccept,proto3" json:"isAccept,omitempty"` +} + +func (x *GroupInviteAcceptRequest) Reset() { + *x = GroupInviteAcceptRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupInviteAcceptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupInviteAcceptRequest) ProtoMessage() {} + +func (x *GroupInviteAcceptRequest) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[15] + 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 GroupInviteAcceptRequest.ProtoReflect.Descriptor instead. +func (*GroupInviteAcceptRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{15} +} + +func (x *GroupInviteAcceptRequest) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *GroupInviteAcceptRequest) GetIsAccept() bool { + if x != nil { + return x.IsAccept + } + return false +} + +type GroupInviteAcceptResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GroupInviteAcceptResponse) Reset() { + *x = GroupInviteAcceptResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupInviteAcceptResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupInviteAcceptResponse) ProtoMessage() {} + +func (x *GroupInviteAcceptResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[16] + 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 GroupInviteAcceptResponse.ProtoReflect.Descriptor instead. +func (*GroupInviteAcceptResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{16} +} + +// GroupDeleteUser +type GroupDeleteUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserDeletedUid string `protobuf:"bytes,1,opt,name=userDeletedUid,proto3" json:"userDeletedUid,omitempty"` + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` +} + +func (x *GroupDeleteUserRequest) Reset() { + *x = GroupDeleteUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupDeleteUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupDeleteUserRequest) ProtoMessage() {} + +func (x *GroupDeleteUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_service_proto_msgTypes[17] + 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 GroupDeleteUserRequest.ProtoReflect.Descriptor instead. +func (*GroupDeleteUserRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{17} +} + +func (x *GroupDeleteUserRequest) GetUserDeletedUid() string { + if x != nil { + return x.UserDeletedUid + } + return "" +} + +func (x *GroupDeleteUserRequest) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +type GroupDeleteUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GroupDeleteUserResponse) Reset() { + *x = GroupDeleteUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupDeleteUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupDeleteUserResponse) ProtoMessage() {} + +func (x *GroupDeleteUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_sync_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 GroupDeleteUserResponse.ProtoReflect.Descriptor instead. +func (*GroupDeleteUserResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{18} +} + var File_sync_v1_sync_service_proto protoreflect.FileDescriptor var file_sync_v1_sync_service_proto_rawDesc = []byte{ @@ -1083,21 +1263,6 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0xce, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, - 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x22, 0x1d, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, - 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, @@ -1175,67 +1340,106 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x32, 0xf4, 0x06, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, - 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x23, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, - 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x6f, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, - 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, - 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, - 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x64, 0x41, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x16, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x65, 0x55, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x65, 0x55, 0x69, + 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x19, 0x0a, + 0x17, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x52, 0x0a, 0x16, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x73, 0x65, + 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x55, 0x69, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x67, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf1, + 0x08, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, + 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, + 0x22, 0x1b, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6f, 0x0a, + 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, + 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, + 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, + 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, + 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, + 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, + 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, + 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x11, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, + 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, 0x21, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x5f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, + 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, + 0x2a, 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, + 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1250,77 +1454,84 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { return file_sync_v1_sync_service_proto_rawDescData } -var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SyncConfigRequest)(nil), // 0: sync.v1.SyncConfigRequest (*SyncConfigResponse)(nil), // 1: sync.v1.SyncConfigResponse (*UpdateConfigRequest)(nil), // 2: sync.v1.UpdateConfigRequest (*UpdateConfigResponse)(nil), // 3: sync.v1.UpdateConfigResponse - (*UpdateGroupKeyChainRequest)(nil), // 4: sync.v1.UpdateGroupKeyChainRequest - (*UpdateGroupKeyChainResponse)(nil), // 5: sync.v1.UpdateGroupKeyChainResponse - (*UpdateGroupRequest)(nil), // 6: sync.v1.UpdateGroupRequest - (*UpdateGroupResponse)(nil), // 7: sync.v1.UpdateGroupResponse - (*SyncGroupRequest)(nil), // 8: sync.v1.SyncGroupRequest - (*SyncGroupResponse)(nil), // 9: sync.v1.SyncGroupResponse - (*SyncUserKeyWalletRequest)(nil), // 10: sync.v1.SyncUserKeyWalletRequest - (*SyncUserKeyWalletResponse)(nil), // 11: sync.v1.SyncUserKeyWalletResponse - (*UpdateUserKeyWalletRequest)(nil), // 12: sync.v1.UpdateUserKeyWalletRequest - (*UpdateUserKeyWalletResponse)(nil), // 13: sync.v1.UpdateUserKeyWalletResponse - (*UserKeyWallet)(nil), // 14: sync.v1.UserKeyWallet - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp - (*Host)(nil), // 16: sync.v1.Host - (*KnownHost)(nil), // 17: sync.v1.KnownHost - (*SshKey)(nil), // 18: sync.v1.SshKey - (*Identity)(nil), // 19: sync.v1.Identity - (*Group)(nil), // 20: sync.v1.Group + (*UpdateGroupRequest)(nil), // 4: sync.v1.UpdateGroupRequest + (*UpdateGroupResponse)(nil), // 5: sync.v1.UpdateGroupResponse + (*SyncGroupRequest)(nil), // 6: sync.v1.SyncGroupRequest + (*SyncGroupResponse)(nil), // 7: sync.v1.SyncGroupResponse + (*SyncUserKeyWalletRequest)(nil), // 8: sync.v1.SyncUserKeyWalletRequest + (*SyncUserKeyWalletResponse)(nil), // 9: sync.v1.SyncUserKeyWalletResponse + (*UpdateUserKeyWalletRequest)(nil), // 10: sync.v1.UpdateUserKeyWalletRequest + (*UpdateUserKeyWalletResponse)(nil), // 11: sync.v1.UpdateUserKeyWalletResponse + (*UserKeyWallet)(nil), // 12: sync.v1.UserKeyWallet + (*GroupInviteUserRequest)(nil), // 13: sync.v1.GroupInviteUserRequest + (*GroupInviteUserResponse)(nil), // 14: sync.v1.GroupInviteUserResponse + (*GroupInviteAcceptRequest)(nil), // 15: sync.v1.GroupInviteAcceptRequest + (*GroupInviteAcceptResponse)(nil), // 16: sync.v1.GroupInviteAcceptResponse + (*GroupDeleteUserRequest)(nil), // 17: sync.v1.GroupDeleteUserRequest + (*GroupDeleteUserResponse)(nil), // 18: sync.v1.GroupDeleteUserResponse + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (*Host)(nil), // 20: sync.v1.Host + (*KnownHost)(nil), // 21: sync.v1.KnownHost + (*SshKey)(nil), // 22: sync.v1.SshKey + (*Identity)(nil), // 23: sync.v1.Identity + (*Group)(nil), // 24: sync.v1.Group } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 15, // 0: sync.v1.SyncConfigRequest.after:type_name -> google.protobuf.Timestamp - 15, // 1: sync.v1.SyncConfigResponse.server_time:type_name -> google.protobuf.Timestamp - 16, // 2: sync.v1.SyncConfigResponse.hostSet:type_name -> sync.v1.Host - 17, // 3: sync.v1.SyncConfigResponse.knownHostSet:type_name -> sync.v1.KnownHost - 18, // 4: sync.v1.SyncConfigResponse.sshKeySet:type_name -> sync.v1.SshKey - 19, // 5: sync.v1.SyncConfigResponse.identitySet:type_name -> sync.v1.Identity - 16, // 6: sync.v1.UpdateConfigRequest.host:type_name -> sync.v1.Host - 17, // 7: sync.v1.UpdateConfigRequest.knownHost:type_name -> sync.v1.KnownHost - 18, // 8: sync.v1.UpdateConfigRequest.sshKey:type_name -> sync.v1.SshKey - 19, // 9: sync.v1.UpdateConfigRequest.identity:type_name -> sync.v1.Identity - 16, // 10: sync.v1.UpdateConfigResponse.host:type_name -> sync.v1.Host - 17, // 11: sync.v1.UpdateConfigResponse.knownHost:type_name -> sync.v1.KnownHost - 18, // 12: sync.v1.UpdateConfigResponse.sshKey:type_name -> sync.v1.SshKey - 19, // 13: sync.v1.UpdateConfigResponse.identity:type_name -> sync.v1.Identity - 14, // 14: sync.v1.UpdateGroupKeyChainRequest.userKeyWallet:type_name -> sync.v1.UserKeyWallet - 20, // 15: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group - 15, // 16: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 15, // 17: sync.v1.SyncGroupResponse.serverTime:type_name -> google.protobuf.Timestamp - 20, // 18: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group - 15, // 19: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp - 15, // 20: sync.v1.SyncUserKeyWalletResponse.serverTime:type_name -> google.protobuf.Timestamp - 14, // 21: sync.v1.SyncUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet - 14, // 22: sync.v1.UpdateUserKeyWalletRequest.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet - 14, // 23: sync.v1.UpdateUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet - 15, // 24: sync.v1.UserKeyWallet.createdAt:type_name -> google.protobuf.Timestamp - 15, // 25: sync.v1.UserKeyWallet.updatedAt:type_name -> google.protobuf.Timestamp - 15, // 26: sync.v1.UserKeyWallet.deletedAt:type_name -> google.protobuf.Timestamp - 0, // 27: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest - 2, // 28: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest - 4, // 29: sync.v1.SyncService.UpdateGroupKeyChain:input_type -> sync.v1.UpdateGroupKeyChainRequest - 6, // 30: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest - 8, // 31: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 10, // 32: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest - 12, // 33: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest - 1, // 34: sync.v1.SyncService.SyncConfig:output_type -> sync.v1.SyncConfigResponse - 3, // 35: sync.v1.SyncService.UpdateConfig:output_type -> sync.v1.UpdateConfigResponse - 5, // 36: sync.v1.SyncService.UpdateGroupKeyChain:output_type -> sync.v1.UpdateGroupKeyChainResponse - 7, // 37: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 9, // 38: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 11, // 39: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse - 13, // 40: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse - 34, // [34:41] is the sub-list for method output_type - 27, // [27:34] is the sub-list for method input_type - 27, // [27:27] is the sub-list for extension type_name - 27, // [27:27] is the sub-list for extension extendee - 0, // [0:27] is the sub-list for field type_name + 19, // 0: sync.v1.SyncConfigRequest.after:type_name -> google.protobuf.Timestamp + 19, // 1: sync.v1.SyncConfigResponse.server_time:type_name -> google.protobuf.Timestamp + 20, // 2: sync.v1.SyncConfigResponse.hostSet:type_name -> sync.v1.Host + 21, // 3: sync.v1.SyncConfigResponse.knownHostSet:type_name -> sync.v1.KnownHost + 22, // 4: sync.v1.SyncConfigResponse.sshKeySet:type_name -> sync.v1.SshKey + 23, // 5: sync.v1.SyncConfigResponse.identitySet:type_name -> sync.v1.Identity + 20, // 6: sync.v1.UpdateConfigRequest.host:type_name -> sync.v1.Host + 21, // 7: sync.v1.UpdateConfigRequest.knownHost:type_name -> sync.v1.KnownHost + 22, // 8: sync.v1.UpdateConfigRequest.sshKey:type_name -> sync.v1.SshKey + 23, // 9: sync.v1.UpdateConfigRequest.identity:type_name -> sync.v1.Identity + 20, // 10: sync.v1.UpdateConfigResponse.host:type_name -> sync.v1.Host + 21, // 11: sync.v1.UpdateConfigResponse.knownHost:type_name -> sync.v1.KnownHost + 22, // 12: sync.v1.UpdateConfigResponse.sshKey:type_name -> sync.v1.SshKey + 23, // 13: sync.v1.UpdateConfigResponse.identity:type_name -> sync.v1.Identity + 24, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group + 19, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp + 19, // 16: sync.v1.SyncGroupResponse.serverTime:type_name -> google.protobuf.Timestamp + 24, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group + 19, // 18: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp + 19, // 19: sync.v1.SyncUserKeyWalletResponse.serverTime:type_name -> google.protobuf.Timestamp + 12, // 20: sync.v1.SyncUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 12, // 21: sync.v1.UpdateUserKeyWalletRequest.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 12, // 22: sync.v1.UpdateUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 19, // 23: sync.v1.UserKeyWallet.createdAt:type_name -> google.protobuf.Timestamp + 19, // 24: sync.v1.UserKeyWallet.updatedAt:type_name -> google.protobuf.Timestamp + 19, // 25: sync.v1.UserKeyWallet.deletedAt:type_name -> google.protobuf.Timestamp + 0, // 26: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest + 2, // 27: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest + 4, // 28: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest + 6, // 29: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 8, // 30: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest + 10, // 31: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest + 13, // 32: sync.v1.SyncService.GroupInviteUser:input_type -> sync.v1.GroupInviteUserRequest + 15, // 33: sync.v1.SyncService.GroupInviteAccept:input_type -> sync.v1.GroupInviteAcceptRequest + 17, // 34: sync.v1.SyncService.GroupDeleteUser:input_type -> sync.v1.GroupDeleteUserRequest + 1, // 35: sync.v1.SyncService.SyncConfig:output_type -> sync.v1.SyncConfigResponse + 3, // 36: sync.v1.SyncService.UpdateConfig:output_type -> sync.v1.UpdateConfigResponse + 5, // 37: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse + 7, // 38: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 9, // 39: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse + 11, // 40: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse + 14, // 41: sync.v1.SyncService.GroupInviteUser:output_type -> sync.v1.GroupInviteUserResponse + 16, // 42: sync.v1.SyncService.GroupInviteAccept:output_type -> sync.v1.GroupInviteAcceptResponse + 18, // 43: sync.v1.SyncService.GroupDeleteUser:output_type -> sync.v1.GroupDeleteUserResponse + 35, // [35:44] is the sub-list for method output_type + 26, // [26:35] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_sync_v1_sync_service_proto_init() } @@ -1382,7 +1593,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupKeyChainRequest); i { + switch v := v.(*UpdateGroupRequest); i { case 0: return &v.state case 1: @@ -1394,7 +1605,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupKeyChainResponse); i { + switch v := v.(*UpdateGroupResponse); i { case 0: return &v.state case 1: @@ -1406,7 +1617,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupRequest); i { + switch v := v.(*SyncGroupRequest); i { case 0: return &v.state case 1: @@ -1418,7 +1629,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupResponse); i { + switch v := v.(*SyncGroupResponse); i { case 0: return &v.state case 1: @@ -1430,7 +1641,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncGroupRequest); i { + switch v := v.(*SyncUserKeyWalletRequest); i { case 0: return &v.state case 1: @@ -1442,7 +1653,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncGroupResponse); i { + switch v := v.(*SyncUserKeyWalletResponse); i { case 0: return &v.state case 1: @@ -1454,7 +1665,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncUserKeyWalletRequest); i { + switch v := v.(*UpdateUserKeyWalletRequest); i { case 0: return &v.state case 1: @@ -1466,7 +1677,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncUserKeyWalletResponse); i { + switch v := v.(*UpdateUserKeyWalletResponse); i { case 0: return &v.state case 1: @@ -1478,7 +1689,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserKeyWalletRequest); i { + switch v := v.(*UserKeyWallet); i { case 0: return &v.state case 1: @@ -1490,7 +1701,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserKeyWalletResponse); i { + switch v := v.(*GroupInviteUserRequest); i { case 0: return &v.state case 1: @@ -1502,7 +1713,55 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserKeyWallet); i { + switch v := v.(*GroupInviteUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupInviteAcceptRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupInviteAcceptResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupDeleteUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sync_v1_sync_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupDeleteUserResponse); i { case 0: return &v.state case 1: @@ -1532,7 +1791,7 @@ func file_sync_v1_sync_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_sync_service_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index 2bfcba6..83b046b 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -101,40 +101,6 @@ func local_request_SyncService_UpdateConfig_0(ctx context.Context, marshaler run } -func request_SyncService_UpdateGroupKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateGroupKeyChainRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UpdateGroupKeyChain(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SyncService_UpdateGroupKeyChain_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateGroupKeyChainRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UpdateGroupKeyChain(ctx, &protoReq) - return msg, metadata, err - -} - func request_SyncService_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateGroupRequest var metadata runtime.ServerMetadata @@ -275,6 +241,108 @@ func local_request_SyncService_UpdateUserKeyWallet_0(ctx context.Context, marsha } +func request_SyncService_GroupInviteUser_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GroupInviteUserRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GroupInviteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyncService_GroupInviteUser_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GroupInviteUserRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GroupInviteUser(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SyncService_GroupInviteAccept_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GroupInviteAcceptRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GroupInviteAccept(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyncService_GroupInviteAccept_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GroupInviteAcceptRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GroupInviteAccept(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SyncService_GroupDeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GroupDeleteUserRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GroupDeleteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyncService_GroupDeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GroupDeleteUserRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GroupDeleteUser(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSyncServiceHandlerServer registers the http handlers for service SyncService to "mux". // UnaryRPC :call SyncServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -331,7 +399,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_SyncService_UpdateGroupKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -339,12 +407,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroupKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group_key_chain")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_UpdateGroupKeyChain_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_UpdateGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -352,11 +420,11 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_UpdateGroupKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SyncService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -364,12 +432,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_group")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_UpdateGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_SyncGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -377,11 +445,11 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_UpdateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_SyncService_SyncGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -389,12 +457,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_group")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_user_key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_SyncGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_SyncUserKeyWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -402,11 +470,11 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_SyncGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_SyncService_SyncUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_UpdateUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -414,12 +482,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_user_key_wallet")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_SyncUserKeyWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_UpdateUserKeyWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -427,11 +495,11 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_SyncUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SyncService_UpdateUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_GroupInviteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -439,12 +507,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_wallet")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GroupInviteUser", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_invite_user")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_UpdateUserKeyWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_GroupInviteUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -452,7 +520,57 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_UpdateUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_GroupInviteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SyncService_GroupInviteAccept_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GroupInviteAccept", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_invite_accept")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SyncService_GroupInviteAccept_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GroupInviteAccept_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SyncService_GroupDeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GroupDeleteUser", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_delete_user")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SyncService_GroupDeleteUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GroupDeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -541,113 +659,157 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_SyncService_UpdateGroupKeyChain_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroupKeyChain", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group_key_chain")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_UpdateGroupKeyChain_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_UpdateGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_UpdateGroupKeyChain_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SyncService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_group")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_UpdateGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_SyncGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_UpdateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_SyncService_SyncGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_group")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_user_key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_SyncGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_SyncUserKeyWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_SyncGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_SyncService_SyncUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_UpdateUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_user_key_wallet")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_SyncUserKeyWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_UpdateUserKeyWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_SyncUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SyncService_UpdateUserKeyWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SyncService_GroupInviteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_wallet")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GroupInviteUser", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_invite_user")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_UpdateUserKeyWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_GroupInviteUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_UpdateUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_GroupInviteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SyncService_GroupInviteAccept_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GroupInviteAccept", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_invite_accept")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SyncService_GroupInviteAccept_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GroupInviteAccept_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SyncService_GroupDeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GroupDeleteUser", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_delete_user")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SyncService_GroupDeleteUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_GroupDeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -659,8 +821,6 @@ var ( pattern_SyncService_UpdateConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_config"}, "")) - pattern_SyncService_UpdateGroupKeyChain_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_group_key_chain"}, "")) - pattern_SyncService_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_group"}, "")) pattern_SyncService_SyncGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_group"}, "")) @@ -668,6 +828,12 @@ var ( pattern_SyncService_SyncUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_user_key_wallet"}, "")) pattern_SyncService_UpdateUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_user_key_wallet"}, "")) + + pattern_SyncService_GroupInviteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "group_invite_user"}, "")) + + pattern_SyncService_GroupInviteAccept_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "group_invite_accept"}, "")) + + pattern_SyncService_GroupDeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "group_delete_user"}, "")) ) var ( @@ -675,8 +841,6 @@ var ( forward_SyncService_UpdateConfig_0 = runtime.ForwardResponseMessage - forward_SyncService_UpdateGroupKeyChain_0 = runtime.ForwardResponseMessage - forward_SyncService_UpdateGroup_0 = runtime.ForwardResponseMessage forward_SyncService_SyncGroup_0 = runtime.ForwardResponseMessage @@ -684,4 +848,10 @@ var ( forward_SyncService_SyncUserKeyWallet_0 = runtime.ForwardResponseMessage forward_SyncService_UpdateUserKeyWallet_0 = runtime.ForwardResponseMessage + + forward_SyncService_GroupInviteUser_0 = runtime.ForwardResponseMessage + + forward_SyncService_GroupInviteAccept_0 = runtime.ForwardResponseMessage + + forward_SyncService_GroupDeleteUser_0 = runtime.ForwardResponseMessage ) diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index fac9e36..fc7d975 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -47,16 +47,6 @@ type BaseUpdateConfigResponse = { export type UpdateConfigResponse = BaseUpdateConfigResponse & OneOf<{ host: SyncV1Host.Host; knownHost: SyncV1Known_hosts.KnownHost; sshKey: SyncV1Keychain.SshKey; identity: SyncV1Keychain.Identity }> -export type UpdateGroupKeyChainRequest = { - groupId?: string - publicKey?: string - encryptedGroupPrivateKey?: string - userKeyWallet?: UserKeyWallet[] -} - -export type UpdateGroupKeyChainResponse = { -} - export type UpdateGroupRequest = { group?: SyncV1Group.Group } @@ -105,6 +95,31 @@ export type UserKeyWallet = { deletedAt?: GoogleProtobufTimestamp.Timestamp } +export type GroupInviteUserRequest = { + gid?: string + inviteeUid?: string + encryptedGroupPrivateKey?: string +} + +export type GroupInviteUserResponse = { +} + +export type GroupInviteAcceptRequest = { + gid?: string + isAccept?: boolean +} + +export type GroupInviteAcceptResponse = { +} + +export type GroupDeleteUserRequest = { + userDeletedUid?: string + gid?: string +} + +export type GroupDeleteUserResponse = { +} + export class SyncService { static SyncConfig(req: SyncConfigRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/sync_config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) @@ -112,9 +127,6 @@ export class SyncService { static UpdateConfig(req: UpdateConfigRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/update_config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } - static UpdateGroupKeyChain(req: UpdateGroupKeyChainRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/update_group_key_chain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } static UpdateGroup(req: UpdateGroupRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/update_group`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } @@ -127,4 +139,13 @@ export class SyncService { static UpdateUserKeyWallet(req: UpdateUserKeyWalletRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/update_user_key_wallet`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } + static GroupInviteUser(req: GroupInviteUserRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/group_invite_user`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } + static GroupInviteAccept(req: GroupInviteAcceptRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/group_invite_accept`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } + static GroupDeleteUser(req: GroupDeleteUserRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/group_delete_user`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } } \ No newline at end of file diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index d4d080b..0f39f8c 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -21,11 +21,13 @@ const _ = grpc.SupportPackageIsVersion7 const ( SyncService_SyncConfig_FullMethodName = "/sync.v1.SyncService/SyncConfig" SyncService_UpdateConfig_FullMethodName = "/sync.v1.SyncService/UpdateConfig" - SyncService_UpdateGroupKeyChain_FullMethodName = "/sync.v1.SyncService/UpdateGroupKeyChain" SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" SyncService_SyncUserKeyWallet_FullMethodName = "/sync.v1.SyncService/SyncUserKeyWallet" SyncService_UpdateUserKeyWallet_FullMethodName = "/sync.v1.SyncService/UpdateUserKeyWallet" + SyncService_GroupInviteUser_FullMethodName = "/sync.v1.SyncService/GroupInviteUser" + SyncService_GroupInviteAccept_FullMethodName = "/sync.v1.SyncService/GroupInviteAccept" + SyncService_GroupDeleteUser_FullMethodName = "/sync.v1.SyncService/GroupDeleteUser" ) // SyncServiceClient is the client API for SyncService service. @@ -36,8 +38,6 @@ type SyncServiceClient interface { SyncConfig(ctx context.Context, in *SyncConfigRequest, opts ...grpc.CallOption) (*SyncConfigResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*UpdateConfigResponse, error) - // 组的所有者修改组的密钥链 - UpdateGroupKeyChain(ctx context.Context, in *UpdateGroupKeyChainRequest, opts ...grpc.CallOption) (*UpdateGroupKeyChainResponse, error) // 更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。 UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 @@ -46,6 +46,12 @@ type SyncServiceClient interface { SyncUserKeyWallet(ctx context.Context, in *SyncUserKeyWalletRequest, opts ...grpc.CallOption) (*SyncUserKeyWalletResponse, error) // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 UpdateUserKeyWallet(ctx context.Context, in *UpdateUserKeyWalletRequest, opts ...grpc.CallOption) (*UpdateUserKeyWalletResponse, error) + // 邀请用户加入,加密的密钥由邀请者那边去取被邀请者的公钥加密后存储 + GroupInviteUser(ctx context.Context, in *GroupInviteUserRequest, opts ...grpc.CallOption) (*GroupInviteUserResponse, error) + // 邀请用户加入 + GroupInviteAccept(ctx context.Context, in *GroupInviteAcceptRequest, opts ...grpc.CallOption) (*GroupInviteAcceptResponse, error) + // 删除用户 + GroupDeleteUser(ctx context.Context, in *GroupDeleteUserRequest, opts ...grpc.CallOption) (*GroupDeleteUserResponse, error) } type syncServiceClient struct { @@ -74,15 +80,6 @@ func (c *syncServiceClient) UpdateConfig(ctx context.Context, in *UpdateConfigRe return out, nil } -func (c *syncServiceClient) UpdateGroupKeyChain(ctx context.Context, in *UpdateGroupKeyChainRequest, opts ...grpc.CallOption) (*UpdateGroupKeyChainResponse, error) { - out := new(UpdateGroupKeyChainResponse) - err := c.cc.Invoke(ctx, SyncService_UpdateGroupKeyChain_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *syncServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) { out := new(UpdateGroupResponse) err := c.cc.Invoke(ctx, SyncService_UpdateGroup_FullMethodName, in, out, opts...) @@ -119,6 +116,33 @@ func (c *syncServiceClient) UpdateUserKeyWallet(ctx context.Context, in *UpdateU return out, nil } +func (c *syncServiceClient) GroupInviteUser(ctx context.Context, in *GroupInviteUserRequest, opts ...grpc.CallOption) (*GroupInviteUserResponse, error) { + out := new(GroupInviteUserResponse) + err := c.cc.Invoke(ctx, SyncService_GroupInviteUser_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncServiceClient) GroupInviteAccept(ctx context.Context, in *GroupInviteAcceptRequest, opts ...grpc.CallOption) (*GroupInviteAcceptResponse, error) { + out := new(GroupInviteAcceptResponse) + err := c.cc.Invoke(ctx, SyncService_GroupInviteAccept_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncServiceClient) GroupDeleteUser(ctx context.Context, in *GroupDeleteUserRequest, opts ...grpc.CallOption) (*GroupDeleteUserResponse, error) { + out := new(GroupDeleteUserResponse) + err := c.cc.Invoke(ctx, SyncService_GroupDeleteUser_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SyncServiceServer is the server API for SyncService service. // All implementations must embed UnimplementedSyncServiceServer // for forward compatibility @@ -127,8 +151,6 @@ type SyncServiceServer interface { SyncConfig(context.Context, *SyncConfigRequest) (*SyncConfigResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) - // 组的所有者修改组的密钥链 - UpdateGroupKeyChain(context.Context, *UpdateGroupKeyChainRequest) (*UpdateGroupKeyChainResponse, error) // 更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。 UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) // 通过UID获取所有组信息 @@ -137,6 +159,12 @@ type SyncServiceServer interface { SyncUserKeyWallet(context.Context, *SyncUserKeyWalletRequest) (*SyncUserKeyWalletResponse, error) // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 UpdateUserKeyWallet(context.Context, *UpdateUserKeyWalletRequest) (*UpdateUserKeyWalletResponse, error) + // 邀请用户加入,加密的密钥由邀请者那边去取被邀请者的公钥加密后存储 + GroupInviteUser(context.Context, *GroupInviteUserRequest) (*GroupInviteUserResponse, error) + // 邀请用户加入 + GroupInviteAccept(context.Context, *GroupInviteAcceptRequest) (*GroupInviteAcceptResponse, error) + // 删除用户 + GroupDeleteUser(context.Context, *GroupDeleteUserRequest) (*GroupDeleteUserResponse, error) mustEmbedUnimplementedSyncServiceServer() } @@ -150,9 +178,6 @@ func (UnimplementedSyncServiceServer) SyncConfig(context.Context, *SyncConfigReq func (UnimplementedSyncServiceServer) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateConfig not implemented") } -func (UnimplementedSyncServiceServer) UpdateGroupKeyChain(context.Context, *UpdateGroupKeyChainRequest) (*UpdateGroupKeyChainResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupKeyChain not implemented") -} func (UnimplementedSyncServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") } @@ -165,6 +190,15 @@ func (UnimplementedSyncServiceServer) SyncUserKeyWallet(context.Context, *SyncUs func (UnimplementedSyncServiceServer) UpdateUserKeyWallet(context.Context, *UpdateUserKeyWalletRequest) (*UpdateUserKeyWalletResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUserKeyWallet not implemented") } +func (UnimplementedSyncServiceServer) GroupInviteUser(context.Context, *GroupInviteUserRequest) (*GroupInviteUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupInviteUser not implemented") +} +func (UnimplementedSyncServiceServer) GroupInviteAccept(context.Context, *GroupInviteAcceptRequest) (*GroupInviteAcceptResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupInviteAccept not implemented") +} +func (UnimplementedSyncServiceServer) GroupDeleteUser(context.Context, *GroupDeleteUserRequest) (*GroupDeleteUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GroupDeleteUser not implemented") +} func (UnimplementedSyncServiceServer) mustEmbedUnimplementedSyncServiceServer() {} // UnsafeSyncServiceServer may be embedded to opt out of forward compatibility for this service. @@ -214,24 +248,6 @@ func _SyncService_UpdateConfig_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _SyncService_UpdateGroupKeyChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateGroupKeyChainRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncServiceServer).UpdateGroupKeyChain(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SyncService_UpdateGroupKeyChain_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).UpdateGroupKeyChain(ctx, req.(*UpdateGroupKeyChainRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _SyncService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateGroupRequest) if err := dec(in); err != nil { @@ -304,6 +320,60 @@ func _SyncService_UpdateUserKeyWallet_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _SyncService_GroupInviteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GroupInviteUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncServiceServer).GroupInviteUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_GroupInviteUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).GroupInviteUser(ctx, req.(*GroupInviteUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncService_GroupInviteAccept_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GroupInviteAcceptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncServiceServer).GroupInviteAccept(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_GroupInviteAccept_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).GroupInviteAccept(ctx, req.(*GroupInviteAcceptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncService_GroupDeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GroupDeleteUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncServiceServer).GroupDeleteUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_GroupDeleteUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).GroupDeleteUser(ctx, req.(*GroupDeleteUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SyncService_ServiceDesc is the grpc.ServiceDesc for SyncService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -319,10 +389,6 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateConfig", Handler: _SyncService_UpdateConfig_Handler, }, - { - MethodName: "UpdateGroupKeyChain", - Handler: _SyncService_UpdateGroupKeyChain_Handler, - }, { MethodName: "UpdateGroup", Handler: _SyncService_UpdateGroup_Handler, @@ -339,6 +405,18 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateUserKeyWallet", Handler: _SyncService_UpdateUserKeyWallet_Handler, }, + { + MethodName: "GroupInviteUser", + Handler: _SyncService_GroupInviteUser_Handler, + }, + { + MethodName: "GroupInviteAccept", + Handler: _SyncService_GroupInviteAccept_Handler, + }, + { + MethodName: "GroupDeleteUser", + Handler: _SyncService_GroupDeleteUser_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "sync/v1/sync_service.proto", diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 7e675e2..560c391 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -22,13 +22,6 @@ service SyncService { body: "*" }; } - // 组的所有者修改组的密钥链 - rpc UpdateGroupKeyChain(UpdateGroupKeyChainRequest) returns (UpdateGroupKeyChainResponse) { - option (google.api.http) = { - post:"/gapi/sync/v1/update_group_key_chain" - body: "*" - }; - } // 更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。 rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse) { option (google.api.http) = { @@ -51,6 +44,27 @@ service SyncService { body: "*" }; } + // 邀请用户加入,加密的密钥由邀请者那边去取被邀请者的公钥加密后存储 + rpc GroupInviteUser(GroupInviteUserRequest) returns (GroupInviteUserResponse){ + option (google.api.http) = { + post:"/gapi/sync/v1/group_invite_user" + body: "*" + }; + } + // 邀请用户加入 + rpc GroupInviteAccept(GroupInviteAcceptRequest) returns (GroupInviteAcceptResponse){ + option (google.api.http) = { + post:"/gapi/sync/v1/group_invite_accept" + body: "*" + }; + } + // 删除用户 + rpc GroupDeleteUser(GroupDeleteUserRequest) returns (GroupDeleteUserResponse){ + option (google.api.http) = { + post:"/gapi/sync/v1/group_delete_user" + body: "*" + }; + } } // SyncConfig message SyncConfigRequest { @@ -86,16 +100,6 @@ message UpdateConfigResponse { } } -// UpdateGroupKeyChain -message UpdateGroupKeyChainRequest{ - string groupId = 1; - string publicKey = 2; - string encryptedGroupPrivateKey = 3; - repeated UserKeyWallet userKeyWallet = 4; -} - -message UpdateGroupKeyChainResponse{} - // UpdateGroup message UpdateGroupRequest { Group group = 1; @@ -145,4 +149,29 @@ message UserKeyWallet { google.protobuf.Timestamp createdAt = 4; google.protobuf.Timestamp updatedAt = 5; google.protobuf.Timestamp deletedAt = 6; -} \ No newline at end of file +} + +// GroupInviteUser +message GroupInviteUserRequest { + string gid = 1; + string inviteeUid = 2; + string encryptedGroupPrivateKey = 4; +} + +message GroupInviteUserResponse{} + +// GroupInviteAccept +message GroupInviteAcceptRequest { + string gid = 1; + bool isAccept = 2; +} + +message GroupInviteAcceptResponse {} + +// GroupDeleteUser +message GroupDeleteUserRequest { + string userDeletedUid = 1; + string gid = 2; +} + +message GroupDeleteUserResponse {} \ No newline at end of file From 355bd3fd7b61b105500ec18bd47806869085ae82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=88=90=E9=94=B4?= Date: Wed, 22 Nov 2023 10:24:30 +0800 Subject: [PATCH 40/46] update: add team manage proto --- gen/openapi/sync/v1/key_wallet.swagger.json | 44 + gen/openapi/sync/v1/sync_service.swagger.json | 346 +---- .../v1/team.swagger.json} | 2 +- gen/openapi/team/v1/team_service.swagger.json | 362 ++++++ gen/openapi/user/v1/user_service.swagger.json | 40 + gen/proto/sync/v1/group.pb.go | 385 ------ gen/proto/sync/v1/key_wallet.pb.go | 208 +++ gen/proto/sync/v1/key_wallet.pb.ts | 15 + gen/proto/sync/v1/sync_service.pb.go | 1130 ++++------------- gen/proto/sync/v1/sync_service.pb.gw.go | 370 +----- gen/proto/sync/v1/sync_service.pb.ts | 74 +- gen/proto/sync/v1/sync_service_grpc.pb.go | 160 +-- gen/proto/team/v1/team.pb.go | 234 ++++ .../v1/group.pb.ts => team/v1/team.pb.ts} | 12 +- gen/proto/team/v1/team_service.pb.go | 904 +++++++++++++ gen/proto/team/v1/team_service.pb.gw.go | 598 +++++++++ gen/proto/team/v1/team_service.pb.ts | 76 ++ gen/proto/team/v1/team_service_grpc.pb.go | 306 +++++ gen/proto/user/v1/user_service.pb.go | 202 ++- gen/proto/user/v1/user_service.pb.gw.go | 87 ++ gen/proto/user/v1/user_service.pb.ts | 11 + gen/proto/user/v1/user_service_grpc.pb.go | 39 + proto/sync/v1/group.proto | 28 - proto/sync/v1/key_wallet.proto | 15 + proto/sync/v1/sync_service.proto | 86 +- proto/team/v1/team.proto | 18 + proto/team/v1/team_service.proto | 97 ++ proto/user/v1/user_service.proto | 16 +- 28 files changed, 3569 insertions(+), 2296 deletions(-) create mode 100644 gen/openapi/sync/v1/key_wallet.swagger.json rename gen/openapi/{sync/v1/group.swagger.json => team/v1/team.swagger.json} (95%) create mode 100644 gen/openapi/team/v1/team_service.swagger.json delete mode 100644 gen/proto/sync/v1/group.pb.go create mode 100644 gen/proto/sync/v1/key_wallet.pb.go create mode 100644 gen/proto/sync/v1/key_wallet.pb.ts create mode 100644 gen/proto/team/v1/team.pb.go rename gen/proto/{sync/v1/group.pb.ts => team/v1/team.pb.ts} (70%) create mode 100644 gen/proto/team/v1/team_service.pb.go create mode 100644 gen/proto/team/v1/team_service.pb.gw.go create mode 100644 gen/proto/team/v1/team_service.pb.ts create mode 100644 gen/proto/team/v1/team_service_grpc.pb.go delete mode 100644 proto/sync/v1/group.proto create mode 100644 proto/sync/v1/key_wallet.proto create mode 100644 proto/team/v1/team.proto create mode 100644 proto/team/v1/team_service.proto diff --git a/gen/openapi/sync/v1/key_wallet.swagger.json b/gen/openapi/sync/v1/key_wallet.swagger.json new file mode 100644 index 0000000..230de76 --- /dev/null +++ b/gen/openapi/sync/v1/key_wallet.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "sync/v1/key_wallet.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index 9d1ddcb..c8f5547 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -16,15 +16,15 @@ "application/json" ], "paths": { - "/gapi/sync/v1/group_delete_user": { - "post": { - "summary": "删除用户", - "operationId": "SyncService_GroupDeleteUser", + "/gapi/sync/v1/config": { + "get": { + "summary": "拉取指定时间点之后的配置变动信息", + "operationId": "SyncService_SyncConfig", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GroupDeleteUserResponse" + "$ref": "#/definitions/v1SyncConfigResponse" } }, "default": { @@ -36,61 +36,32 @@ }, "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1GroupDeleteUserRequest" - } - } - ], - "tags": [ - "SyncService" - ] - } - }, - "/gapi/sync/v1/group_invite_accept": { - "post": { - "summary": "邀请用户加入", - "operationId": "SyncService_GroupInviteAccept", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1GroupInviteAcceptResponse" - } + "name": "after", + "description": "获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1GroupInviteAcceptRequest" - } + "name": "groupId", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ "SyncService" ] - } - }, - "/gapi/sync/v1/group_invite_user": { + }, "post": { - "summary": "邀请用户加入,加密的密钥由邀请者那边去取被邀请者的公钥加密后存储", - "operationId": "SyncService_GroupInviteUser", + "summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。", + "operationId": "SyncService_UpdateConfig", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GroupInviteUserResponse" + "$ref": "#/definitions/v1UpdateConfigResponse" } }, "default": { @@ -106,57 +77,18 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1GroupInviteUserRequest" - } - } - ], - "tags": [ - "SyncService" - ] - } - }, - "/gapi/sync/v1/sync_config": { - "get": { - "summary": "拉取指定时间点之后的配置变动信息", - "operationId": "SyncService_SyncConfig", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1SyncConfigResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" + "$ref": "#/definitions/v1UpdateConfigRequest" } } - }, - "parameters": [ - { - "name": "after", - "description": "获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "groupId", - "in": "query", - "required": false, - "type": "string" - } ], "tags": [ "SyncService" ] } }, - "/gapi/sync/v1/sync_group": { + "/gapi/sync/v1/group": { "get": { - "summary": "通过UID获取所有组信息", + "summary": "通过UID获取所有所在组变动信息", "operationId": "SyncService_SyncGroup", "responses": { "200": { @@ -186,7 +118,7 @@ ] } }, - "/gapi/sync/v1/sync_user_key_wallet": { + "/gapi/sync/v1/key_wallet": { "get": { "summary": "获取用户密钥对", "operationId": "SyncService_SyncUserKeyWallet", @@ -217,75 +149,7 @@ "tags": [ "SyncService" ] - } - }, - "/gapi/sync/v1/update_config": { - "post": { - "summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。", - "operationId": "SyncService_UpdateConfig", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1UpdateConfigResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1UpdateConfigRequest" - } - } - ], - "tags": [ - "SyncService" - ] - } - }, - "/gapi/sync/v1/update_group": { - "post": { - "summary": "更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。", - "operationId": "SyncService_UpdateGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1UpdateGroupResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1UpdateGroupRequest" - } - } - ], - "tags": [ - "SyncService" - ] - } - }, - "/gapi/sync/v1/update_user_key_wallet": { + }, "post": { "summary": "修改用户密钥对,修改的时候所有相关组的加密密钥均要替换", "operationId": "SyncService_UpdateUserKeyWallet", @@ -348,117 +212,6 @@ } } }, - "v1Group": { - "type": "object", - "properties": { - "groupBasic": { - "$ref": "#/definitions/v1GroupBasic" - }, - "groupKeychain": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/v1GroupKeyChain" - } - } - } - }, - "v1GroupBasic": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "deletedAt": { - "type": "string", - "format": "date-time" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "avatar": { - "type": "string" - }, - "uid": { - "type": "string", - "title": "创建者" - }, - "publicKey": { - "type": "string", - "title": "公钥,公钥存在服务器上,加密的私钥与相关用户关联存储" - } - } - }, - "v1GroupDeleteUserRequest": { - "type": "object", - "properties": { - "userDeletedUid": { - "type": "string" - }, - "gid": { - "type": "string" - } - }, - "title": "GroupDeleteUser" - }, - "v1GroupDeleteUserResponse": { - "type": "object" - }, - "v1GroupInviteAcceptRequest": { - "type": "object", - "properties": { - "gid": { - "type": "string" - }, - "isAccept": { - "type": "boolean" - } - }, - "title": "GroupInviteAccept" - }, - "v1GroupInviteAcceptResponse": { - "type": "object" - }, - "v1GroupInviteUserRequest": { - "type": "object", - "properties": { - "gid": { - "type": "string" - }, - "inviteeUid": { - "type": "string" - }, - "encryptedGroupPrivateKey": { - "type": "string" - } - }, - "title": "GroupInviteUser" - }, - "v1GroupInviteUserResponse": { - "type": "object" - }, - "v1GroupKeyChain": { - "type": "object", - "properties": { - "memberId": { - "type": "string" - }, - "privateKey": { - "type": "string" - } - } - }, "v1Host": { "type": "object", "properties": { @@ -682,7 +435,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1Group" + "$ref": "#/definitions/v1Team" } } } @@ -710,6 +463,43 @@ } } }, + "v1Team": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "deletedAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "uid": { + "type": "string", + "title": "创建者" + }, + "publicKey": { + "type": "string", + "title": "公钥,公钥存在服务器上,加密的私钥与相关用户关联存储" + } + } + }, "v1UpdateConfigRequest": { "type": "object", "properties": { @@ -748,18 +538,6 @@ } } }, - "v1UpdateGroupRequest": { - "type": "object", - "properties": { - "group": { - "$ref": "#/definitions/v1Group" - } - }, - "title": "UpdateGroup" - }, - "v1UpdateGroupResponse": { - "type": "object" - }, "v1UpdateUserKeyWalletRequest": { "type": "object", "properties": { diff --git a/gen/openapi/sync/v1/group.swagger.json b/gen/openapi/team/v1/team.swagger.json similarity index 95% rename from gen/openapi/sync/v1/group.swagger.json rename to gen/openapi/team/v1/team.swagger.json index cc73b77..aa719be 100644 --- a/gen/openapi/sync/v1/group.swagger.json +++ b/gen/openapi/team/v1/team.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "sync/v1/group.proto", + "title": "team/v1/team.proto", "version": "version not set" }, "consumes": [ diff --git a/gen/openapi/team/v1/team_service.swagger.json b/gen/openapi/team/v1/team_service.swagger.json new file mode 100644 index 0000000..bf87f4f --- /dev/null +++ b/gen/openapi/team/v1/team_service.swagger.json @@ -0,0 +1,362 @@ +{ + "swagger": "2.0", + "info": { + "title": "team/v1/team_service.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "TeamService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/gapi/team/v1/team": { + "get": { + "summary": "获取团队信息", + "operationId": "TeamService_GetTeam", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetTeamResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "TeamService" + ] + }, + "post": { + "summary": "创建团队", + "operationId": "TeamService_CreateTeam", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateTeamResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CreateTeamRequest" + } + } + ], + "tags": [ + "TeamService" + ] + }, + "put": { + "summary": "更新团队信息", + "operationId": "TeamService_UpdateTeam", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateTeamResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateTeamRequest" + } + } + ], + "tags": [ + "TeamService" + ] + } + }, + "/gapi/team/v1/team/member/invite": { + "post": { + "summary": "邀请成员加入团队", + "operationId": "TeamService_InviteMember", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1InviteMemberResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1InviteMemberRequest" + } + } + ], + "tags": [ + "TeamService" + ] + } + }, + "/gapi/team/v1/team/member/remove": { + "post": { + "summary": "从团队中移除成员", + "operationId": "TeamService_RemoveMember", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveMemberResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RemoveMemberRequest" + } + } + ], + "tags": [ + "TeamService" + ] + } + }, + "/gapi/team/v1/team/remove": { + "post": { + "summary": "删除团队", + "operationId": "TeamService_DeleteTeam", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DeleteTeamResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1DeleteTeamRequest" + } + } + ], + "tags": [ + "TeamService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1CreateTeamRequest": { + "type": "object", + "properties": { + "team": { + "$ref": "#/definitions/v1Team" + } + } + }, + "v1CreateTeamResponse": { + "type": "object", + "properties": { + "team": { + "$ref": "#/definitions/v1Team" + } + } + }, + "v1DeleteTeamRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "v1DeleteTeamResponse": { + "type": "object" + }, + "v1GetTeamResponse": { + "type": "object", + "properties": { + "team": { + "$ref": "#/definitions/v1Team" + } + } + }, + "v1InviteMemberRequest": { + "type": "object", + "properties": { + "teamId": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "encryptedGroupPrivateKey": { + "type": "string", + "title": "使用受邀请用户的公钥加密后的团队私钥" + } + } + }, + "v1InviteMemberResponse": { + "type": "object" + }, + "v1RemoveMemberRequest": { + "type": "object", + "properties": { + "teamId": { + "type": "string" + }, + "userId": { + "type": "string" + } + } + }, + "v1RemoveMemberResponse": { + "type": "object" + }, + "v1Team": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "deletedAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "uid": { + "type": "string", + "title": "创建者" + }, + "publicKey": { + "type": "string", + "title": "公钥,公钥存在服务器上,加密的私钥与相关用户关联存储" + } + } + }, + "v1UpdateTeamRequest": { + "type": "object", + "properties": { + "team": { + "$ref": "#/definitions/v1Team" + } + } + }, + "v1UpdateTeamResponse": { + "type": "object", + "properties": { + "team": { + "$ref": "#/definitions/v1Team" + } + } + } + } +} diff --git a/gen/openapi/user/v1/user_service.swagger.json b/gen/openapi/user/v1/user_service.swagger.json index 7ef032a..92490a9 100644 --- a/gen/openapi/user/v1/user_service.swagger.json +++ b/gen/openapi/user/v1/user_service.swagger.json @@ -38,6 +38,38 @@ ] } }, + "/gapi/user/v1/public_key": { + "get": { + "summary": "获取用户公钥 用于给用户发送端对端信息用(包括但不限于邀请用户加入组织时加密组织私钥)", + "operationId": "UserService_GetUserPublicKey", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetUserPublicKeyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "user id 留空则为默认id", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "UserService" + ] + } + }, "/gapi/user/v1/verify/email/check": { "post": { "operationId": "UserService_CheckEmailVerifyCode", @@ -154,6 +186,14 @@ } } }, + "v1GetUserPublicKeyResponse": { + "type": "object", + "properties": { + "publicKey": { + "type": "string" + } + } + }, "v1SendEmailVerifyCodeRequest": { "type": "object", "properties": { diff --git a/gen/proto/sync/v1/group.pb.go b/gen/proto/sync/v1/group.pb.go deleted file mode 100644 index 8eed32f..0000000 --- a/gen/proto/sync/v1/group.pb.go +++ /dev/null @@ -1,385 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: sync/v1/group.proto - -package syncV1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Group struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupBasic *GroupBasic `protobuf:"bytes,1,opt,name=groupBasic,proto3" json:"groupBasic,omitempty"` - GroupKeychain []*GroupKeyChain `protobuf:"bytes,2,rep,name=groupKeychain,proto3" json:"groupKeychain,omitempty"` -} - -func (x *Group) Reset() { - *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Group) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Group) ProtoMessage() {} - -func (x *Group) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_group_proto_msgTypes[0] - 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 Group.ProtoReflect.Descriptor instead. -func (*Group) Descriptor() ([]byte, []int) { - return file_sync_v1_group_proto_rawDescGZIP(), []int{0} -} - -func (x *Group) GetGroupBasic() *GroupBasic { - if x != nil { - return x.GroupBasic - } - return nil -} - -func (x *Group) GetGroupKeychain() []*GroupKeyChain { - if x != nil { - return x.GroupKeychain - } - return nil -} - -type GroupBasic struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` - Uid string `protobuf:"bytes,8,opt,name=uid,proto3" json:"uid,omitempty"` // 创建者 - PublicKey string `protobuf:"bytes,9,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 -} - -func (x *GroupBasic) Reset() { - *x = GroupBasic{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupBasic) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupBasic) ProtoMessage() {} - -func (x *GroupBasic) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_group_proto_msgTypes[1] - 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 GroupBasic.ProtoReflect.Descriptor instead. -func (*GroupBasic) Descriptor() ([]byte, []int) { - return file_sync_v1_group_proto_rawDescGZIP(), []int{1} -} - -func (x *GroupBasic) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *GroupBasic) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *GroupBasic) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *GroupBasic) GetDeletedAt() *timestamppb.Timestamp { - if x != nil { - return x.DeletedAt - } - return nil -} - -func (x *GroupBasic) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *GroupBasic) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *GroupBasic) GetAvatar() string { - if x != nil { - return x.Avatar - } - return "" -} - -func (x *GroupBasic) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *GroupBasic) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -type GroupKeyChain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MemberId string `protobuf:"bytes,11,opt,name=memberId,proto3" json:"memberId,omitempty"` - PrivateKey string `protobuf:"bytes,12,opt,name=privateKey,proto3" json:"privateKey,omitempty"` -} - -func (x *GroupKeyChain) Reset() { - *x = GroupKeyChain{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_group_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupKeyChain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupKeyChain) ProtoMessage() {} - -func (x *GroupKeyChain) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_group_proto_msgTypes[2] - 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 GroupKeyChain.ProtoReflect.Descriptor instead. -func (*GroupKeyChain) Descriptor() ([]byte, []int) { - return file_sync_v1_group_proto_rawDescGZIP(), []int{2} -} - -func (x *GroupKeyChain) GetMemberId() string { - if x != nil { - return x.MemberId - } - return "" -} - -func (x *GroupKeyChain) GetPrivateKey() string { - if x != nil { - return x.PrivateKey - } - return "" -} - -var File_sync_v1_group_proto protoreflect.FileDescriptor - -var file_sync_v1_group_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x7a, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x33, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, - 0x63, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x3c, 0x0a, - 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0d, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x4b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0xc8, 0x02, 0x0a, 0x0a, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, - 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x0d, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4b, - 0x65, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, - 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sync_v1_group_proto_rawDescOnce sync.Once - file_sync_v1_group_proto_rawDescData = file_sync_v1_group_proto_rawDesc -) - -func file_sync_v1_group_proto_rawDescGZIP() []byte { - file_sync_v1_group_proto_rawDescOnce.Do(func() { - file_sync_v1_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_sync_v1_group_proto_rawDescData) - }) - return file_sync_v1_group_proto_rawDescData -} - -var file_sync_v1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_sync_v1_group_proto_goTypes = []interface{}{ - (*Group)(nil), // 0: sync.v1.Group - (*GroupBasic)(nil), // 1: sync.v1.GroupBasic - (*GroupKeyChain)(nil), // 2: sync.v1.GroupKeyChain - (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp -} -var file_sync_v1_group_proto_depIdxs = []int32{ - 1, // 0: sync.v1.Group.groupBasic:type_name -> sync.v1.GroupBasic - 2, // 1: sync.v1.Group.groupKeychain:type_name -> sync.v1.GroupKeyChain - 3, // 2: sync.v1.GroupBasic.createdAt:type_name -> google.protobuf.Timestamp - 3, // 3: sync.v1.GroupBasic.updatedAt:type_name -> google.protobuf.Timestamp - 3, // 4: sync.v1.GroupBasic.deletedAt:type_name -> google.protobuf.Timestamp - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_sync_v1_group_proto_init() } -func file_sync_v1_group_proto_init() { - if File_sync_v1_group_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sync_v1_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupBasic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupKeyChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sync_v1_group_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_sync_v1_group_proto_goTypes, - DependencyIndexes: file_sync_v1_group_proto_depIdxs, - MessageInfos: file_sync_v1_group_proto_msgTypes, - }.Build() - File_sync_v1_group_proto = out.File - file_sync_v1_group_proto_rawDesc = nil - file_sync_v1_group_proto_goTypes = nil - file_sync_v1_group_proto_depIdxs = nil -} diff --git a/gen/proto/sync/v1/key_wallet.pb.go b/gen/proto/sync/v1/key_wallet.pb.go new file mode 100644 index 0000000..ce8fe47 --- /dev/null +++ b/gen/proto/sync/v1/key_wallet.pb.go @@ -0,0 +1,208 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: sync/v1/key_wallet.proto + +package syncV1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type UserKeyWallet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` +} + +func (x *UserKeyWallet) Reset() { + *x = UserKeyWallet{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_key_wallet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserKeyWallet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserKeyWallet) ProtoMessage() {} + +func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { + mi := &file_sync_v1_key_wallet_proto_msgTypes[0] + 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 UserKeyWallet.ProtoReflect.Descriptor instead. +func (*UserKeyWallet) Descriptor() ([]byte, []int) { + return file_sync_v1_key_wallet_proto_rawDescGZIP(), []int{0} +} + +func (x *UserKeyWallet) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *UserKeyWallet) GetGid() string { + if x != nil { + return x.Gid + } + return "" +} + +func (x *UserKeyWallet) GetEncryptedGroupPrivateKey() string { + if x != nil { + return x.EncryptedGroupPrivateKey + } + return "" +} + +func (x *UserKeyWallet) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *UserKeyWallet) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *UserKeyWallet) GetDeletedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeletedAt + } + return nil +} + +var File_sync_v1_key_wallet_proto protoreflect.FileDescriptor + +var file_sync_v1_key_wallet_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, + 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sync_v1_key_wallet_proto_rawDescOnce sync.Once + file_sync_v1_key_wallet_proto_rawDescData = file_sync_v1_key_wallet_proto_rawDesc +) + +func file_sync_v1_key_wallet_proto_rawDescGZIP() []byte { + file_sync_v1_key_wallet_proto_rawDescOnce.Do(func() { + file_sync_v1_key_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(file_sync_v1_key_wallet_proto_rawDescData) + }) + return file_sync_v1_key_wallet_proto_rawDescData +} + +var file_sync_v1_key_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_sync_v1_key_wallet_proto_goTypes = []interface{}{ + (*UserKeyWallet)(nil), // 0: sync.v1.UserKeyWallet + (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp +} +var file_sync_v1_key_wallet_proto_depIdxs = []int32{ + 1, // 0: sync.v1.UserKeyWallet.createdAt:type_name -> google.protobuf.Timestamp + 1, // 1: sync.v1.UserKeyWallet.updatedAt:type_name -> google.protobuf.Timestamp + 1, // 2: sync.v1.UserKeyWallet.deletedAt:type_name -> google.protobuf.Timestamp + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_sync_v1_key_wallet_proto_init() } +func file_sync_v1_key_wallet_proto_init() { + if File_sync_v1_key_wallet_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sync_v1_key_wallet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserKeyWallet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sync_v1_key_wallet_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_sync_v1_key_wallet_proto_goTypes, + DependencyIndexes: file_sync_v1_key_wallet_proto_depIdxs, + MessageInfos: file_sync_v1_key_wallet_proto_msgTypes, + }.Build() + File_sync_v1_key_wallet_proto = out.File + file_sync_v1_key_wallet_proto_rawDesc = nil + file_sync_v1_key_wallet_proto_goTypes = nil + file_sync_v1_key_wallet_proto_depIdxs = nil +} diff --git a/gen/proto/sync/v1/key_wallet.pb.ts b/gen/proto/sync/v1/key_wallet.pb.ts new file mode 100644 index 0000000..c68113c --- /dev/null +++ b/gen/proto/sync/v1/key_wallet.pb.ts @@ -0,0 +1,15 @@ +/* eslint-disable */ +// @ts-nocheck +/* +* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY +*/ + +import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" +export type UserKeyWallet = { + uid?: string + gid?: string + encryptedGroupPrivateKey?: string + createdAt?: GoogleProtobufTimestamp.Timestamp + updatedAt?: GoogleProtobufTimestamp.Timestamp + deletedAt?: GoogleProtobufTimestamp.Timestamp +} \ No newline at end of file diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 59971ca..3193682 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -7,6 +7,7 @@ package syncV1 import ( + v1 "github.com/juanjiTech/jTerm-proto/gen/proto/team/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -384,92 +385,6 @@ func (*UpdateConfigResponse_SshKey) isUpdateConfigResponse_Data() {} func (*UpdateConfigResponse_Identity) isUpdateConfigResponse_Data() {} -// UpdateGroup -type UpdateGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *UpdateGroupRequest) Reset() { - *x = UpdateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateGroupRequest) ProtoMessage() {} - -func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[4] - 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 UpdateGroupRequest.ProtoReflect.Descriptor instead. -func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{4} -} - -func (x *UpdateGroupRequest) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -type UpdateGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateGroupResponse) Reset() { - *x = UpdateGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateGroupResponse) ProtoMessage() {} - -func (x *UpdateGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[5] - 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 UpdateGroupResponse.ProtoReflect.Descriptor instead. -func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{5} -} - // SyncGroup type SyncGroupRequest struct { state protoimpl.MessageState @@ -482,7 +397,7 @@ type SyncGroupRequest struct { func (x *SyncGroupRequest) Reset() { *x = SyncGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[6] + mi := &file_sync_v1_sync_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -495,7 +410,7 @@ func (x *SyncGroupRequest) String() string { func (*SyncGroupRequest) ProtoMessage() {} func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[6] + mi := &file_sync_v1_sync_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -508,7 +423,7 @@ func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncGroupRequest.ProtoReflect.Descriptor instead. func (*SyncGroupRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{6} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{4} } func (x *SyncGroupRequest) GetAfter() *timestamppb.Timestamp { @@ -524,13 +439,13 @@ type SyncGroupResponse struct { unknownFields protoimpl.UnknownFields ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=serverTime,proto3" json:"serverTime,omitempty"` - Groups []*Group `protobuf:"bytes,11,rep,name=groups,proto3" json:"groups,omitempty"` + Groups []*v1.Team `protobuf:"bytes,11,rep,name=groups,proto3" json:"groups,omitempty"` } func (x *SyncGroupResponse) Reset() { *x = SyncGroupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[7] + mi := &file_sync_v1_sync_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -543,7 +458,7 @@ func (x *SyncGroupResponse) String() string { func (*SyncGroupResponse) ProtoMessage() {} func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[7] + mi := &file_sync_v1_sync_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -556,7 +471,7 @@ func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncGroupResponse.ProtoReflect.Descriptor instead. func (*SyncGroupResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{7} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{5} } func (x *SyncGroupResponse) GetServerTime() *timestamppb.Timestamp { @@ -566,7 +481,7 @@ func (x *SyncGroupResponse) GetServerTime() *timestamppb.Timestamp { return nil } -func (x *SyncGroupResponse) GetGroups() []*Group { +func (x *SyncGroupResponse) GetGroups() []*v1.Team { if x != nil { return x.Groups } @@ -585,7 +500,7 @@ type SyncUserKeyWalletRequest struct { func (x *SyncUserKeyWalletRequest) Reset() { *x = SyncUserKeyWalletRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[8] + mi := &file_sync_v1_sync_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -598,7 +513,7 @@ func (x *SyncUserKeyWalletRequest) String() string { func (*SyncUserKeyWalletRequest) ProtoMessage() {} func (x *SyncUserKeyWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[8] + mi := &file_sync_v1_sync_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -611,7 +526,7 @@ func (x *SyncUserKeyWalletRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncUserKeyWalletRequest.ProtoReflect.Descriptor instead. func (*SyncUserKeyWalletRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{6} } func (x *SyncUserKeyWalletRequest) GetAfter() *timestamppb.Timestamp { @@ -635,7 +550,7 @@ type SyncUserKeyWalletResponse struct { func (x *SyncUserKeyWalletResponse) Reset() { *x = SyncUserKeyWalletResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[9] + mi := &file_sync_v1_sync_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -648,7 +563,7 @@ func (x *SyncUserKeyWalletResponse) String() string { func (*SyncUserKeyWalletResponse) ProtoMessage() {} func (x *SyncUserKeyWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[9] + mi := &file_sync_v1_sync_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -661,7 +576,7 @@ func (x *SyncUserKeyWalletResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncUserKeyWalletResponse.ProtoReflect.Descriptor instead. func (*SyncUserKeyWalletResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{7} } func (x *SyncUserKeyWalletResponse) GetServerTime() *timestamppb.Timestamp { @@ -706,7 +621,7 @@ type UpdateUserKeyWalletRequest struct { func (x *UpdateUserKeyWalletRequest) Reset() { *x = UpdateUserKeyWalletRequest{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[10] + mi := &file_sync_v1_sync_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -719,7 +634,7 @@ func (x *UpdateUserKeyWalletRequest) String() string { func (*UpdateUserKeyWalletRequest) ProtoMessage() {} func (x *UpdateUserKeyWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[10] + mi := &file_sync_v1_sync_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -732,7 +647,7 @@ func (x *UpdateUserKeyWalletRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserKeyWalletRequest.ProtoReflect.Descriptor instead. func (*UpdateUserKeyWalletRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{10} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} } func (x *UpdateUserKeyWalletRequest) GetPublicKey() string { @@ -769,7 +684,7 @@ type UpdateUserKeyWalletResponse struct { func (x *UpdateUserKeyWalletResponse) Reset() { *x = UpdateUserKeyWalletResponse{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] + mi := &file_sync_v1_sync_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -782,7 +697,7 @@ func (x *UpdateUserKeyWalletResponse) String() string { func (*UpdateUserKeyWalletResponse) ProtoMessage() {} func (x *UpdateUserKeyWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[11] + mi := &file_sync_v1_sync_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -795,7 +710,7 @@ func (x *UpdateUserKeyWalletResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserKeyWalletResponse.ProtoReflect.Descriptor instead. func (*UpdateUserKeyWalletResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{11} + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} } func (x *UpdateUserKeyWalletResponse) GetPublicKey() string { @@ -819,383 +734,6 @@ func (x *UpdateUserKeyWalletResponse) GetUserKeyWalletSet() []*UserKeyWallet { return nil } -type UserKeyWallet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` - EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` -} - -func (x *UserKeyWallet) Reset() { - *x = UserKeyWallet{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserKeyWallet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserKeyWallet) ProtoMessage() {} - -func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[12] - 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 UserKeyWallet.ProtoReflect.Descriptor instead. -func (*UserKeyWallet) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{12} -} - -func (x *UserKeyWallet) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *UserKeyWallet) GetGid() string { - if x != nil { - return x.Gid - } - return "" -} - -func (x *UserKeyWallet) GetEncryptedGroupPrivateKey() string { - if x != nil { - return x.EncryptedGroupPrivateKey - } - return "" -} - -func (x *UserKeyWallet) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *UserKeyWallet) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -func (x *UserKeyWallet) GetDeletedAt() *timestamppb.Timestamp { - if x != nil { - return x.DeletedAt - } - return nil -} - -// GroupInviteUser -type GroupInviteUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - InviteeUid string `protobuf:"bytes,2,opt,name=inviteeUid,proto3" json:"inviteeUid,omitempty"` - EncryptedGroupPrivateKey string `protobuf:"bytes,4,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` -} - -func (x *GroupInviteUserRequest) Reset() { - *x = GroupInviteUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInviteUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInviteUserRequest) ProtoMessage() {} - -func (x *GroupInviteUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[13] - 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 GroupInviteUserRequest.ProtoReflect.Descriptor instead. -func (*GroupInviteUserRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{13} -} - -func (x *GroupInviteUserRequest) GetGid() string { - if x != nil { - return x.Gid - } - return "" -} - -func (x *GroupInviteUserRequest) GetInviteeUid() string { - if x != nil { - return x.InviteeUid - } - return "" -} - -func (x *GroupInviteUserRequest) GetEncryptedGroupPrivateKey() string { - if x != nil { - return x.EncryptedGroupPrivateKey - } - return "" -} - -type GroupInviteUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GroupInviteUserResponse) Reset() { - *x = GroupInviteUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInviteUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInviteUserResponse) ProtoMessage() {} - -func (x *GroupInviteUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[14] - 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 GroupInviteUserResponse.ProtoReflect.Descriptor instead. -func (*GroupInviteUserResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{14} -} - -// GroupInviteAccept -type GroupInviteAcceptRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Gid string `protobuf:"bytes,1,opt,name=gid,proto3" json:"gid,omitempty"` - IsAccept bool `protobuf:"varint,2,opt,name=isAccept,proto3" json:"isAccept,omitempty"` -} - -func (x *GroupInviteAcceptRequest) Reset() { - *x = GroupInviteAcceptRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInviteAcceptRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInviteAcceptRequest) ProtoMessage() {} - -func (x *GroupInviteAcceptRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[15] - 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 GroupInviteAcceptRequest.ProtoReflect.Descriptor instead. -func (*GroupInviteAcceptRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{15} -} - -func (x *GroupInviteAcceptRequest) GetGid() string { - if x != nil { - return x.Gid - } - return "" -} - -func (x *GroupInviteAcceptRequest) GetIsAccept() bool { - if x != nil { - return x.IsAccept - } - return false -} - -type GroupInviteAcceptResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GroupInviteAcceptResponse) Reset() { - *x = GroupInviteAcceptResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInviteAcceptResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInviteAcceptResponse) ProtoMessage() {} - -func (x *GroupInviteAcceptResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[16] - 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 GroupInviteAcceptResponse.ProtoReflect.Descriptor instead. -func (*GroupInviteAcceptResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{16} -} - -// GroupDeleteUser -type GroupDeleteUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserDeletedUid string `protobuf:"bytes,1,opt,name=userDeletedUid,proto3" json:"userDeletedUid,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` -} - -func (x *GroupDeleteUserRequest) Reset() { - *x = GroupDeleteUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupDeleteUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupDeleteUserRequest) ProtoMessage() {} - -func (x *GroupDeleteUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_service_proto_msgTypes[17] - 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 GroupDeleteUserRequest.ProtoReflect.Descriptor instead. -func (*GroupDeleteUserRequest) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{17} -} - -func (x *GroupDeleteUserRequest) GetUserDeletedUid() string { - if x != nil { - return x.UserDeletedUid - } - return "" -} - -func (x *GroupDeleteUserRequest) GetGid() string { - if x != nil { - return x.Gid - } - return "" -} - -type GroupDeleteUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GroupDeleteUserResponse) Reset() { - *x = GroupDeleteUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_sync_service_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupDeleteUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupDeleteUserResponse) ProtoMessage() {} - -func (x *GroupDeleteUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_sync_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 GroupDeleteUserResponse.ProtoReflect.Descriptor instead. -func (*GroupDeleteUserResponse) Descriptor() ([]byte, []int) { - return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{18} -} - var File_sync_v1_sync_service_proto protoreflect.FileDescriptor var file_sync_v1_sync_service_proto_rawDesc = []byte{ @@ -1205,241 +743,161 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, - 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, - 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x73, 0x79, 0x6e, - 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x5f, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x64, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, + 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, + 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, + 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, + 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, + 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x11, 0x53, 0x79, 0x6e, + 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, + 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, - 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x36, - 0x0a, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x18, 0x0c, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, - 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, - 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, - 0x53, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x73, 0x73, 0x68, 0x4b, - 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x53, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x22, 0xec, 0x01, 0x0a, 0x13, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, - 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x12, 0x32, 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, - 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, - 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, - 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd3, 0x01, 0x0a, 0x14, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x48, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x73, - 0x73, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, - 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x3a, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x77, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x22, 0x4c, 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, - 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, - 0xeb, 0x01, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, + 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x53, + 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, + 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x07, + 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, + 0x74, 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, + 0x2d, 0x0a, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, + 0x4b, 0x65, 0x79, 0x52, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x33, + 0x0a, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x18, 0x0e, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x53, 0x65, 0x74, 0x22, 0xec, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, + 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x09, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x29, + 0x0a, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, + 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, + 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0xd3, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, + 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, + 0x12, 0x32, 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, + 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x48, 0x6f, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, + 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x76, + 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x25, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x06, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x4c, 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb0, 0x01, - 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x22, 0xeb, 0x01, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, + 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, + 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, + 0x65, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, + 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, - 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, - 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, - 0x22, 0xb1, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, - 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x53, 0x65, 0x74, 0x22, 0x9d, 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x16, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, - 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x65, 0x55, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x65, 0x55, 0x69, - 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x19, 0x0a, - 0x17, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x0a, 0x18, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x52, 0x0a, 0x16, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x73, 0x65, - 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x55, 0x69, - 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x67, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf1, - 0x08, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, - 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, - 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, - 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, - 0x22, 0x1b, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6f, 0x0a, - 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, - 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, - 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, - 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x86, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, - 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x32, 0xc7, 0x04, 0x0a, 0x0b, 0x53, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x0a, 0x53, 0x79, 0x6e, + 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, + 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6c, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, + 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x09, + 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x7c, 0x0a, + 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, + 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x85, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, - 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, - 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x11, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, - 0x76, 0x69, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x76, - 0x69, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, 0x21, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x5f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, - 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, - 0x2a, 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, - 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, + 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1454,84 +912,64 @@ func file_sync_v1_sync_service_proto_rawDescGZIP() []byte { return file_sync_v1_sync_service_proto_rawDescData } -var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SyncConfigRequest)(nil), // 0: sync.v1.SyncConfigRequest (*SyncConfigResponse)(nil), // 1: sync.v1.SyncConfigResponse (*UpdateConfigRequest)(nil), // 2: sync.v1.UpdateConfigRequest (*UpdateConfigResponse)(nil), // 3: sync.v1.UpdateConfigResponse - (*UpdateGroupRequest)(nil), // 4: sync.v1.UpdateGroupRequest - (*UpdateGroupResponse)(nil), // 5: sync.v1.UpdateGroupResponse - (*SyncGroupRequest)(nil), // 6: sync.v1.SyncGroupRequest - (*SyncGroupResponse)(nil), // 7: sync.v1.SyncGroupResponse - (*SyncUserKeyWalletRequest)(nil), // 8: sync.v1.SyncUserKeyWalletRequest - (*SyncUserKeyWalletResponse)(nil), // 9: sync.v1.SyncUserKeyWalletResponse - (*UpdateUserKeyWalletRequest)(nil), // 10: sync.v1.UpdateUserKeyWalletRequest - (*UpdateUserKeyWalletResponse)(nil), // 11: sync.v1.UpdateUserKeyWalletResponse - (*UserKeyWallet)(nil), // 12: sync.v1.UserKeyWallet - (*GroupInviteUserRequest)(nil), // 13: sync.v1.GroupInviteUserRequest - (*GroupInviteUserResponse)(nil), // 14: sync.v1.GroupInviteUserResponse - (*GroupInviteAcceptRequest)(nil), // 15: sync.v1.GroupInviteAcceptRequest - (*GroupInviteAcceptResponse)(nil), // 16: sync.v1.GroupInviteAcceptResponse - (*GroupDeleteUserRequest)(nil), // 17: sync.v1.GroupDeleteUserRequest - (*GroupDeleteUserResponse)(nil), // 18: sync.v1.GroupDeleteUserResponse - (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp - (*Host)(nil), // 20: sync.v1.Host - (*KnownHost)(nil), // 21: sync.v1.KnownHost - (*SshKey)(nil), // 22: sync.v1.SshKey - (*Identity)(nil), // 23: sync.v1.Identity - (*Group)(nil), // 24: sync.v1.Group + (*SyncGroupRequest)(nil), // 4: sync.v1.SyncGroupRequest + (*SyncGroupResponse)(nil), // 5: sync.v1.SyncGroupResponse + (*SyncUserKeyWalletRequest)(nil), // 6: sync.v1.SyncUserKeyWalletRequest + (*SyncUserKeyWalletResponse)(nil), // 7: sync.v1.SyncUserKeyWalletResponse + (*UpdateUserKeyWalletRequest)(nil), // 8: sync.v1.UpdateUserKeyWalletRequest + (*UpdateUserKeyWalletResponse)(nil), // 9: sync.v1.UpdateUserKeyWalletResponse + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*Host)(nil), // 11: sync.v1.Host + (*KnownHost)(nil), // 12: sync.v1.KnownHost + (*SshKey)(nil), // 13: sync.v1.SshKey + (*Identity)(nil), // 14: sync.v1.Identity + (*v1.Team)(nil), // 15: team.v1.Team + (*UserKeyWallet)(nil), // 16: sync.v1.UserKeyWallet } var file_sync_v1_sync_service_proto_depIdxs = []int32{ - 19, // 0: sync.v1.SyncConfigRequest.after:type_name -> google.protobuf.Timestamp - 19, // 1: sync.v1.SyncConfigResponse.server_time:type_name -> google.protobuf.Timestamp - 20, // 2: sync.v1.SyncConfigResponse.hostSet:type_name -> sync.v1.Host - 21, // 3: sync.v1.SyncConfigResponse.knownHostSet:type_name -> sync.v1.KnownHost - 22, // 4: sync.v1.SyncConfigResponse.sshKeySet:type_name -> sync.v1.SshKey - 23, // 5: sync.v1.SyncConfigResponse.identitySet:type_name -> sync.v1.Identity - 20, // 6: sync.v1.UpdateConfigRequest.host:type_name -> sync.v1.Host - 21, // 7: sync.v1.UpdateConfigRequest.knownHost:type_name -> sync.v1.KnownHost - 22, // 8: sync.v1.UpdateConfigRequest.sshKey:type_name -> sync.v1.SshKey - 23, // 9: sync.v1.UpdateConfigRequest.identity:type_name -> sync.v1.Identity - 20, // 10: sync.v1.UpdateConfigResponse.host:type_name -> sync.v1.Host - 21, // 11: sync.v1.UpdateConfigResponse.knownHost:type_name -> sync.v1.KnownHost - 22, // 12: sync.v1.UpdateConfigResponse.sshKey:type_name -> sync.v1.SshKey - 23, // 13: sync.v1.UpdateConfigResponse.identity:type_name -> sync.v1.Identity - 24, // 14: sync.v1.UpdateGroupRequest.group:type_name -> sync.v1.Group - 19, // 15: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 19, // 16: sync.v1.SyncGroupResponse.serverTime:type_name -> google.protobuf.Timestamp - 24, // 17: sync.v1.SyncGroupResponse.groups:type_name -> sync.v1.Group - 19, // 18: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp - 19, // 19: sync.v1.SyncUserKeyWalletResponse.serverTime:type_name -> google.protobuf.Timestamp - 12, // 20: sync.v1.SyncUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet - 12, // 21: sync.v1.UpdateUserKeyWalletRequest.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet - 12, // 22: sync.v1.UpdateUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet - 19, // 23: sync.v1.UserKeyWallet.createdAt:type_name -> google.protobuf.Timestamp - 19, // 24: sync.v1.UserKeyWallet.updatedAt:type_name -> google.protobuf.Timestamp - 19, // 25: sync.v1.UserKeyWallet.deletedAt:type_name -> google.protobuf.Timestamp - 0, // 26: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest - 2, // 27: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest - 4, // 28: sync.v1.SyncService.UpdateGroup:input_type -> sync.v1.UpdateGroupRequest - 6, // 29: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest - 8, // 30: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest - 10, // 31: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest - 13, // 32: sync.v1.SyncService.GroupInviteUser:input_type -> sync.v1.GroupInviteUserRequest - 15, // 33: sync.v1.SyncService.GroupInviteAccept:input_type -> sync.v1.GroupInviteAcceptRequest - 17, // 34: sync.v1.SyncService.GroupDeleteUser:input_type -> sync.v1.GroupDeleteUserRequest - 1, // 35: sync.v1.SyncService.SyncConfig:output_type -> sync.v1.SyncConfigResponse - 3, // 36: sync.v1.SyncService.UpdateConfig:output_type -> sync.v1.UpdateConfigResponse - 5, // 37: sync.v1.SyncService.UpdateGroup:output_type -> sync.v1.UpdateGroupResponse - 7, // 38: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse - 9, // 39: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse - 11, // 40: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse - 14, // 41: sync.v1.SyncService.GroupInviteUser:output_type -> sync.v1.GroupInviteUserResponse - 16, // 42: sync.v1.SyncService.GroupInviteAccept:output_type -> sync.v1.GroupInviteAcceptResponse - 18, // 43: sync.v1.SyncService.GroupDeleteUser:output_type -> sync.v1.GroupDeleteUserResponse - 35, // [35:44] is the sub-list for method output_type - 26, // [26:35] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 10, // 0: sync.v1.SyncConfigRequest.after:type_name -> google.protobuf.Timestamp + 10, // 1: sync.v1.SyncConfigResponse.server_time:type_name -> google.protobuf.Timestamp + 11, // 2: sync.v1.SyncConfigResponse.hostSet:type_name -> sync.v1.Host + 12, // 3: sync.v1.SyncConfigResponse.knownHostSet:type_name -> sync.v1.KnownHost + 13, // 4: sync.v1.SyncConfigResponse.sshKeySet:type_name -> sync.v1.SshKey + 14, // 5: sync.v1.SyncConfigResponse.identitySet:type_name -> sync.v1.Identity + 11, // 6: sync.v1.UpdateConfigRequest.host:type_name -> sync.v1.Host + 12, // 7: sync.v1.UpdateConfigRequest.knownHost:type_name -> sync.v1.KnownHost + 13, // 8: sync.v1.UpdateConfigRequest.sshKey:type_name -> sync.v1.SshKey + 14, // 9: sync.v1.UpdateConfigRequest.identity:type_name -> sync.v1.Identity + 11, // 10: sync.v1.UpdateConfigResponse.host:type_name -> sync.v1.Host + 12, // 11: sync.v1.UpdateConfigResponse.knownHost:type_name -> sync.v1.KnownHost + 13, // 12: sync.v1.UpdateConfigResponse.sshKey:type_name -> sync.v1.SshKey + 14, // 13: sync.v1.UpdateConfigResponse.identity:type_name -> sync.v1.Identity + 10, // 14: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp + 10, // 15: sync.v1.SyncGroupResponse.serverTime:type_name -> google.protobuf.Timestamp + 15, // 16: sync.v1.SyncGroupResponse.groups:type_name -> team.v1.Team + 10, // 17: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp + 10, // 18: sync.v1.SyncUserKeyWalletResponse.serverTime:type_name -> google.protobuf.Timestamp + 16, // 19: sync.v1.SyncUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 16, // 20: sync.v1.UpdateUserKeyWalletRequest.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 16, // 21: sync.v1.UpdateUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 0, // 22: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest + 2, // 23: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest + 4, // 24: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 6, // 25: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest + 8, // 26: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest + 1, // 27: sync.v1.SyncService.SyncConfig:output_type -> sync.v1.SyncConfigResponse + 3, // 28: sync.v1.SyncService.UpdateConfig:output_type -> sync.v1.UpdateConfigResponse + 5, // 29: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 7, // 30: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse + 9, // 31: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse + 27, // [27:32] is the sub-list for method output_type + 22, // [22:27] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_sync_v1_sync_service_proto_init() } @@ -1541,8 +979,8 @@ func file_sync_v1_sync_service_proto_init() { } file_sync_v1_host_proto_init() file_sync_v1_keychain_proto_init() + file_sync_v1_key_wallet_proto_init() file_sync_v1_known_hosts_proto_init() - file_sync_v1_group_proto_init() if !protoimpl.UnsafeEnabled { file_sync_v1_sync_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncConfigRequest); i { @@ -1593,30 +1031,6 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncGroupRequest); i { case 0: return &v.state @@ -1628,7 +1042,7 @@ func file_sync_v1_sync_service_proto_init() { return nil } } - file_sync_v1_sync_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_sync_v1_sync_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncGroupResponse); i { case 0: return &v.state @@ -1640,7 +1054,7 @@ func file_sync_v1_sync_service_proto_init() { return nil } } - file_sync_v1_sync_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_sync_v1_sync_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncUserKeyWalletRequest); i { case 0: return &v.state @@ -1652,7 +1066,7 @@ func file_sync_v1_sync_service_proto_init() { return nil } } - file_sync_v1_sync_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_sync_v1_sync_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SyncUserKeyWalletResponse); i { case 0: return &v.state @@ -1664,7 +1078,7 @@ func file_sync_v1_sync_service_proto_init() { return nil } } - file_sync_v1_sync_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_sync_v1_sync_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateUserKeyWalletRequest); i { case 0: return &v.state @@ -1676,7 +1090,7 @@ func file_sync_v1_sync_service_proto_init() { return nil } } - file_sync_v1_sync_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_sync_v1_sync_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateUserKeyWalletResponse); i { case 0: return &v.state @@ -1688,90 +1102,6 @@ func file_sync_v1_sync_service_proto_init() { return nil } } - file_sync_v1_sync_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserKeyWallet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInviteUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInviteUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInviteAcceptRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInviteAcceptResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupDeleteUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sync_v1_sync_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupDeleteUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_sync_v1_sync_service_proto_msgTypes[2].OneofWrappers = []interface{}{ (*UpdateConfigRequest_Host)(nil), @@ -1791,7 +1121,7 @@ func file_sync_v1_sync_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sync_v1_sync_service_proto_rawDesc, NumEnums: 0, - NumMessages: 19, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index 83b046b..1c6f13f 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -101,40 +101,6 @@ func local_request_SyncService_UpdateConfig_0(ctx context.Context, marshaler run } -func request_SyncService_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateGroupRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UpdateGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SyncService_UpdateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateGroupRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UpdateGroup(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_SyncService_SyncGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -241,108 +207,6 @@ func local_request_SyncService_UpdateUserKeyWallet_0(ctx context.Context, marsha } -func request_SyncService_GroupInviteUser_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GroupInviteUserRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GroupInviteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SyncService_GroupInviteUser_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GroupInviteUserRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GroupInviteUser(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SyncService_GroupInviteAccept_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GroupInviteAcceptRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GroupInviteAccept(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SyncService_GroupInviteAccept_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GroupInviteAcceptRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GroupInviteAccept(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SyncService_GroupDeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GroupDeleteUserRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GroupDeleteUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SyncService_GroupDeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GroupDeleteUserRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GroupDeleteUser(ctx, &protoReq) - return msg, metadata, err - -} - // RegisterSyncServiceHandlerServer registers the http handlers for service SyncService to "mux". // UnaryRPC :call SyncServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -357,7 +221,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_config")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -382,7 +246,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_config")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -399,31 +263,6 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_SyncService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SyncService_UpdateGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_UpdateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_SyncService_SyncGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -432,7 +271,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_group")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/group")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -457,7 +296,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_user_key_wallet")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -482,7 +321,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_wallet")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -499,81 +338,6 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_SyncService_GroupInviteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GroupInviteUser", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_invite_user")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SyncService_GroupInviteUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GroupInviteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SyncService_GroupInviteAccept_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GroupInviteAccept", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_invite_accept")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SyncService_GroupInviteAccept_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GroupInviteAccept_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SyncService_GroupDeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/GroupDeleteUser", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_delete_user")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SyncService_GroupDeleteUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GroupDeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -621,7 +385,7 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_config")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -643,7 +407,7 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_config")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -659,35 +423,13 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_SyncService_UpdateGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_group")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SyncService_UpdateGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_UpdateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_SyncService_SyncGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_group")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/group")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -709,7 +451,7 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/sync_user_key_wallet")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -731,7 +473,7 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_user_key_wallet")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/key_wallet")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -747,93 +489,19 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_SyncService_GroupInviteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GroupInviteUser", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_invite_user")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SyncService_GroupInviteUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GroupInviteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SyncService_GroupInviteAccept_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GroupInviteAccept", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_invite_accept")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SyncService_GroupInviteAccept_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GroupInviteAccept_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SyncService_GroupDeleteUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/GroupDeleteUser", runtime.WithHTTPPathPattern("/gapi/sync/v1/group_delete_user")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SyncService_GroupDeleteUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SyncService_GroupDeleteUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } var ( - pattern_SyncService_SyncConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_config"}, "")) + pattern_SyncService_SyncConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "config"}, "")) - pattern_SyncService_UpdateConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_config"}, "")) + pattern_SyncService_UpdateConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "config"}, "")) - pattern_SyncService_UpdateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_group"}, "")) + pattern_SyncService_SyncGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "group"}, "")) - pattern_SyncService_SyncGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_group"}, "")) + pattern_SyncService_SyncUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "key_wallet"}, "")) - pattern_SyncService_SyncUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "sync_user_key_wallet"}, "")) - - pattern_SyncService_UpdateUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "update_user_key_wallet"}, "")) - - pattern_SyncService_GroupInviteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "group_invite_user"}, "")) - - pattern_SyncService_GroupInviteAccept_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "group_invite_accept"}, "")) - - pattern_SyncService_GroupDeleteUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "group_delete_user"}, "")) + pattern_SyncService_UpdateUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "key_wallet"}, "")) ) var ( @@ -841,17 +509,9 @@ var ( forward_SyncService_UpdateConfig_0 = runtime.ForwardResponseMessage - forward_SyncService_UpdateGroup_0 = runtime.ForwardResponseMessage - forward_SyncService_SyncGroup_0 = runtime.ForwardResponseMessage forward_SyncService_SyncUserKeyWallet_0 = runtime.ForwardResponseMessage forward_SyncService_UpdateUserKeyWallet_0 = runtime.ForwardResponseMessage - - forward_SyncService_GroupInviteUser_0 = runtime.ForwardResponseMessage - - forward_SyncService_GroupInviteAccept_0 = runtime.ForwardResponseMessage - - forward_SyncService_GroupDeleteUser_0 = runtime.ForwardResponseMessage ) diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index fc7d975..fe26f5f 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -6,8 +6,9 @@ import * as fm from "../../fetch.pb" import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" -import * as SyncV1Group from "./group.pb" +import * as TeamV1Team from "../../team/v1/team.pb" import * as SyncV1Host from "./host.pb" +import * as SyncV1Key_wallet from "./key_wallet.pb" import * as SyncV1Keychain from "./keychain.pb" import * as SyncV1Known_hosts from "./known_hosts.pb" @@ -47,20 +48,13 @@ type BaseUpdateConfigResponse = { export type UpdateConfigResponse = BaseUpdateConfigResponse & OneOf<{ host: SyncV1Host.Host; knownHost: SyncV1Known_hosts.KnownHost; sshKey: SyncV1Keychain.SshKey; identity: SyncV1Keychain.Identity }> -export type UpdateGroupRequest = { - group?: SyncV1Group.Group -} - -export type UpdateGroupResponse = { -} - export type SyncGroupRequest = { after?: GoogleProtobufTimestamp.Timestamp } export type SyncGroupResponse = { serverTime?: GoogleProtobufTimestamp.Timestamp - groups?: SyncV1Group.Group[] + groups?: TeamV1Team.Team[] } export type SyncUserKeyWalletRequest = { @@ -71,81 +65,35 @@ export type SyncUserKeyWalletResponse = { serverTime?: GoogleProtobufTimestamp.Timestamp publicKey?: string encryptedPrivateKey?: string - userKeyWalletSet?: UserKeyWallet[] + userKeyWalletSet?: SyncV1Key_wallet.UserKeyWallet[] } export type UpdateUserKeyWalletRequest = { publicKey?: string encryptedPrivateKey?: string - userKeyWalletSet?: UserKeyWallet[] + userKeyWalletSet?: SyncV1Key_wallet.UserKeyWallet[] } export type UpdateUserKeyWalletResponse = { publicKey?: string encryptedPrivateKey?: string - userKeyWalletSet?: UserKeyWallet[] -} - -export type UserKeyWallet = { - uid?: string - gid?: string - encryptedGroupPrivateKey?: string - createdAt?: GoogleProtobufTimestamp.Timestamp - updatedAt?: GoogleProtobufTimestamp.Timestamp - deletedAt?: GoogleProtobufTimestamp.Timestamp -} - -export type GroupInviteUserRequest = { - gid?: string - inviteeUid?: string - encryptedGroupPrivateKey?: string -} - -export type GroupInviteUserResponse = { -} - -export type GroupInviteAcceptRequest = { - gid?: string - isAccept?: boolean -} - -export type GroupInviteAcceptResponse = { -} - -export type GroupDeleteUserRequest = { - userDeletedUid?: string - gid?: string -} - -export type GroupDeleteUserResponse = { + userKeyWalletSet?: SyncV1Key_wallet.UserKeyWallet[] } export class SyncService { static SyncConfig(req: SyncConfigRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/sync_config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + return fm.fetchReq(`/gapi/sync/v1/config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } static UpdateConfig(req: UpdateConfigRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/update_config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static UpdateGroup(req: UpdateGroupRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/update_group`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + return fm.fetchReq(`/gapi/sync/v1/config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } static SyncGroup(req: SyncGroupRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/sync_group?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + return fm.fetchReq(`/gapi/sync/v1/group?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } static SyncUserKeyWallet(req: SyncUserKeyWalletRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/sync_user_key_wallet?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + return fm.fetchReq(`/gapi/sync/v1/key_wallet?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } static UpdateUserKeyWallet(req: UpdateUserKeyWalletRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/update_user_key_wallet`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static GroupInviteUser(req: GroupInviteUserRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/group_invite_user`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static GroupInviteAccept(req: GroupInviteAcceptRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/group_invite_accept`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static GroupDeleteUser(req: GroupDeleteUserRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/group_delete_user`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + return fm.fetchReq(`/gapi/sync/v1/key_wallet`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } } \ No newline at end of file diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index 0f39f8c..dfdfe2d 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -21,13 +21,9 @@ const _ = grpc.SupportPackageIsVersion7 const ( SyncService_SyncConfig_FullMethodName = "/sync.v1.SyncService/SyncConfig" SyncService_UpdateConfig_FullMethodName = "/sync.v1.SyncService/UpdateConfig" - SyncService_UpdateGroup_FullMethodName = "/sync.v1.SyncService/UpdateGroup" SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" SyncService_SyncUserKeyWallet_FullMethodName = "/sync.v1.SyncService/SyncUserKeyWallet" SyncService_UpdateUserKeyWallet_FullMethodName = "/sync.v1.SyncService/UpdateUserKeyWallet" - SyncService_GroupInviteUser_FullMethodName = "/sync.v1.SyncService/GroupInviteUser" - SyncService_GroupInviteAccept_FullMethodName = "/sync.v1.SyncService/GroupInviteAccept" - SyncService_GroupDeleteUser_FullMethodName = "/sync.v1.SyncService/GroupDeleteUser" ) // SyncServiceClient is the client API for SyncService service. @@ -38,20 +34,12 @@ type SyncServiceClient interface { SyncConfig(ctx context.Context, in *SyncConfigRequest, opts ...grpc.CallOption) (*SyncConfigResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*UpdateConfigResponse, error) - // 更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。 - UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) - // 通过UID获取所有组信息 + // 通过UID获取所有所在组变动信息 SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) // 获取用户密钥对 SyncUserKeyWallet(ctx context.Context, in *SyncUserKeyWalletRequest, opts ...grpc.CallOption) (*SyncUserKeyWalletResponse, error) // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 UpdateUserKeyWallet(ctx context.Context, in *UpdateUserKeyWalletRequest, opts ...grpc.CallOption) (*UpdateUserKeyWalletResponse, error) - // 邀请用户加入,加密的密钥由邀请者那边去取被邀请者的公钥加密后存储 - GroupInviteUser(ctx context.Context, in *GroupInviteUserRequest, opts ...grpc.CallOption) (*GroupInviteUserResponse, error) - // 邀请用户加入 - GroupInviteAccept(ctx context.Context, in *GroupInviteAcceptRequest, opts ...grpc.CallOption) (*GroupInviteAcceptResponse, error) - // 删除用户 - GroupDeleteUser(ctx context.Context, in *GroupDeleteUserRequest, opts ...grpc.CallOption) (*GroupDeleteUserResponse, error) } type syncServiceClient struct { @@ -80,15 +68,6 @@ func (c *syncServiceClient) UpdateConfig(ctx context.Context, in *UpdateConfigRe return out, nil } -func (c *syncServiceClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) { - out := new(UpdateGroupResponse) - err := c.cc.Invoke(ctx, SyncService_UpdateGroup_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *syncServiceClient) SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) { out := new(SyncGroupResponse) err := c.cc.Invoke(ctx, SyncService_SyncGroup_FullMethodName, in, out, opts...) @@ -116,33 +95,6 @@ func (c *syncServiceClient) UpdateUserKeyWallet(ctx context.Context, in *UpdateU return out, nil } -func (c *syncServiceClient) GroupInviteUser(ctx context.Context, in *GroupInviteUserRequest, opts ...grpc.CallOption) (*GroupInviteUserResponse, error) { - out := new(GroupInviteUserResponse) - err := c.cc.Invoke(ctx, SyncService_GroupInviteUser_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncServiceClient) GroupInviteAccept(ctx context.Context, in *GroupInviteAcceptRequest, opts ...grpc.CallOption) (*GroupInviteAcceptResponse, error) { - out := new(GroupInviteAcceptResponse) - err := c.cc.Invoke(ctx, SyncService_GroupInviteAccept_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *syncServiceClient) GroupDeleteUser(ctx context.Context, in *GroupDeleteUserRequest, opts ...grpc.CallOption) (*GroupDeleteUserResponse, error) { - out := new(GroupDeleteUserResponse) - err := c.cc.Invoke(ctx, SyncService_GroupDeleteUser_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // SyncServiceServer is the server API for SyncService service. // All implementations must embed UnimplementedSyncServiceServer // for forward compatibility @@ -151,20 +103,12 @@ type SyncServiceServer interface { SyncConfig(context.Context, *SyncConfigRequest) (*SyncConfigResponse, error) // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) - // 更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。 - UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) - // 通过UID获取所有组信息 + // 通过UID获取所有所在组变动信息 SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) // 获取用户密钥对 SyncUserKeyWallet(context.Context, *SyncUserKeyWalletRequest) (*SyncUserKeyWalletResponse, error) // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 UpdateUserKeyWallet(context.Context, *UpdateUserKeyWalletRequest) (*UpdateUserKeyWalletResponse, error) - // 邀请用户加入,加密的密钥由邀请者那边去取被邀请者的公钥加密后存储 - GroupInviteUser(context.Context, *GroupInviteUserRequest) (*GroupInviteUserResponse, error) - // 邀请用户加入 - GroupInviteAccept(context.Context, *GroupInviteAcceptRequest) (*GroupInviteAcceptResponse, error) - // 删除用户 - GroupDeleteUser(context.Context, *GroupDeleteUserRequest) (*GroupDeleteUserResponse, error) mustEmbedUnimplementedSyncServiceServer() } @@ -178,9 +122,6 @@ func (UnimplementedSyncServiceServer) SyncConfig(context.Context, *SyncConfigReq func (UnimplementedSyncServiceServer) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateConfig not implemented") } -func (UnimplementedSyncServiceServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*UpdateGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") -} func (UnimplementedSyncServiceServer) SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncGroup not implemented") } @@ -190,15 +131,6 @@ func (UnimplementedSyncServiceServer) SyncUserKeyWallet(context.Context, *SyncUs func (UnimplementedSyncServiceServer) UpdateUserKeyWallet(context.Context, *UpdateUserKeyWalletRequest) (*UpdateUserKeyWalletResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUserKeyWallet not implemented") } -func (UnimplementedSyncServiceServer) GroupInviteUser(context.Context, *GroupInviteUserRequest) (*GroupInviteUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupInviteUser not implemented") -} -func (UnimplementedSyncServiceServer) GroupInviteAccept(context.Context, *GroupInviteAcceptRequest) (*GroupInviteAcceptResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupInviteAccept not implemented") -} -func (UnimplementedSyncServiceServer) GroupDeleteUser(context.Context, *GroupDeleteUserRequest) (*GroupDeleteUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupDeleteUser not implemented") -} func (UnimplementedSyncServiceServer) mustEmbedUnimplementedSyncServiceServer() {} // UnsafeSyncServiceServer may be embedded to opt out of forward compatibility for this service. @@ -248,24 +180,6 @@ func _SyncService_UpdateConfig_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _SyncService_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncServiceServer).UpdateGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SyncService_UpdateGroup_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).UpdateGroup(ctx, req.(*UpdateGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _SyncService_SyncGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SyncGroupRequest) if err := dec(in); err != nil { @@ -320,60 +234,6 @@ func _SyncService_UpdateUserKeyWallet_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -func _SyncService_GroupInviteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GroupInviteUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncServiceServer).GroupInviteUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SyncService_GroupInviteUser_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).GroupInviteUser(ctx, req.(*GroupInviteUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncService_GroupInviteAccept_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GroupInviteAcceptRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncServiceServer).GroupInviteAccept(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SyncService_GroupInviteAccept_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).GroupInviteAccept(ctx, req.(*GroupInviteAcceptRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SyncService_GroupDeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GroupDeleteUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SyncServiceServer).GroupDeleteUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SyncService_GroupDeleteUser_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).GroupDeleteUser(ctx, req.(*GroupDeleteUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - // SyncService_ServiceDesc is the grpc.ServiceDesc for SyncService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -389,10 +249,6 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateConfig", Handler: _SyncService_UpdateConfig_Handler, }, - { - MethodName: "UpdateGroup", - Handler: _SyncService_UpdateGroup_Handler, - }, { MethodName: "SyncGroup", Handler: _SyncService_SyncGroup_Handler, @@ -405,18 +261,6 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateUserKeyWallet", Handler: _SyncService_UpdateUserKeyWallet_Handler, }, - { - MethodName: "GroupInviteUser", - Handler: _SyncService_GroupInviteUser_Handler, - }, - { - MethodName: "GroupInviteAccept", - Handler: _SyncService_GroupInviteAccept_Handler, - }, - { - MethodName: "GroupDeleteUser", - Handler: _SyncService_GroupDeleteUser_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "sync/v1/sync_service.proto", diff --git a/gen/proto/team/v1/team.pb.go b/gen/proto/team/v1/team.pb.go new file mode 100644 index 0000000..33aae73 --- /dev/null +++ b/gen/proto/team/v1/team.pb.go @@ -0,0 +1,234 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: team/v1/team.proto + +package teamV1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Team struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"` + Uid string `protobuf:"bytes,8,opt,name=uid,proto3" json:"uid,omitempty"` // 创建者 + PublicKey string `protobuf:"bytes,9,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 +} + +func (x *Team) Reset() { + *x = Team{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Team) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Team) ProtoMessage() {} + +func (x *Team) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_proto_msgTypes[0] + 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 Team.ProtoReflect.Descriptor instead. +func (*Team) Descriptor() ([]byte, []int) { + return file_team_v1_team_proto_rawDescGZIP(), []int{0} +} + +func (x *Team) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Team) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Team) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *Team) GetDeletedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeletedAt + } + return nil +} + +func (x *Team) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Team) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Team) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *Team) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *Team) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +var File_team_v1_team_proto protoreflect.FileDescriptor + +var file_team_v1_team_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, + 0x02, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, + 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_team_v1_team_proto_rawDescOnce sync.Once + file_team_v1_team_proto_rawDescData = file_team_v1_team_proto_rawDesc +) + +func file_team_v1_team_proto_rawDescGZIP() []byte { + file_team_v1_team_proto_rawDescOnce.Do(func() { + file_team_v1_team_proto_rawDescData = protoimpl.X.CompressGZIP(file_team_v1_team_proto_rawDescData) + }) + return file_team_v1_team_proto_rawDescData +} + +var file_team_v1_team_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_team_v1_team_proto_goTypes = []interface{}{ + (*Team)(nil), // 0: team.v1.Team + (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp +} +var file_team_v1_team_proto_depIdxs = []int32{ + 1, // 0: team.v1.Team.createdAt:type_name -> google.protobuf.Timestamp + 1, // 1: team.v1.Team.updatedAt:type_name -> google.protobuf.Timestamp + 1, // 2: team.v1.Team.deletedAt:type_name -> google.protobuf.Timestamp + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_team_v1_team_proto_init() } +func file_team_v1_team_proto_init() { + if File_team_v1_team_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_team_v1_team_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Team); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_team_v1_team_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_team_v1_team_proto_goTypes, + DependencyIndexes: file_team_v1_team_proto_depIdxs, + MessageInfos: file_team_v1_team_proto_msgTypes, + }.Build() + File_team_v1_team_proto = out.File + file_team_v1_team_proto_rawDesc = nil + file_team_v1_team_proto_goTypes = nil + file_team_v1_team_proto_depIdxs = nil +} diff --git a/gen/proto/sync/v1/group.pb.ts b/gen/proto/team/v1/team.pb.ts similarity index 70% rename from gen/proto/sync/v1/group.pb.ts rename to gen/proto/team/v1/team.pb.ts index f61c215..4e6f124 100644 --- a/gen/proto/sync/v1/group.pb.ts +++ b/gen/proto/team/v1/team.pb.ts @@ -5,12 +5,7 @@ */ import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" -export type Group = { - groupBasic?: GroupBasic - groupKeychain?: GroupKeyChain[] -} - -export type GroupBasic = { +export type Team = { id?: string createdAt?: GoogleProtobufTimestamp.Timestamp updatedAt?: GoogleProtobufTimestamp.Timestamp @@ -20,9 +15,4 @@ export type GroupBasic = { avatar?: string uid?: string publicKey?: string -} - -export type GroupKeyChain = { - memberId?: string - privateKey?: string } \ No newline at end of file diff --git a/gen/proto/team/v1/team_service.pb.go b/gen/proto/team/v1/team_service.pb.go new file mode 100644 index 0000000..c83b8cc --- /dev/null +++ b/gen/proto/team/v1/team_service.pb.go @@ -0,0 +1,904 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: team/v1/team_service.proto + +package teamV1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetTeamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetTeamRequest) Reset() { + *x = GetTeamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTeamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTeamRequest) ProtoMessage() {} + +func (x *GetTeamRequest) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[0] + 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 GetTeamRequest.ProtoReflect.Descriptor instead. +func (*GetTeamRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetTeamRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetTeamResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Team *Team `protobuf:"bytes,1,opt,name=team,proto3" json:"team,omitempty"` +} + +func (x *GetTeamResponse) Reset() { + *x = GetTeamResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTeamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTeamResponse) ProtoMessage() {} + +func (x *GetTeamResponse) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[1] + 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 GetTeamResponse.ProtoReflect.Descriptor instead. +func (*GetTeamResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetTeamResponse) GetTeam() *Team { + if x != nil { + return x.Team + } + return nil +} + +type CreateTeamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Team *Team `protobuf:"bytes,1,opt,name=team,proto3" json:"team,omitempty"` +} + +func (x *CreateTeamRequest) Reset() { + *x = CreateTeamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTeamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTeamRequest) ProtoMessage() {} + +func (x *CreateTeamRequest) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[2] + 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 CreateTeamRequest.ProtoReflect.Descriptor instead. +func (*CreateTeamRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateTeamRequest) GetTeam() *Team { + if x != nil { + return x.Team + } + return nil +} + +type CreateTeamResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Team *Team `protobuf:"bytes,1,opt,name=team,proto3" json:"team,omitempty"` +} + +func (x *CreateTeamResponse) Reset() { + *x = CreateTeamResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTeamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTeamResponse) ProtoMessage() {} + +func (x *CreateTeamResponse) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[3] + 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 CreateTeamResponse.ProtoReflect.Descriptor instead. +func (*CreateTeamResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateTeamResponse) GetTeam() *Team { + if x != nil { + return x.Team + } + return nil +} + +type UpdateTeamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Team *Team `protobuf:"bytes,1,opt,name=team,proto3" json:"team,omitempty"` +} + +func (x *UpdateTeamRequest) Reset() { + *x = UpdateTeamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTeamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTeamRequest) ProtoMessage() {} + +func (x *UpdateTeamRequest) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[4] + 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 UpdateTeamRequest.ProtoReflect.Descriptor instead. +func (*UpdateTeamRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateTeamRequest) GetTeam() *Team { + if x != nil { + return x.Team + } + return nil +} + +type UpdateTeamResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Team *Team `protobuf:"bytes,1,opt,name=team,proto3" json:"team,omitempty"` +} + +func (x *UpdateTeamResponse) Reset() { + *x = UpdateTeamResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTeamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTeamResponse) ProtoMessage() {} + +func (x *UpdateTeamResponse) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[5] + 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 UpdateTeamResponse.ProtoReflect.Descriptor instead. +func (*UpdateTeamResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateTeamResponse) GetTeam() *Team { + if x != nil { + return x.Team + } + return nil +} + +type DeleteTeamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteTeamRequest) Reset() { + *x = DeleteTeamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTeamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTeamRequest) ProtoMessage() {} + +func (x *DeleteTeamRequest) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[6] + 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 DeleteTeamRequest.ProtoReflect.Descriptor instead. +func (*DeleteTeamRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteTeamRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteTeamResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteTeamResponse) Reset() { + *x = DeleteTeamResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTeamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTeamResponse) ProtoMessage() {} + +func (x *DeleteTeamResponse) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[7] + 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 DeleteTeamResponse.ProtoReflect.Descriptor instead. +func (*DeleteTeamResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{7} +} + +type InviteMemberRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TeamId string `protobuf:"bytes,1,opt,name=teamId,proto3" json:"teamId,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` + EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` // 使用受邀请用户的公钥加密后的团队私钥 +} + +func (x *InviteMemberRequest) Reset() { + *x = InviteMemberRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InviteMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InviteMemberRequest) ProtoMessage() {} + +func (x *InviteMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[8] + 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 InviteMemberRequest.ProtoReflect.Descriptor instead. +func (*InviteMemberRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{8} +} + +func (x *InviteMemberRequest) GetTeamId() string { + if x != nil { + return x.TeamId + } + return "" +} + +func (x *InviteMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *InviteMemberRequest) GetEncryptedGroupPrivateKey() string { + if x != nil { + return x.EncryptedGroupPrivateKey + } + return "" +} + +type InviteMemberResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InviteMemberResponse) Reset() { + *x = InviteMemberResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InviteMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InviteMemberResponse) ProtoMessage() {} + +func (x *InviteMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[9] + 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 InviteMemberResponse.ProtoReflect.Descriptor instead. +func (*InviteMemberResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{9} +} + +type RemoveMemberRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TeamId string `protobuf:"bytes,1,opt,name=teamId,proto3" json:"teamId,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` +} + +func (x *RemoveMemberRequest) Reset() { + *x = RemoveMemberRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMemberRequest) ProtoMessage() {} + +func (x *RemoveMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[10] + 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 RemoveMemberRequest.ProtoReflect.Descriptor instead. +func (*RemoveMemberRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{10} +} + +func (x *RemoveMemberRequest) GetTeamId() string { + if x != nil { + return x.TeamId + } + return "" +} + +func (x *RemoveMemberRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type RemoveMemberResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveMemberResponse) Reset() { + *x = RemoveMemberResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMemberResponse) ProtoMessage() {} + +func (x *RemoveMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[11] + 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 RemoveMemberResponse.ProtoReflect.Descriptor instead. +func (*RemoveMemberResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{11} +} + +var File_team_v1_team_service_proto protoreflect.FileDescriptor + +var file_team_v1_team_service_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x74, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x34, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, + 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, + 0x36, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, + 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x37, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, + 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, + 0x22, 0x36, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x37, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, + 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, + 0x6d, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x01, 0x0a, + 0x13, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x22, 0x16, 0x0a, 0x14, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, + 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x94, 0x05, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, + 0x61, 0x6d, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, + 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, + 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, + 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x1a, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x6b, 0x0a, + 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, + 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, + 0x65, 0x61, 0x6d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, + 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, + 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x3c, + 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, + 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, + 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_team_v1_team_service_proto_rawDescOnce sync.Once + file_team_v1_team_service_proto_rawDescData = file_team_v1_team_service_proto_rawDesc +) + +func file_team_v1_team_service_proto_rawDescGZIP() []byte { + file_team_v1_team_service_proto_rawDescOnce.Do(func() { + file_team_v1_team_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_team_v1_team_service_proto_rawDescData) + }) + return file_team_v1_team_service_proto_rawDescData +} + +var file_team_v1_team_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_team_v1_team_service_proto_goTypes = []interface{}{ + (*GetTeamRequest)(nil), // 0: team.v1.GetTeamRequest + (*GetTeamResponse)(nil), // 1: team.v1.GetTeamResponse + (*CreateTeamRequest)(nil), // 2: team.v1.CreateTeamRequest + (*CreateTeamResponse)(nil), // 3: team.v1.CreateTeamResponse + (*UpdateTeamRequest)(nil), // 4: team.v1.UpdateTeamRequest + (*UpdateTeamResponse)(nil), // 5: team.v1.UpdateTeamResponse + (*DeleteTeamRequest)(nil), // 6: team.v1.DeleteTeamRequest + (*DeleteTeamResponse)(nil), // 7: team.v1.DeleteTeamResponse + (*InviteMemberRequest)(nil), // 8: team.v1.InviteMemberRequest + (*InviteMemberResponse)(nil), // 9: team.v1.InviteMemberResponse + (*RemoveMemberRequest)(nil), // 10: team.v1.RemoveMemberRequest + (*RemoveMemberResponse)(nil), // 11: team.v1.RemoveMemberResponse + (*Team)(nil), // 12: team.v1.Team +} +var file_team_v1_team_service_proto_depIdxs = []int32{ + 12, // 0: team.v1.GetTeamResponse.team:type_name -> team.v1.Team + 12, // 1: team.v1.CreateTeamRequest.team:type_name -> team.v1.Team + 12, // 2: team.v1.CreateTeamResponse.team:type_name -> team.v1.Team + 12, // 3: team.v1.UpdateTeamRequest.team:type_name -> team.v1.Team + 12, // 4: team.v1.UpdateTeamResponse.team:type_name -> team.v1.Team + 0, // 5: team.v1.TeamService.GetTeam:input_type -> team.v1.GetTeamRequest + 2, // 6: team.v1.TeamService.CreateTeam:input_type -> team.v1.CreateTeamRequest + 4, // 7: team.v1.TeamService.UpdateTeam:input_type -> team.v1.UpdateTeamRequest + 6, // 8: team.v1.TeamService.DeleteTeam:input_type -> team.v1.DeleteTeamRequest + 8, // 9: team.v1.TeamService.InviteMember:input_type -> team.v1.InviteMemberRequest + 10, // 10: team.v1.TeamService.RemoveMember:input_type -> team.v1.RemoveMemberRequest + 1, // 11: team.v1.TeamService.GetTeam:output_type -> team.v1.GetTeamResponse + 3, // 12: team.v1.TeamService.CreateTeam:output_type -> team.v1.CreateTeamResponse + 5, // 13: team.v1.TeamService.UpdateTeam:output_type -> team.v1.UpdateTeamResponse + 7, // 14: team.v1.TeamService.DeleteTeam:output_type -> team.v1.DeleteTeamResponse + 9, // 15: team.v1.TeamService.InviteMember:output_type -> team.v1.InviteMemberResponse + 11, // 16: team.v1.TeamService.RemoveMember:output_type -> team.v1.RemoveMemberResponse + 11, // [11:17] is the sub-list for method output_type + 5, // [5:11] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_team_v1_team_service_proto_init() } +func file_team_v1_team_service_proto_init() { + if File_team_v1_team_service_proto != nil { + return + } + file_team_v1_team_proto_init() + if !protoimpl.UnsafeEnabled { + file_team_v1_team_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTeamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTeamResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTeamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTeamResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTeamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTeamResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTeamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTeamResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InviteMemberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InviteMemberResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveMemberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveMemberResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_team_v1_team_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_team_v1_team_service_proto_goTypes, + DependencyIndexes: file_team_v1_team_service_proto_depIdxs, + MessageInfos: file_team_v1_team_service_proto_msgTypes, + }.Build() + File_team_v1_team_service_proto = out.File + file_team_v1_team_service_proto_rawDesc = nil + file_team_v1_team_service_proto_goTypes = nil + file_team_v1_team_service_proto_depIdxs = nil +} diff --git a/gen/proto/team/v1/team_service.pb.gw.go b/gen/proto/team/v1/team_service.pb.gw.go new file mode 100644 index 0000000..a43e18d --- /dev/null +++ b/gen/proto/team/v1/team_service.pb.gw.go @@ -0,0 +1,598 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: team/v1/team_service.proto + +/* +Package teamV1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package teamV1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_TeamService_GetTeam_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TeamService_GetTeam_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTeamRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TeamService_GetTeam_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTeam(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TeamService_GetTeam_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTeamRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TeamService_GetTeam_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTeam(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TeamService_CreateTeam_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateTeamRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateTeam(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TeamService_CreateTeam_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateTeamRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateTeam(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TeamService_UpdateTeam_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateTeamRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateTeam(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TeamService_UpdateTeam_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateTeamRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateTeam(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TeamService_DeleteTeam_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteTeamRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteTeam(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TeamService_DeleteTeam_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteTeamRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteTeam(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TeamService_InviteMember_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq InviteMemberRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.InviteMember(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TeamService_InviteMember_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq InviteMemberRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.InviteMember(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TeamService_RemoveMember_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveMemberRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RemoveMember(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TeamService_RemoveMember_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveMemberRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RemoveMember(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterTeamServiceHandlerServer registers the http handlers for service TeamService to "mux". +// UnaryRPC :call TeamServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTeamServiceHandlerFromEndpoint instead. +func RegisterTeamServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TeamServiceServer) error { + + mux.Handle("GET", pattern_TeamService_GetTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/team.v1.TeamService/GetTeam", runtime.WithHTTPPathPattern("/gapi/team/v1/team")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TeamService_GetTeam_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_GetTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_CreateTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/team.v1.TeamService/CreateTeam", runtime.WithHTTPPathPattern("/gapi/team/v1/team")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TeamService_CreateTeam_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_CreateTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_TeamService_UpdateTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/team.v1.TeamService/UpdateTeam", runtime.WithHTTPPathPattern("/gapi/team/v1/team")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TeamService_UpdateTeam_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_UpdateTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_DeleteTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/team.v1.TeamService/DeleteTeam", runtime.WithHTTPPathPattern("/gapi/team/v1/team/remove")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TeamService_DeleteTeam_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_DeleteTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_InviteMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/team.v1.TeamService/InviteMember", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/invite")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TeamService_InviteMember_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_InviteMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_RemoveMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/team.v1.TeamService/RemoveMember", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/remove")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TeamService_RemoveMember_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_RemoveMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterTeamServiceHandlerFromEndpoint is same as RegisterTeamServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterTeamServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterTeamServiceHandler(ctx, mux, conn) +} + +// RegisterTeamServiceHandler registers the http handlers for service TeamService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterTeamServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterTeamServiceHandlerClient(ctx, mux, NewTeamServiceClient(conn)) +} + +// RegisterTeamServiceHandlerClient registers the http handlers for service TeamService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TeamServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TeamServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "TeamServiceClient" to call the correct interceptors. +func RegisterTeamServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TeamServiceClient) error { + + mux.Handle("GET", pattern_TeamService_GetTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/team.v1.TeamService/GetTeam", runtime.WithHTTPPathPattern("/gapi/team/v1/team")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TeamService_GetTeam_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_GetTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_CreateTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/team.v1.TeamService/CreateTeam", runtime.WithHTTPPathPattern("/gapi/team/v1/team")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TeamService_CreateTeam_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_CreateTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_TeamService_UpdateTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/team.v1.TeamService/UpdateTeam", runtime.WithHTTPPathPattern("/gapi/team/v1/team")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TeamService_UpdateTeam_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_UpdateTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_DeleteTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/team.v1.TeamService/DeleteTeam", runtime.WithHTTPPathPattern("/gapi/team/v1/team/remove")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TeamService_DeleteTeam_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_DeleteTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_InviteMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/team.v1.TeamService/InviteMember", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/invite")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TeamService_InviteMember_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_InviteMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_RemoveMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/team.v1.TeamService/RemoveMember", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/remove")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TeamService_RemoveMember_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_RemoveMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_TeamService_GetTeam_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1}, []string{"gapi", "team", "v1"}, "")) + + pattern_TeamService_CreateTeam_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1}, []string{"gapi", "team", "v1"}, "")) + + pattern_TeamService_UpdateTeam_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1}, []string{"gapi", "team", "v1"}, "")) + + pattern_TeamService_DeleteTeam_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3}, []string{"gapi", "team", "v1", "remove"}, "")) + + pattern_TeamService_InviteMember_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"gapi", "team", "v1", "member", "invite"}, "")) + + pattern_TeamService_RemoveMember_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"gapi", "team", "v1", "member", "remove"}, "")) +) + +var ( + forward_TeamService_GetTeam_0 = runtime.ForwardResponseMessage + + forward_TeamService_CreateTeam_0 = runtime.ForwardResponseMessage + + forward_TeamService_UpdateTeam_0 = runtime.ForwardResponseMessage + + forward_TeamService_DeleteTeam_0 = runtime.ForwardResponseMessage + + forward_TeamService_InviteMember_0 = runtime.ForwardResponseMessage + + forward_TeamService_RemoveMember_0 = runtime.ForwardResponseMessage +) diff --git a/gen/proto/team/v1/team_service.pb.ts b/gen/proto/team/v1/team_service.pb.ts new file mode 100644 index 0000000..ff9e88f --- /dev/null +++ b/gen/proto/team/v1/team_service.pb.ts @@ -0,0 +1,76 @@ +/* eslint-disable */ +// @ts-nocheck +/* +* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY +*/ + +import * as fm from "../../fetch.pb" +import * as TeamV1Team from "./team.pb" +export type GetTeamRequest = { + id?: string +} + +export type GetTeamResponse = { + team?: TeamV1Team.Team +} + +export type CreateTeamRequest = { + team?: TeamV1Team.Team +} + +export type CreateTeamResponse = { + team?: TeamV1Team.Team +} + +export type UpdateTeamRequest = { + team?: TeamV1Team.Team +} + +export type UpdateTeamResponse = { + team?: TeamV1Team.Team +} + +export type DeleteTeamRequest = { + id?: string +} + +export type DeleteTeamResponse = { +} + +export type InviteMemberRequest = { + teamId?: string + userId?: string + encryptedGroupPrivateKey?: string +} + +export type InviteMemberResponse = { +} + +export type RemoveMemberRequest = { + teamId?: string + userId?: string +} + +export type RemoveMemberResponse = { +} + +export class TeamService { + static GetTeam(req: GetTeamRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/team/v1/team?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + } + static CreateTeam(req: CreateTeamRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/team/v1/team`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } + static UpdateTeam(req: UpdateTeamRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/team/v1/team`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)}) + } + static DeleteTeam(req: DeleteTeamRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/team/v1/team/remove`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } + static InviteMember(req: InviteMemberRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/team/v1/team/member/invite`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } + static RemoveMember(req: RemoveMemberRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/team/v1/team/member/remove`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } +} \ No newline at end of file diff --git a/gen/proto/team/v1/team_service_grpc.pb.go b/gen/proto/team/v1/team_service_grpc.pb.go new file mode 100644 index 0000000..d88f6a6 --- /dev/null +++ b/gen/proto/team/v1/team_service_grpc.pb.go @@ -0,0 +1,306 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: team/v1/team_service.proto + +package teamV1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TeamService_GetTeam_FullMethodName = "/team.v1.TeamService/GetTeam" + TeamService_CreateTeam_FullMethodName = "/team.v1.TeamService/CreateTeam" + TeamService_UpdateTeam_FullMethodName = "/team.v1.TeamService/UpdateTeam" + TeamService_DeleteTeam_FullMethodName = "/team.v1.TeamService/DeleteTeam" + TeamService_InviteMember_FullMethodName = "/team.v1.TeamService/InviteMember" + TeamService_RemoveMember_FullMethodName = "/team.v1.TeamService/RemoveMember" +) + +// TeamServiceClient is the client API for TeamService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TeamServiceClient interface { + // 获取团队信息 + GetTeam(ctx context.Context, in *GetTeamRequest, opts ...grpc.CallOption) (*GetTeamResponse, error) + // 创建团队 + CreateTeam(ctx context.Context, in *CreateTeamRequest, opts ...grpc.CallOption) (*CreateTeamResponse, error) + // 更新团队信息 + UpdateTeam(ctx context.Context, in *UpdateTeamRequest, opts ...grpc.CallOption) (*UpdateTeamResponse, error) + // 删除团队 + DeleteTeam(ctx context.Context, in *DeleteTeamRequest, opts ...grpc.CallOption) (*DeleteTeamResponse, error) + // 邀请成员加入团队 + InviteMember(ctx context.Context, in *InviteMemberRequest, opts ...grpc.CallOption) (*InviteMemberResponse, error) + // 从团队中移除成员 + RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...grpc.CallOption) (*RemoveMemberResponse, error) +} + +type teamServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTeamServiceClient(cc grpc.ClientConnInterface) TeamServiceClient { + return &teamServiceClient{cc} +} + +func (c *teamServiceClient) GetTeam(ctx context.Context, in *GetTeamRequest, opts ...grpc.CallOption) (*GetTeamResponse, error) { + out := new(GetTeamResponse) + err := c.cc.Invoke(ctx, TeamService_GetTeam_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamServiceClient) CreateTeam(ctx context.Context, in *CreateTeamRequest, opts ...grpc.CallOption) (*CreateTeamResponse, error) { + out := new(CreateTeamResponse) + err := c.cc.Invoke(ctx, TeamService_CreateTeam_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamServiceClient) UpdateTeam(ctx context.Context, in *UpdateTeamRequest, opts ...grpc.CallOption) (*UpdateTeamResponse, error) { + out := new(UpdateTeamResponse) + err := c.cc.Invoke(ctx, TeamService_UpdateTeam_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamServiceClient) DeleteTeam(ctx context.Context, in *DeleteTeamRequest, opts ...grpc.CallOption) (*DeleteTeamResponse, error) { + out := new(DeleteTeamResponse) + err := c.cc.Invoke(ctx, TeamService_DeleteTeam_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamServiceClient) InviteMember(ctx context.Context, in *InviteMemberRequest, opts ...grpc.CallOption) (*InviteMemberResponse, error) { + out := new(InviteMemberResponse) + err := c.cc.Invoke(ctx, TeamService_InviteMember_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamServiceClient) RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...grpc.CallOption) (*RemoveMemberResponse, error) { + out := new(RemoveMemberResponse) + err := c.cc.Invoke(ctx, TeamService_RemoveMember_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TeamServiceServer is the server API for TeamService service. +// All implementations must embed UnimplementedTeamServiceServer +// for forward compatibility +type TeamServiceServer interface { + // 获取团队信息 + GetTeam(context.Context, *GetTeamRequest) (*GetTeamResponse, error) + // 创建团队 + CreateTeam(context.Context, *CreateTeamRequest) (*CreateTeamResponse, error) + // 更新团队信息 + UpdateTeam(context.Context, *UpdateTeamRequest) (*UpdateTeamResponse, error) + // 删除团队 + DeleteTeam(context.Context, *DeleteTeamRequest) (*DeleteTeamResponse, error) + // 邀请成员加入团队 + InviteMember(context.Context, *InviteMemberRequest) (*InviteMemberResponse, error) + // 从团队中移除成员 + RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error) + mustEmbedUnimplementedTeamServiceServer() +} + +// UnimplementedTeamServiceServer must be embedded to have forward compatible implementations. +type UnimplementedTeamServiceServer struct { +} + +func (UnimplementedTeamServiceServer) GetTeam(context.Context, *GetTeamRequest) (*GetTeamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTeam not implemented") +} +func (UnimplementedTeamServiceServer) CreateTeam(context.Context, *CreateTeamRequest) (*CreateTeamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTeam not implemented") +} +func (UnimplementedTeamServiceServer) UpdateTeam(context.Context, *UpdateTeamRequest) (*UpdateTeamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateTeam not implemented") +} +func (UnimplementedTeamServiceServer) DeleteTeam(context.Context, *DeleteTeamRequest) (*DeleteTeamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTeam not implemented") +} +func (UnimplementedTeamServiceServer) InviteMember(context.Context, *InviteMemberRequest) (*InviteMemberResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InviteMember not implemented") +} +func (UnimplementedTeamServiceServer) RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveMember not implemented") +} +func (UnimplementedTeamServiceServer) mustEmbedUnimplementedTeamServiceServer() {} + +// UnsafeTeamServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TeamServiceServer will +// result in compilation errors. +type UnsafeTeamServiceServer interface { + mustEmbedUnimplementedTeamServiceServer() +} + +func RegisterTeamServiceServer(s grpc.ServiceRegistrar, srv TeamServiceServer) { + s.RegisterService(&TeamService_ServiceDesc, srv) +} + +func _TeamService_GetTeam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTeamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServiceServer).GetTeam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TeamService_GetTeam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServiceServer).GetTeam(ctx, req.(*GetTeamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TeamService_CreateTeam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTeamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServiceServer).CreateTeam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TeamService_CreateTeam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServiceServer).CreateTeam(ctx, req.(*CreateTeamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TeamService_UpdateTeam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateTeamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServiceServer).UpdateTeam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TeamService_UpdateTeam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServiceServer).UpdateTeam(ctx, req.(*UpdateTeamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TeamService_DeleteTeam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTeamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServiceServer).DeleteTeam(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TeamService_DeleteTeam_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServiceServer).DeleteTeam(ctx, req.(*DeleteTeamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TeamService_InviteMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InviteMemberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServiceServer).InviteMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TeamService_InviteMember_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServiceServer).InviteMember(ctx, req.(*InviteMemberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TeamService_RemoveMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveMemberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServiceServer).RemoveMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TeamService_RemoveMember_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServiceServer).RemoveMember(ctx, req.(*RemoveMemberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TeamService_ServiceDesc is the grpc.ServiceDesc for TeamService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TeamService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "team.v1.TeamService", + HandlerType: (*TeamServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetTeam", + Handler: _TeamService_GetTeam_Handler, + }, + { + MethodName: "CreateTeam", + Handler: _TeamService_CreateTeam_Handler, + }, + { + MethodName: "UpdateTeam", + Handler: _TeamService_UpdateTeam_Handler, + }, + { + MethodName: "DeleteTeam", + Handler: _TeamService_DeleteTeam_Handler, + }, + { + MethodName: "InviteMember", + Handler: _TeamService_InviteMember_Handler, + }, + { + MethodName: "RemoveMember", + Handler: _TeamService_RemoveMember_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "team/v1/team_service.proto", +} diff --git a/gen/proto/user/v1/user_service.pb.go b/gen/proto/user/v1/user_service.pb.go index 2b04721..db27f24 100644 --- a/gen/proto/user/v1/user_service.pb.go +++ b/gen/proto/user/v1/user_service.pb.go @@ -284,6 +284,100 @@ func (*CheckEmailVerifyCodeResponse) Descriptor() ([]byte, []int) { return file_user_v1_user_service_proto_rawDescGZIP(), []int{5} } +type GetUserPublicKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // user id 留空则为默认id +} + +func (x *GetUserPublicKeyRequest) Reset() { + *x = GetUserPublicKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_user_v1_user_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserPublicKeyRequest) ProtoMessage() {} + +func (x *GetUserPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_user_v1_user_service_proto_msgTypes[6] + 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 GetUserPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*GetUserPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_user_v1_user_service_proto_rawDescGZIP(), []int{6} +} + +func (x *GetUserPublicKeyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetUserPublicKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` +} + +func (x *GetUserPublicKeyResponse) Reset() { + *x = GetUserPublicKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_user_v1_user_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserPublicKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserPublicKeyResponse) ProtoMessage() {} + +func (x *GetUserPublicKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_user_v1_user_service_proto_msgTypes[7] + 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 GetUserPublicKeyResponse.ProtoReflect.Descriptor instead. +func (*GetUserPublicKeyResponse) Descriptor() ([]byte, []int) { + return file_user_v1_user_service_proto_rawDescGZIP(), []int{7} +} + +func (x *GetUserPublicKeyResponse) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + var File_user_v1_user_service_proto protoreflect.FileDescriptor var file_user_v1_user_service_proto_rawDesc = []byte{ @@ -308,32 +402,46 @@ var file_user_v1_user_service_proto_rawDesc = []byte{ 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x89, 0x03, 0x0a, 0x0b, - 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x07, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x8c, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6d, 0x61, 0x69, - 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x32, 0x84, 0x04, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x8c, 0x01, 0x0a, 0x13, 0x53, + 0x65, 0x6e, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x23, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, - 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, - 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2f, - 0x73, 0x65, 0x6e, 0x64, 0x12, 0x90, 0x01, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, - 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, - 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x90, 0x01, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x64, 0x65, 0x12, 0x24, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x79, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x12, 0x20, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, @@ -352,7 +460,7 @@ func file_user_v1_user_service_proto_rawDescGZIP() []byte { return file_user_v1_user_service_proto_rawDescData } -var file_user_v1_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_user_v1_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_user_v1_user_service_proto_goTypes = []interface{}{ (*GetInfoRequest)(nil), // 0: user.v1.GetInfoRequest (*GetInfoResponse)(nil), // 1: user.v1.GetInfoResponse @@ -360,18 +468,22 @@ var file_user_v1_user_service_proto_goTypes = []interface{}{ (*SendEmailVerifyCodeResponse)(nil), // 3: user.v1.SendEmailVerifyCodeResponse (*CheckEmailVerifyCodeRequest)(nil), // 4: user.v1.CheckEmailVerifyCodeRequest (*CheckEmailVerifyCodeResponse)(nil), // 5: user.v1.CheckEmailVerifyCodeResponse - (*User)(nil), // 6: user.v1.User + (*GetUserPublicKeyRequest)(nil), // 6: user.v1.GetUserPublicKeyRequest + (*GetUserPublicKeyResponse)(nil), // 7: user.v1.GetUserPublicKeyResponse + (*User)(nil), // 8: user.v1.User } var file_user_v1_user_service_proto_depIdxs = []int32{ - 6, // 0: user.v1.GetInfoResponse.info:type_name -> user.v1.User + 8, // 0: user.v1.GetInfoResponse.info:type_name -> user.v1.User 0, // 1: user.v1.UserService.GetInfo:input_type -> user.v1.GetInfoRequest 2, // 2: user.v1.UserService.SendEmailVerifyCode:input_type -> user.v1.SendEmailVerifyCodeRequest 4, // 3: user.v1.UserService.CheckEmailVerifyCode:input_type -> user.v1.CheckEmailVerifyCodeRequest - 1, // 4: user.v1.UserService.GetInfo:output_type -> user.v1.GetInfoResponse - 3, // 5: user.v1.UserService.SendEmailVerifyCode:output_type -> user.v1.SendEmailVerifyCodeResponse - 5, // 6: user.v1.UserService.CheckEmailVerifyCode:output_type -> user.v1.CheckEmailVerifyCodeResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type + 6, // 4: user.v1.UserService.GetUserPublicKey:input_type -> user.v1.GetUserPublicKeyRequest + 1, // 5: user.v1.UserService.GetInfo:output_type -> user.v1.GetInfoResponse + 3, // 6: user.v1.UserService.SendEmailVerifyCode:output_type -> user.v1.SendEmailVerifyCodeResponse + 5, // 7: user.v1.UserService.CheckEmailVerifyCode:output_type -> user.v1.CheckEmailVerifyCodeResponse + 7, // 8: user.v1.UserService.GetUserPublicKey:output_type -> user.v1.GetUserPublicKeyResponse + 5, // [5:9] is the sub-list for method output_type + 1, // [1:5] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -456,6 +568,30 @@ func file_user_v1_user_service_proto_init() { return nil } } + file_user_v1_user_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_v1_user_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserPublicKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -463,7 +599,7 @@ func file_user_v1_user_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_v1_user_service_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/user/v1/user_service.pb.gw.go b/gen/proto/user/v1/user_service.pb.gw.go index b97bf1d..d41e15a 100644 --- a/gen/proto/user/v1/user_service.pb.gw.go +++ b/gen/proto/user/v1/user_service.pb.gw.go @@ -117,6 +117,42 @@ func local_request_UserService_CheckEmailVerifyCode_0(ctx context.Context, marsh } +var ( + filter_UserService_GetUserPublicKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_UserService_GetUserPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserPublicKeyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserPublicKey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetUserPublicKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_UserService_GetUserPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserPublicKeyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserPublicKey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetUserPublicKey(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". // UnaryRPC :call UserServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -198,6 +234,31 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_UserService_GetUserPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/user.v1.UserService/GetUserPublicKey", runtime.WithHTTPPathPattern("/gapi/user/v1/public_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_UserService_GetUserPublicKey_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_UserService_GetUserPublicKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -305,6 +366,28 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_UserService_GetUserPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/user.v1.UserService/GetUserPublicKey", runtime.WithHTTPPathPattern("/gapi/user/v1/public_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_UserService_GetUserPublicKey_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_UserService_GetUserPublicKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -314,6 +397,8 @@ var ( pattern_UserService_SendEmailVerifyCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"gapi", "user", "v1", "verify", "email", "send"}, "")) pattern_UserService_CheckEmailVerifyCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"gapi", "user", "v1", "verify", "email", "check"}, "")) + + pattern_UserService_GetUserPublicKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "user", "v1", "public_key"}, "")) ) var ( @@ -322,4 +407,6 @@ var ( forward_UserService_SendEmailVerifyCode_0 = runtime.ForwardResponseMessage forward_UserService_CheckEmailVerifyCode_0 = runtime.ForwardResponseMessage + + forward_UserService_GetUserPublicKey_0 = runtime.ForwardResponseMessage ) diff --git a/gen/proto/user/v1/user_service.pb.ts b/gen/proto/user/v1/user_service.pb.ts index 01ae130..3cf6f54 100644 --- a/gen/proto/user/v1/user_service.pb.ts +++ b/gen/proto/user/v1/user_service.pb.ts @@ -28,6 +28,14 @@ export type CheckEmailVerifyCodeRequest = { export type CheckEmailVerifyCodeResponse = { } +export type GetUserPublicKeyRequest = { + id?: string +} + +export type GetUserPublicKeyResponse = { + publicKey?: string +} + export class UserService { static GetInfo(req: GetInfoRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/user/v1/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) @@ -38,4 +46,7 @@ export class UserService { static CheckEmailVerifyCode(req: CheckEmailVerifyCodeRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/user/v1/verify/email/check`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } + static GetUserPublicKey(req: GetUserPublicKeyRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/user/v1/public_key?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + } } \ No newline at end of file diff --git a/gen/proto/user/v1/user_service_grpc.pb.go b/gen/proto/user/v1/user_service_grpc.pb.go index 88a983d..4a6e820 100644 --- a/gen/proto/user/v1/user_service_grpc.pb.go +++ b/gen/proto/user/v1/user_service_grpc.pb.go @@ -22,6 +22,7 @@ const ( UserService_GetInfo_FullMethodName = "/user.v1.UserService/GetInfo" UserService_SendEmailVerifyCode_FullMethodName = "/user.v1.UserService/SendEmailVerifyCode" UserService_CheckEmailVerifyCode_FullMethodName = "/user.v1.UserService/CheckEmailVerifyCode" + UserService_GetUserPublicKey_FullMethodName = "/user.v1.UserService/GetUserPublicKey" ) // UserServiceClient is the client API for UserService service. @@ -31,6 +32,8 @@ type UserServiceClient interface { GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error) SendEmailVerifyCode(ctx context.Context, in *SendEmailVerifyCodeRequest, opts ...grpc.CallOption) (*SendEmailVerifyCodeResponse, error) CheckEmailVerifyCode(ctx context.Context, in *CheckEmailVerifyCodeRequest, opts ...grpc.CallOption) (*CheckEmailVerifyCodeResponse, error) + // 获取用户公钥 用于给用户发送端对端信息用(包括但不限于邀请用户加入组织时加密组织私钥) + GetUserPublicKey(ctx context.Context, in *GetUserPublicKeyRequest, opts ...grpc.CallOption) (*GetUserPublicKeyResponse, error) } type userServiceClient struct { @@ -68,6 +71,15 @@ func (c *userServiceClient) CheckEmailVerifyCode(ctx context.Context, in *CheckE return out, nil } +func (c *userServiceClient) GetUserPublicKey(ctx context.Context, in *GetUserPublicKeyRequest, opts ...grpc.CallOption) (*GetUserPublicKeyResponse, error) { + out := new(GetUserPublicKeyResponse) + err := c.cc.Invoke(ctx, UserService_GetUserPublicKey_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // UserServiceServer is the server API for UserService service. // All implementations must embed UnimplementedUserServiceServer // for forward compatibility @@ -75,6 +87,8 @@ type UserServiceServer interface { GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error) SendEmailVerifyCode(context.Context, *SendEmailVerifyCodeRequest) (*SendEmailVerifyCodeResponse, error) CheckEmailVerifyCode(context.Context, *CheckEmailVerifyCodeRequest) (*CheckEmailVerifyCodeResponse, error) + // 获取用户公钥 用于给用户发送端对端信息用(包括但不限于邀请用户加入组织时加密组织私钥) + GetUserPublicKey(context.Context, *GetUserPublicKeyRequest) (*GetUserPublicKeyResponse, error) mustEmbedUnimplementedUserServiceServer() } @@ -91,6 +105,9 @@ func (UnimplementedUserServiceServer) SendEmailVerifyCode(context.Context, *Send func (UnimplementedUserServiceServer) CheckEmailVerifyCode(context.Context, *CheckEmailVerifyCodeRequest) (*CheckEmailVerifyCodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckEmailVerifyCode not implemented") } +func (UnimplementedUserServiceServer) GetUserPublicKey(context.Context, *GetUserPublicKeyRequest) (*GetUserPublicKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserPublicKey not implemented") +} func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {} // UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. @@ -158,6 +175,24 @@ func _UserService_CheckEmailVerifyCode_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _UserService_GetUserPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).GetUserPublicKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_GetUserPublicKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).GetUserPublicKey(ctx, req.(*GetUserPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + // UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -177,6 +212,10 @@ var UserService_ServiceDesc = grpc.ServiceDesc{ MethodName: "CheckEmailVerifyCode", Handler: _UserService_CheckEmailVerifyCode_Handler, }, + { + MethodName: "GetUserPublicKey", + Handler: _UserService_GetUserPublicKey_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/v1/user_service.proto", diff --git a/proto/sync/v1/group.proto b/proto/sync/v1/group.proto deleted file mode 100644 index 72e0ca2..0000000 --- a/proto/sync/v1/group.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; -package sync.v1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1"; - -message Group { - GroupBasic groupBasic = 1; - repeated GroupKeyChain groupKeychain = 2; -} - -message GroupBasic { - string id = 1; - google.protobuf.Timestamp createdAt = 2; - google.protobuf.Timestamp updatedAt = 3; - google.protobuf.Timestamp deletedAt = 4; - string name = 5; - string description = 6; - string avatar = 7; - string uid = 8; // 创建者 - string publicKey = 9; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 -} - -message GroupKeyChain{ - string memberId = 11; - string privateKey = 12; -} diff --git a/proto/sync/v1/key_wallet.proto b/proto/sync/v1/key_wallet.proto new file mode 100644 index 0000000..f29ce07 --- /dev/null +++ b/proto/sync/v1/key_wallet.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package sync.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1"; + +message UserKeyWallet { + string uid = 1; + string gid = 2; + string encryptedGroupPrivateKey = 3; + google.protobuf.Timestamp createdAt = 4; + google.protobuf.Timestamp updatedAt = 5; + google.protobuf.Timestamp deletedAt = 6; +} \ No newline at end of file diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 560c391..6cbca62 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -3,65 +3,38 @@ package sync.v1; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; +import "team/v1/team.proto"; import "sync/v1/host.proto"; import "sync/v1/keychain.proto"; +import "sync/v1/key_wallet.proto"; import "sync/v1/known_hosts.proto"; -import "sync/v1/group.proto"; option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1"; service SyncService { // 拉取指定时间点之后的配置变动信息 rpc SyncConfig(SyncConfigRequest) returns (SyncConfigResponse) { - option (google.api.http) = {get: "/gapi/sync/v1/sync_config"}; + option (google.api.http) = {get: "/gapi/sync/v1/config"}; } // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 rpc UpdateConfig(UpdateConfigRequest) returns (UpdateConfigResponse) { option (google.api.http) = { - post:"/gapi/sync/v1/update_config" + post:"/gapi/sync/v1/config" body: "*" }; } - // 更新组信息,如果服务端密钥为空不允许修改,请先去创建密钥链。 - rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse) { - option (google.api.http) = { - post:"/gapi/sync/v1/update_group" - body: "*" - }; - } - // 通过UID获取所有组信息 + // 通过UID获取所有所在组变动信息 rpc SyncGroup(SyncGroupRequest) returns (SyncGroupResponse) { - option (google.api.http) = {get:"/gapi/sync/v1/sync_group"}; + option (google.api.http) = {get:"/gapi/sync/v1/group"}; } // 获取用户密钥对 rpc SyncUserKeyWallet(SyncUserKeyWalletRequest) returns (SyncUserKeyWalletResponse) { - option (google.api.http) = {get:"/gapi/sync/v1/sync_user_key_wallet"}; + option (google.api.http) = {get:"/gapi/sync/v1/key_wallet"}; } // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 rpc UpdateUserKeyWallet(UpdateUserKeyWalletRequest) returns (UpdateUserKeyWalletResponse) { option (google.api.http) = { - post:"/gapi/sync/v1/update_user_key_wallet" - body: "*" - }; - } - // 邀请用户加入,加密的密钥由邀请者那边去取被邀请者的公钥加密后存储 - rpc GroupInviteUser(GroupInviteUserRequest) returns (GroupInviteUserResponse){ - option (google.api.http) = { - post:"/gapi/sync/v1/group_invite_user" - body: "*" - }; - } - // 邀请用户加入 - rpc GroupInviteAccept(GroupInviteAcceptRequest) returns (GroupInviteAcceptResponse){ - option (google.api.http) = { - post:"/gapi/sync/v1/group_invite_accept" - body: "*" - }; - } - // 删除用户 - rpc GroupDeleteUser(GroupDeleteUserRequest) returns (GroupDeleteUserResponse){ - option (google.api.http) = { - post:"/gapi/sync/v1/group_delete_user" + post:"/gapi/sync/v1/key_wallet" body: "*" }; } @@ -100,13 +73,6 @@ message UpdateConfigResponse { } } -// UpdateGroup -message UpdateGroupRequest { - Group group = 1; -} - -message UpdateGroupResponse {} - // SyncGroup message SyncGroupRequest { google.protobuf.Timestamp after = 1; @@ -114,7 +80,7 @@ message SyncGroupRequest { message SyncGroupResponse { google.protobuf.Timestamp serverTime = 1; - repeated Group groups = 11; + repeated team.v1.Team groups = 11; } // SyncUserKeyWallet @@ -141,37 +107,3 @@ message UpdateUserKeyWalletResponse { string encryptedPrivateKey = 2; repeated UserKeyWallet userKeyWalletSet = 4; } - -message UserKeyWallet { - string uid = 1; - string gid = 2; - string encryptedGroupPrivateKey = 3; - google.protobuf.Timestamp createdAt = 4; - google.protobuf.Timestamp updatedAt = 5; - google.protobuf.Timestamp deletedAt = 6; -} - -// GroupInviteUser -message GroupInviteUserRequest { - string gid = 1; - string inviteeUid = 2; - string encryptedGroupPrivateKey = 4; -} - -message GroupInviteUserResponse{} - -// GroupInviteAccept -message GroupInviteAcceptRequest { - string gid = 1; - bool isAccept = 2; -} - -message GroupInviteAcceptResponse {} - -// GroupDeleteUser -message GroupDeleteUserRequest { - string userDeletedUid = 1; - string gid = 2; -} - -message GroupDeleteUserResponse {} \ No newline at end of file diff --git a/proto/team/v1/team.proto b/proto/team/v1/team.proto new file mode 100644 index 0000000..05bec63 --- /dev/null +++ b/proto/team/v1/team.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package team.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/team/v1;teamV1"; + +message Team { + string id = 1; + google.protobuf.Timestamp createdAt = 2; + google.protobuf.Timestamp updatedAt = 3; + google.protobuf.Timestamp deletedAt = 4; + string name = 5; + string description = 6; + string avatar = 7; + string uid = 8; // 创建者 + string publicKey = 9; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 +} diff --git a/proto/team/v1/team_service.proto b/proto/team/v1/team_service.proto new file mode 100644 index 0000000..8e9f640 --- /dev/null +++ b/proto/team/v1/team_service.proto @@ -0,0 +1,97 @@ +syntax = "proto3"; +package team.v1; + +import "google/api/annotations.proto"; +import "team/v1/team.proto"; + +option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/team/v1;teamV1"; + +service TeamService { + // 获取团队信息 + rpc GetTeam(GetTeamRequest) returns (GetTeamResponse) { + option (google.api.http) = { + get: "/gapi/team/v1/team" + }; + } + // 创建团队 + rpc CreateTeam(CreateTeamRequest) returns (CreateTeamResponse) { + option (google.api.http) = { + post: "/gapi/team/v1/team" + body: "*" + }; + } + // 更新团队信息 + rpc UpdateTeam(UpdateTeamRequest) returns (UpdateTeamResponse) { + option (google.api.http) = { + put: "/gapi/team/v1/team" + body: "*" + }; + } + // 删除团队 + rpc DeleteTeam(DeleteTeamRequest) returns (DeleteTeamResponse) { + option (google.api.http) = { + post: "/gapi/team/v1/team/remove" + body: "*" + }; + } + // 邀请成员加入团队 + rpc InviteMember(InviteMemberRequest) returns (InviteMemberResponse) { + option (google.api.http) = { + post: "/gapi/team/v1/team/member/invite" + body: "*" + }; + } + // 从团队中移除成员 + rpc RemoveMember(RemoveMemberRequest) returns (RemoveMemberResponse) { + option (google.api.http) = { + post: "/gapi/team/v1/team/member/remove" + body: "*" + }; + } +} + +message GetTeamRequest { + string id = 1; +} + +message GetTeamResponse { + Team team = 1; +} + +message CreateTeamRequest { + Team team = 1; +} + +message CreateTeamResponse { + Team team = 1; +} + +message UpdateTeamRequest { + Team team = 1; +} + +message UpdateTeamResponse { + Team team = 1; +} + +message DeleteTeamRequest { + string id = 1; +} + +message DeleteTeamResponse {} + +message InviteMemberRequest { + string teamId = 1; + string userId = 2; + string encryptedGroupPrivateKey = 3; // 使用受邀请用户的公钥加密后的团队私钥 +} + +message InviteMemberResponse {} + +message RemoveMemberRequest { + string teamId = 1; + string userId = 2; +} + +message RemoveMemberResponse {} + diff --git a/proto/user/v1/user_service.proto b/proto/user/v1/user_service.proto index 470af95..73aecaf 100644 --- a/proto/user/v1/user_service.proto +++ b/proto/user/v1/user_service.proto @@ -23,6 +23,12 @@ service UserService { body: "*" }; } + // 获取用户公钥 用于给用户发送端对端信息用(包括但不限于邀请用户加入组织时加密组织私钥) + rpc GetUserPublicKey(GetUserPublicKeyRequest) returns (GetUserPublicKeyResponse) { + option (google.api.http) = { + get: "/gapi/user/v1/public_key" + }; + } } message GetInfoRequest {} @@ -42,4 +48,12 @@ message CheckEmailVerifyCodeRequest { string code = 2; } -message CheckEmailVerifyCodeResponse {} \ No newline at end of file +message CheckEmailVerifyCodeResponse {} + +message GetUserPublicKeyRequest { + string id = 1; // user id 留空则为默认id +} + +message GetUserPublicKeyResponse { + string publicKey = 1; +} From 857accfb2e4b5372836362dc614be5289a81e0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=88=90=E9=94=B4?= Date: Wed, 22 Nov 2023 10:36:40 +0800 Subject: [PATCH 41/46] feat: add invite process --- gen/openapi/team/v1/team_service.swagger.json | 44 ++++ gen/proto/team/v1/team_service.pb.go | 249 +++++++++++++----- gen/proto/team/v1/team_service.pb.gw.go | 85 ++++++ gen/proto/team/v1/team_service.pb.ts | 10 + gen/proto/team/v1/team_service_grpc.pb.go | 39 +++ proto/team/v1/team_service.proto | 12 + 6 files changed, 377 insertions(+), 62 deletions(-) diff --git a/gen/openapi/team/v1/team_service.swagger.json b/gen/openapi/team/v1/team_service.swagger.json index bf87f4f..edec4e7 100644 --- a/gen/openapi/team/v1/team_service.swagger.json +++ b/gen/openapi/team/v1/team_service.swagger.json @@ -109,6 +109,39 @@ ] } }, + "/gapi/team/v1/team/member/accept": { + "post": { + "summary": "接受邀请加入团队", + "operationId": "TeamService_AcceptInvite", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AcceptInviteResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AcceptInviteRequest" + } + } + ], + "tags": [ + "TeamService" + ] + } + }, "/gapi/team/v1/team/member/invite": { "post": { "summary": "邀请成员加入团队", @@ -238,6 +271,17 @@ } } }, + "v1AcceptInviteRequest": { + "type": "object", + "properties": { + "inviteId": { + "type": "string" + } + } + }, + "v1AcceptInviteResponse": { + "type": "object" + }, "v1CreateTeamRequest": { "type": "object", "properties": { diff --git a/gen/proto/team/v1/team_service.pb.go b/gen/proto/team/v1/team_service.pb.go index c83b8cc..f5140ae 100644 --- a/gen/proto/team/v1/team_service.pb.go +++ b/gen/proto/team/v1/team_service.pb.go @@ -582,6 +582,91 @@ func (*RemoveMemberResponse) Descriptor() ([]byte, []int) { return file_team_v1_team_service_proto_rawDescGZIP(), []int{11} } +type AcceptInviteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InviteId string `protobuf:"bytes,1,opt,name=inviteId,proto3" json:"inviteId,omitempty"` +} + +func (x *AcceptInviteRequest) Reset() { + *x = AcceptInviteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AcceptInviteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcceptInviteRequest) ProtoMessage() {} + +func (x *AcceptInviteRequest) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[12] + 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 AcceptInviteRequest.ProtoReflect.Descriptor instead. +func (*AcceptInviteRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{12} +} + +func (x *AcceptInviteRequest) GetInviteId() string { + if x != nil { + return x.InviteId + } + return "" +} + +type AcceptInviteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AcceptInviteResponse) Reset() { + *x = AcceptInviteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AcceptInviteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcceptInviteResponse) ProtoMessage() {} + +func (x *AcceptInviteResponse) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[13] + 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 AcceptInviteResponse.ProtoReflect.Descriptor instead. +func (*AcceptInviteResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{13} +} + var File_team_v1_team_service_proto protoreflect.FileDescriptor var file_team_v1_team_service_proto_rawDesc = []byte{ @@ -629,53 +714,65 @@ var file_team_v1_team_service_proto_rawDesc = []byte{ 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x94, 0x05, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, - 0x61, 0x6d, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, - 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0x8e, 0x06, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x2e, + 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, + 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, + 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x17, 0x3a, 0x01, 0x2a, 0x1a, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, + 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, - 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, - 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, - 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, - 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x1a, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x6b, 0x0a, - 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, - 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, - 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, - 0x65, 0x61, 0x6d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x49, 0x6e, - 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, - 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, - 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, - 0x76, 0x69, 0x74, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, - 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x3c, - 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, - 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, - 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, + 0x78, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, + 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x41, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, + 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, + 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, + 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -690,7 +787,7 @@ func file_team_v1_team_service_proto_rawDescGZIP() []byte { return file_team_v1_team_service_proto_rawDescData } -var file_team_v1_team_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_team_v1_team_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_team_v1_team_service_proto_goTypes = []interface{}{ (*GetTeamRequest)(nil), // 0: team.v1.GetTeamRequest (*GetTeamResponse)(nil), // 1: team.v1.GetTeamResponse @@ -704,28 +801,32 @@ var file_team_v1_team_service_proto_goTypes = []interface{}{ (*InviteMemberResponse)(nil), // 9: team.v1.InviteMemberResponse (*RemoveMemberRequest)(nil), // 10: team.v1.RemoveMemberRequest (*RemoveMemberResponse)(nil), // 11: team.v1.RemoveMemberResponse - (*Team)(nil), // 12: team.v1.Team + (*AcceptInviteRequest)(nil), // 12: team.v1.AcceptInviteRequest + (*AcceptInviteResponse)(nil), // 13: team.v1.AcceptInviteResponse + (*Team)(nil), // 14: team.v1.Team } var file_team_v1_team_service_proto_depIdxs = []int32{ - 12, // 0: team.v1.GetTeamResponse.team:type_name -> team.v1.Team - 12, // 1: team.v1.CreateTeamRequest.team:type_name -> team.v1.Team - 12, // 2: team.v1.CreateTeamResponse.team:type_name -> team.v1.Team - 12, // 3: team.v1.UpdateTeamRequest.team:type_name -> team.v1.Team - 12, // 4: team.v1.UpdateTeamResponse.team:type_name -> team.v1.Team + 14, // 0: team.v1.GetTeamResponse.team:type_name -> team.v1.Team + 14, // 1: team.v1.CreateTeamRequest.team:type_name -> team.v1.Team + 14, // 2: team.v1.CreateTeamResponse.team:type_name -> team.v1.Team + 14, // 3: team.v1.UpdateTeamRequest.team:type_name -> team.v1.Team + 14, // 4: team.v1.UpdateTeamResponse.team:type_name -> team.v1.Team 0, // 5: team.v1.TeamService.GetTeam:input_type -> team.v1.GetTeamRequest 2, // 6: team.v1.TeamService.CreateTeam:input_type -> team.v1.CreateTeamRequest 4, // 7: team.v1.TeamService.UpdateTeam:input_type -> team.v1.UpdateTeamRequest 6, // 8: team.v1.TeamService.DeleteTeam:input_type -> team.v1.DeleteTeamRequest 8, // 9: team.v1.TeamService.InviteMember:input_type -> team.v1.InviteMemberRequest 10, // 10: team.v1.TeamService.RemoveMember:input_type -> team.v1.RemoveMemberRequest - 1, // 11: team.v1.TeamService.GetTeam:output_type -> team.v1.GetTeamResponse - 3, // 12: team.v1.TeamService.CreateTeam:output_type -> team.v1.CreateTeamResponse - 5, // 13: team.v1.TeamService.UpdateTeam:output_type -> team.v1.UpdateTeamResponse - 7, // 14: team.v1.TeamService.DeleteTeam:output_type -> team.v1.DeleteTeamResponse - 9, // 15: team.v1.TeamService.InviteMember:output_type -> team.v1.InviteMemberResponse - 11, // 16: team.v1.TeamService.RemoveMember:output_type -> team.v1.RemoveMemberResponse - 11, // [11:17] is the sub-list for method output_type - 5, // [5:11] is the sub-list for method input_type + 12, // 11: team.v1.TeamService.AcceptInvite:input_type -> team.v1.AcceptInviteRequest + 1, // 12: team.v1.TeamService.GetTeam:output_type -> team.v1.GetTeamResponse + 3, // 13: team.v1.TeamService.CreateTeam:output_type -> team.v1.CreateTeamResponse + 5, // 14: team.v1.TeamService.UpdateTeam:output_type -> team.v1.UpdateTeamResponse + 7, // 15: team.v1.TeamService.DeleteTeam:output_type -> team.v1.DeleteTeamResponse + 9, // 16: team.v1.TeamService.InviteMember:output_type -> team.v1.InviteMemberResponse + 11, // 17: team.v1.TeamService.RemoveMember:output_type -> team.v1.RemoveMemberResponse + 13, // 18: team.v1.TeamService.AcceptInvite:output_type -> team.v1.AcceptInviteResponse + 12, // [12:19] is the sub-list for method output_type + 5, // [5:12] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name @@ -882,6 +983,30 @@ func file_team_v1_team_service_proto_init() { return nil } } + file_team_v1_team_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcceptInviteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcceptInviteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -889,7 +1014,7 @@ func file_team_v1_team_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_team_v1_team_service_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/team/v1/team_service.pb.gw.go b/gen/proto/team/v1/team_service.pb.gw.go index a43e18d..2afb2b6 100644 --- a/gen/proto/team/v1/team_service.pb.gw.go +++ b/gen/proto/team/v1/team_service.pb.gw.go @@ -237,6 +237,40 @@ func local_request_TeamService_RemoveMember_0(ctx context.Context, marshaler run } +func request_TeamService_AcceptInvite_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AcceptInviteRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AcceptInvite(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TeamService_AcceptInvite_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AcceptInviteRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AcceptInvite(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterTeamServiceHandlerServer registers the http handlers for service TeamService to "mux". // UnaryRPC :call TeamServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -393,6 +427,31 @@ func RegisterTeamServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_TeamService_AcceptInvite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/team.v1.TeamService/AcceptInvite", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/accept")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TeamService_AcceptInvite_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_AcceptInvite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -566,6 +625,28 @@ func RegisterTeamServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("POST", pattern_TeamService_AcceptInvite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/team.v1.TeamService/AcceptInvite", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/accept")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TeamService_AcceptInvite_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_AcceptInvite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -581,6 +662,8 @@ var ( pattern_TeamService_InviteMember_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"gapi", "team", "v1", "member", "invite"}, "")) pattern_TeamService_RemoveMember_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"gapi", "team", "v1", "member", "remove"}, "")) + + pattern_TeamService_AcceptInvite_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"gapi", "team", "v1", "member", "accept"}, "")) ) var ( @@ -595,4 +678,6 @@ var ( forward_TeamService_InviteMember_0 = runtime.ForwardResponseMessage forward_TeamService_RemoveMember_0 = runtime.ForwardResponseMessage + + forward_TeamService_AcceptInvite_0 = runtime.ForwardResponseMessage ) diff --git a/gen/proto/team/v1/team_service.pb.ts b/gen/proto/team/v1/team_service.pb.ts index ff9e88f..f0d2b78 100644 --- a/gen/proto/team/v1/team_service.pb.ts +++ b/gen/proto/team/v1/team_service.pb.ts @@ -54,6 +54,13 @@ export type RemoveMemberRequest = { export type RemoveMemberResponse = { } +export type AcceptInviteRequest = { + inviteId?: string +} + +export type AcceptInviteResponse = { +} + export class TeamService { static GetTeam(req: GetTeamRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/team/v1/team?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) @@ -73,4 +80,7 @@ export class TeamService { static RemoveMember(req: RemoveMemberRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/team/v1/team/member/remove`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } + static AcceptInvite(req: AcceptInviteRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/team/v1/team/member/accept`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } } \ No newline at end of file diff --git a/gen/proto/team/v1/team_service_grpc.pb.go b/gen/proto/team/v1/team_service_grpc.pb.go index d88f6a6..ddecb2d 100644 --- a/gen/proto/team/v1/team_service_grpc.pb.go +++ b/gen/proto/team/v1/team_service_grpc.pb.go @@ -25,6 +25,7 @@ const ( TeamService_DeleteTeam_FullMethodName = "/team.v1.TeamService/DeleteTeam" TeamService_InviteMember_FullMethodName = "/team.v1.TeamService/InviteMember" TeamService_RemoveMember_FullMethodName = "/team.v1.TeamService/RemoveMember" + TeamService_AcceptInvite_FullMethodName = "/team.v1.TeamService/AcceptInvite" ) // TeamServiceClient is the client API for TeamService service. @@ -43,6 +44,8 @@ type TeamServiceClient interface { InviteMember(ctx context.Context, in *InviteMemberRequest, opts ...grpc.CallOption) (*InviteMemberResponse, error) // 从团队中移除成员 RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...grpc.CallOption) (*RemoveMemberResponse, error) + // 接受邀请加入团队 + AcceptInvite(ctx context.Context, in *AcceptInviteRequest, opts ...grpc.CallOption) (*AcceptInviteResponse, error) } type teamServiceClient struct { @@ -107,6 +110,15 @@ func (c *teamServiceClient) RemoveMember(ctx context.Context, in *RemoveMemberRe return out, nil } +func (c *teamServiceClient) AcceptInvite(ctx context.Context, in *AcceptInviteRequest, opts ...grpc.CallOption) (*AcceptInviteResponse, error) { + out := new(AcceptInviteResponse) + err := c.cc.Invoke(ctx, TeamService_AcceptInvite_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // TeamServiceServer is the server API for TeamService service. // All implementations must embed UnimplementedTeamServiceServer // for forward compatibility @@ -123,6 +135,8 @@ type TeamServiceServer interface { InviteMember(context.Context, *InviteMemberRequest) (*InviteMemberResponse, error) // 从团队中移除成员 RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error) + // 接受邀请加入团队 + AcceptInvite(context.Context, *AcceptInviteRequest) (*AcceptInviteResponse, error) mustEmbedUnimplementedTeamServiceServer() } @@ -148,6 +162,9 @@ func (UnimplementedTeamServiceServer) InviteMember(context.Context, *InviteMembe func (UnimplementedTeamServiceServer) RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveMember not implemented") } +func (UnimplementedTeamServiceServer) AcceptInvite(context.Context, *AcceptInviteRequest) (*AcceptInviteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AcceptInvite not implemented") +} func (UnimplementedTeamServiceServer) mustEmbedUnimplementedTeamServiceServer() {} // UnsafeTeamServiceServer may be embedded to opt out of forward compatibility for this service. @@ -269,6 +286,24 @@ func _TeamService_RemoveMember_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _TeamService_AcceptInvite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AcceptInviteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServiceServer).AcceptInvite(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TeamService_AcceptInvite_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServiceServer).AcceptInvite(ctx, req.(*AcceptInviteRequest)) + } + return interceptor(ctx, in, info, handler) +} + // TeamService_ServiceDesc is the grpc.ServiceDesc for TeamService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -300,6 +335,10 @@ var TeamService_ServiceDesc = grpc.ServiceDesc{ MethodName: "RemoveMember", Handler: _TeamService_RemoveMember_Handler, }, + { + MethodName: "AcceptInvite", + Handler: _TeamService_AcceptInvite_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "team/v1/team_service.proto", diff --git a/proto/team/v1/team_service.proto b/proto/team/v1/team_service.proto index 8e9f640..7973884 100644 --- a/proto/team/v1/team_service.proto +++ b/proto/team/v1/team_service.proto @@ -48,6 +48,13 @@ service TeamService { body: "*" }; } + // 接受邀请加入团队 + rpc AcceptInvite(AcceptInviteRequest) returns (AcceptInviteResponse) { + option (google.api.http) = { + post: "/gapi/team/v1/team/member/accept" + body: "*" + }; + } } message GetTeamRequest { @@ -95,3 +102,8 @@ message RemoveMemberRequest { message RemoveMemberResponse {} +message AcceptInviteRequest { + string inviteId = 1; +} + +message AcceptInviteResponse {} From c53358e7ef8f7cf290d7649b93517b25f74a5fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=88=90=E9=94=B4?= Date: Wed, 22 Nov 2023 14:26:10 +0800 Subject: [PATCH 42/46] update: rename group to team --- gen/openapi/sync/v1/sync_service.swagger.json | 66 ++-- gen/openapi/team/v1/team_service.swagger.json | 2 +- gen/proto/sync/v1/key_wallet.pb.go | 58 +-- gen/proto/sync/v1/key_wallet.pb.ts | 2 +- gen/proto/sync/v1/sync_service.pb.go | 355 +++++++++--------- gen/proto/sync/v1/sync_service.pb.gw.go | 38 +- gen/proto/sync/v1/sync_service.pb.ts | 14 +- gen/proto/sync/v1/sync_service_grpc.pb.go | 30 +- gen/proto/team/v1/team_service.pb.go | 158 ++++---- gen/proto/team/v1/team_service.pb.ts | 2 +- proto/sync/v1/key_wallet.proto | 2 +- proto/sync/v1/sync_service.proto | 16 +- proto/team/v1/team_service.proto | 2 +- 13 files changed, 372 insertions(+), 373 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index c8f5547..f3c2bbc 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -44,7 +44,7 @@ "format": "date-time" }, { - "name": "groupId", + "name": "teamId", "in": "query", "required": false, "type": "string" @@ -86,15 +86,15 @@ ] } }, - "/gapi/sync/v1/group": { + "/gapi/sync/v1/key_wallet": { "get": { - "summary": "通过UID获取所有所在组变动信息", - "operationId": "SyncService_SyncGroup", + "summary": "获取用户密钥对", + "operationId": "SyncService_SyncUserKeyWallet", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SyncGroupResponse" + "$ref": "#/definitions/v1SyncUserKeyWalletResponse" } }, "default": { @@ -107,6 +107,7 @@ "parameters": [ { "name": "after", + "description": "获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息", "in": "query", "required": false, "type": "string", @@ -116,17 +117,15 @@ "tags": [ "SyncService" ] - } - }, - "/gapi/sync/v1/key_wallet": { - "get": { - "summary": "获取用户密钥对", - "operationId": "SyncService_SyncUserKeyWallet", + }, + "post": { + "summary": "修改用户密钥对,修改的时候所有相关组的加密密钥均要替换", + "operationId": "SyncService_UpdateUserKeyWallet", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SyncUserKeyWalletResponse" + "$ref": "#/definitions/v1UpdateUserKeyWalletResponse" } }, "default": { @@ -138,26 +137,28 @@ }, "parameters": [ { - "name": "after", - "description": "获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateUserKeyWalletRequest" + } } ], "tags": [ "SyncService" ] - }, - "post": { - "summary": "修改用户密钥对,修改的时候所有相关组的加密密钥均要替换", - "operationId": "SyncService_UpdateUserKeyWallet", + } + }, + "/gapi/sync/v1/team": { + "get": { + "summary": "通过UID获取所有所在组变动信息", + "operationId": "SyncService_SyncTeam", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateUserKeyWalletResponse" + "$ref": "#/definitions/v1SyncTeamResponse" } }, "default": { @@ -169,12 +170,11 @@ }, "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1UpdateUserKeyWalletRequest" - } + "name": "after", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" } ], "tags": [ @@ -424,14 +424,14 @@ } } }, - "v1SyncGroupResponse": { + "v1SyncTeamResponse": { "type": "object", "properties": { "serverTime": { "type": "string", "format": "date-time" }, - "groups": { + "teams": { "type": "array", "items": { "type": "object", @@ -503,7 +503,7 @@ "v1UpdateConfigRequest": { "type": "object", "properties": { - "groupId": { + "teamId": { "type": "string" }, "host": { @@ -584,7 +584,7 @@ "gid": { "type": "string" }, - "encryptedGroupPrivateKey": { + "encryptedTeamPrivateKey": { "type": "string" }, "createdAt": { diff --git a/gen/openapi/team/v1/team_service.swagger.json b/gen/openapi/team/v1/team_service.swagger.json index edec4e7..0103b1d 100644 --- a/gen/openapi/team/v1/team_service.swagger.json +++ b/gen/openapi/team/v1/team_service.swagger.json @@ -326,7 +326,7 @@ "userId": { "type": "string" }, - "encryptedGroupPrivateKey": { + "encryptedTeamPrivateKey": { "type": "string", "title": "使用受邀请用户的公钥加密后的团队私钥" } diff --git a/gen/proto/sync/v1/key_wallet.pb.go b/gen/proto/sync/v1/key_wallet.pb.go index ce8fe47..564e262 100644 --- a/gen/proto/sync/v1/key_wallet.pb.go +++ b/gen/proto/sync/v1/key_wallet.pb.go @@ -26,12 +26,12 @@ type UserKeyWallet struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` - EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` - DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + EncryptedTeamPrivateKey string `protobuf:"bytes,3,opt,name=encryptedTeamPrivateKey,proto3" json:"encryptedTeamPrivateKey,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` } func (x *UserKeyWallet) Reset() { @@ -80,9 +80,9 @@ func (x *UserKeyWallet) GetGid() string { return "" } -func (x *UserKeyWallet) GetEncryptedGroupPrivateKey() string { +func (x *UserKeyWallet) GetEncryptedTeamPrivateKey() string { if x != nil { - return x.EncryptedGroupPrivateKey + return x.EncryptedTeamPrivateKey } return "" } @@ -115,29 +115,29 @@ var file_sync_v1_key_wallet_proto_rawDesc = []byte{ 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x38, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, - 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, + 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, + 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/sync/v1/key_wallet.pb.ts b/gen/proto/sync/v1/key_wallet.pb.ts index c68113c..89c193c 100644 --- a/gen/proto/sync/v1/key_wallet.pb.ts +++ b/gen/proto/sync/v1/key_wallet.pb.ts @@ -8,7 +8,7 @@ import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" export type UserKeyWallet = { uid?: string gid?: string - encryptedGroupPrivateKey?: string + encryptedTeamPrivateKey?: string createdAt?: GoogleProtobufTimestamp.Timestamp updatedAt?: GoogleProtobufTimestamp.Timestamp deletedAt?: GoogleProtobufTimestamp.Timestamp diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 3193682..44c43c2 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -29,8 +29,8 @@ type SyncConfigRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 - GroupId string `protobuf:"bytes,2,opt,name=groupId,proto3" json:"groupId,omitempty"` + After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 + TeamId string `protobuf:"bytes,2,opt,name=teamId,proto3" json:"teamId,omitempty"` } func (x *SyncConfigRequest) Reset() { @@ -72,9 +72,9 @@ func (x *SyncConfigRequest) GetAfter() *timestamppb.Timestamp { return nil } -func (x *SyncConfigRequest) GetGroupId() string { +func (x *SyncConfigRequest) GetTeamId() string { if x != nil { - return x.GroupId + return x.TeamId } return "" } @@ -164,7 +164,7 @@ type UpdateConfigRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - GroupId string `protobuf:"bytes,2,opt,name=groupId,proto3" json:"groupId,omitempty"` + TeamId string `protobuf:"bytes,2,opt,name=teamId,proto3" json:"teamId,omitempty"` // Types that are assignable to Data: // // *UpdateConfigRequest_Host @@ -206,9 +206,9 @@ func (*UpdateConfigRequest) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{2} } -func (x *UpdateConfigRequest) GetGroupId() string { +func (x *UpdateConfigRequest) GetTeamId() string { if x != nil { - return x.GroupId + return x.TeamId } return "" } @@ -385,8 +385,8 @@ func (*UpdateConfigResponse_SshKey) isUpdateConfigResponse_Data() {} func (*UpdateConfigResponse_Identity) isUpdateConfigResponse_Data() {} -// SyncGroup -type SyncGroupRequest struct { +// SyncTeam +type SyncTeamRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -394,8 +394,8 @@ type SyncGroupRequest struct { After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` } -func (x *SyncGroupRequest) Reset() { - *x = SyncGroupRequest{} +func (x *SyncTeamRequest) Reset() { + *x = SyncTeamRequest{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -403,13 +403,13 @@ func (x *SyncGroupRequest) Reset() { } } -func (x *SyncGroupRequest) String() string { +func (x *SyncTeamRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncGroupRequest) ProtoMessage() {} +func (*SyncTeamRequest) ProtoMessage() {} -func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { +func (x *SyncTeamRequest) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -421,29 +421,29 @@ func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SyncGroupRequest.ProtoReflect.Descriptor instead. -func (*SyncGroupRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncTeamRequest.ProtoReflect.Descriptor instead. +func (*SyncTeamRequest) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{4} } -func (x *SyncGroupRequest) GetAfter() *timestamppb.Timestamp { +func (x *SyncTeamRequest) GetAfter() *timestamppb.Timestamp { if x != nil { return x.After } return nil } -type SyncGroupResponse struct { +type SyncTeamResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=serverTime,proto3" json:"serverTime,omitempty"` - Groups []*v1.Team `protobuf:"bytes,11,rep,name=groups,proto3" json:"groups,omitempty"` + Teams []*v1.Team `protobuf:"bytes,11,rep,name=teams,proto3" json:"teams,omitempty"` } -func (x *SyncGroupResponse) Reset() { - *x = SyncGroupResponse{} +func (x *SyncTeamResponse) Reset() { + *x = SyncTeamResponse{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -451,13 +451,13 @@ func (x *SyncGroupResponse) Reset() { } } -func (x *SyncGroupResponse) String() string { +func (x *SyncTeamResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncGroupResponse) ProtoMessage() {} +func (*SyncTeamResponse) ProtoMessage() {} -func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { +func (x *SyncTeamResponse) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -469,21 +469,21 @@ func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SyncGroupResponse.ProtoReflect.Descriptor instead. -func (*SyncGroupResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncTeamResponse.ProtoReflect.Descriptor instead. +func (*SyncTeamResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{5} } -func (x *SyncGroupResponse) GetServerTime() *timestamppb.Timestamp { +func (x *SyncTeamResponse) GetServerTime() *timestamppb.Timestamp { if x != nil { return x.ServerTime } return nil } -func (x *SyncGroupResponse) GetGroups() []*v1.Team { +func (x *SyncTeamResponse) GetTeams() []*v1.Team { if x != nil { - return x.Groups + return x.Teams } return nil } @@ -750,154 +750,153 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x11, 0x53, 0x79, 0x6e, + 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, - 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x53, - 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x53, 0x79, 0x6e, + 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x07, + 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x07, 0x68, 0x6f, + 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, + 0x73, 0x74, 0x53, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x52, + 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2d, 0x0a, + 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, + 0x79, 0x52, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x0b, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, + 0x74, 0x22, 0xea, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, + 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, + 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, + 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, + 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x73, + 0x68, 0x4b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd3, + 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x09, + 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, + 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, + 0x12, 0x29, 0x0a, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, + 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x43, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x65, 0x61, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, - 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x07, - 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, - 0x74, 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, - 0x2d, 0x0a, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, - 0x4b, 0x65, 0x79, 0x52, 0x09, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x33, - 0x0a, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x18, 0x0e, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x53, 0x65, 0x74, 0x22, 0xec, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, - 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x09, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x29, - 0x0a, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, - 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, - 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0xd3, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x68, - 0x6f, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, - 0x12, 0x32, 0x0a, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x6e, - 0x6f, 0x77, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x48, 0x6f, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x73, 0x68, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x06, 0x73, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, - 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x44, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, - 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x76, - 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x25, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x06, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x4c, 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, - 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0x73, 0x0a, 0x10, 0x53, 0x79, 0x6e, + 0x63, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, + 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, - 0x66, 0x74, 0x65, 0x72, 0x22, 0xeb, 0x01, 0x0a, 0x19, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x65, 0x61, + 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x22, 0x4c, + 0x0a, 0x18, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, + 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0xeb, 0x01, 0x0a, + 0x19, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x1a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, + 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb1, 0x01, + 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, + 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, + 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, + 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, + 0x74, 0x32, 0xc3, 0x04, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x63, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x79, + 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, + 0x12, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6c, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x65, 0x61, 0x6d, + 0x12, 0x18, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, + 0x6d, 0x12, 0x7c, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, + 0x85, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, + 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, - 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, - 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, - 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, - 0x65, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, - 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x32, 0xc7, 0x04, 0x0a, 0x0b, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x0a, 0x53, 0x79, 0x6e, - 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6c, - 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, - 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, - 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x09, - 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x7c, 0x0a, - 0x11, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1a, 0x12, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, - 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x85, 0x01, 0x0a, 0x13, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, - 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, + 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, + 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, + 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -918,8 +917,8 @@ var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SyncConfigResponse)(nil), // 1: sync.v1.SyncConfigResponse (*UpdateConfigRequest)(nil), // 2: sync.v1.UpdateConfigRequest (*UpdateConfigResponse)(nil), // 3: sync.v1.UpdateConfigResponse - (*SyncGroupRequest)(nil), // 4: sync.v1.SyncGroupRequest - (*SyncGroupResponse)(nil), // 5: sync.v1.SyncGroupResponse + (*SyncTeamRequest)(nil), // 4: sync.v1.SyncTeamRequest + (*SyncTeamResponse)(nil), // 5: sync.v1.SyncTeamResponse (*SyncUserKeyWalletRequest)(nil), // 6: sync.v1.SyncUserKeyWalletRequest (*SyncUserKeyWalletResponse)(nil), // 7: sync.v1.SyncUserKeyWalletResponse (*UpdateUserKeyWalletRequest)(nil), // 8: sync.v1.UpdateUserKeyWalletRequest @@ -947,9 +946,9 @@ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 12, // 11: sync.v1.UpdateConfigResponse.knownHost:type_name -> sync.v1.KnownHost 13, // 12: sync.v1.UpdateConfigResponse.sshKey:type_name -> sync.v1.SshKey 14, // 13: sync.v1.UpdateConfigResponse.identity:type_name -> sync.v1.Identity - 10, // 14: sync.v1.SyncGroupRequest.after:type_name -> google.protobuf.Timestamp - 10, // 15: sync.v1.SyncGroupResponse.serverTime:type_name -> google.protobuf.Timestamp - 15, // 16: sync.v1.SyncGroupResponse.groups:type_name -> team.v1.Team + 10, // 14: sync.v1.SyncTeamRequest.after:type_name -> google.protobuf.Timestamp + 10, // 15: sync.v1.SyncTeamResponse.serverTime:type_name -> google.protobuf.Timestamp + 15, // 16: sync.v1.SyncTeamResponse.teams:type_name -> team.v1.Team 10, // 17: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp 10, // 18: sync.v1.SyncUserKeyWalletResponse.serverTime:type_name -> google.protobuf.Timestamp 16, // 19: sync.v1.SyncUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet @@ -957,12 +956,12 @@ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 16, // 21: sync.v1.UpdateUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet 0, // 22: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest 2, // 23: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest - 4, // 24: sync.v1.SyncService.SyncGroup:input_type -> sync.v1.SyncGroupRequest + 4, // 24: sync.v1.SyncService.SyncTeam:input_type -> sync.v1.SyncTeamRequest 6, // 25: sync.v1.SyncService.SyncUserKeyWallet:input_type -> sync.v1.SyncUserKeyWalletRequest 8, // 26: sync.v1.SyncService.UpdateUserKeyWallet:input_type -> sync.v1.UpdateUserKeyWalletRequest 1, // 27: sync.v1.SyncService.SyncConfig:output_type -> sync.v1.SyncConfigResponse 3, // 28: sync.v1.SyncService.UpdateConfig:output_type -> sync.v1.UpdateConfigResponse - 5, // 29: sync.v1.SyncService.SyncGroup:output_type -> sync.v1.SyncGroupResponse + 5, // 29: sync.v1.SyncService.SyncTeam:output_type -> sync.v1.SyncTeamResponse 7, // 30: sync.v1.SyncService.SyncUserKeyWallet:output_type -> sync.v1.SyncUserKeyWalletResponse 9, // 31: sync.v1.SyncService.UpdateUserKeyWallet:output_type -> sync.v1.UpdateUserKeyWalletResponse 27, // [27:32] is the sub-list for method output_type @@ -1031,7 +1030,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncGroupRequest); i { + switch v := v.(*SyncTeamRequest); i { case 0: return &v.state case 1: @@ -1043,7 +1042,7 @@ func file_sync_v1_sync_service_proto_init() { } } file_sync_v1_sync_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncGroupResponse); i { + switch v := v.(*SyncTeamResponse); i { case 0: return &v.state case 1: diff --git a/gen/proto/sync/v1/sync_service.pb.gw.go b/gen/proto/sync/v1/sync_service.pb.gw.go index 1c6f13f..6be4f5d 100644 --- a/gen/proto/sync/v1/sync_service.pb.gw.go +++ b/gen/proto/sync/v1/sync_service.pb.gw.go @@ -102,37 +102,37 @@ func local_request_SyncService_UpdateConfig_0(ctx context.Context, marshaler run } var ( - filter_SyncService_SyncGroup_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_SyncService_SyncTeam_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_SyncService_SyncGroup_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncGroupRequest +func request_SyncService_SyncTeam_0(ctx context.Context, marshaler runtime.Marshaler, client SyncServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncTeamRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_SyncGroup_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_SyncTeam_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SyncGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.SyncTeam(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SyncService_SyncGroup_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SyncGroupRequest +func local_request_SyncService_SyncTeam_0(ctx context.Context, marshaler runtime.Marshaler, server SyncServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SyncTeamRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_SyncGroup_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SyncService_SyncTeam_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SyncGroup(ctx, &protoReq) + msg, err := server.SyncTeam(ctx, &protoReq) return msg, metadata, err } @@ -263,7 +263,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_SyncService_SyncGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -271,12 +271,12 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/group")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/sync.v1.SyncService/SyncTeam", runtime.WithHTTPPathPattern("/gapi/sync/v1/team")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SyncService_SyncGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SyncService_SyncTeam_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -284,7 +284,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_SyncGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -423,25 +423,25 @@ func RegisterSyncServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_SyncService_SyncGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SyncService_SyncTeam_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/group")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/sync.v1.SyncService/SyncTeam", runtime.WithHTTPPathPattern("/gapi/sync/v1/team")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SyncService_SyncGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SyncService_SyncTeam_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyncService_SyncGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncTeam_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -497,7 +497,7 @@ var ( pattern_SyncService_UpdateConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "config"}, "")) - pattern_SyncService_SyncGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "group"}, "")) + pattern_SyncService_SyncTeam_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "team"}, "")) pattern_SyncService_SyncUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "key_wallet"}, "")) @@ -509,7 +509,7 @@ var ( forward_SyncService_UpdateConfig_0 = runtime.ForwardResponseMessage - forward_SyncService_SyncGroup_0 = runtime.ForwardResponseMessage + forward_SyncService_SyncTeam_0 = runtime.ForwardResponseMessage forward_SyncService_SyncUserKeyWallet_0 = runtime.ForwardResponseMessage diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index fe26f5f..5af9399 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -22,7 +22,7 @@ type OneOf = : never); export type SyncConfigRequest = { after?: GoogleProtobufTimestamp.Timestamp - groupId?: string + teamId?: string } export type SyncConfigResponse = { @@ -35,7 +35,7 @@ export type SyncConfigResponse = { type BaseUpdateConfigRequest = { - groupId?: string + teamId?: string } export type UpdateConfigRequest = BaseUpdateConfigRequest @@ -48,13 +48,13 @@ type BaseUpdateConfigResponse = { export type UpdateConfigResponse = BaseUpdateConfigResponse & OneOf<{ host: SyncV1Host.Host; knownHost: SyncV1Known_hosts.KnownHost; sshKey: SyncV1Keychain.SshKey; identity: SyncV1Keychain.Identity }> -export type SyncGroupRequest = { +export type SyncTeamRequest = { after?: GoogleProtobufTimestamp.Timestamp } -export type SyncGroupResponse = { +export type SyncTeamResponse = { serverTime?: GoogleProtobufTimestamp.Timestamp - groups?: TeamV1Team.Team[] + teams?: TeamV1Team.Team[] } export type SyncUserKeyWalletRequest = { @@ -87,8 +87,8 @@ export class SyncService { static UpdateConfig(req: UpdateConfigRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } - static SyncGroup(req: SyncGroupRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/group?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + static SyncTeam(req: SyncTeamRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/team?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } static SyncUserKeyWallet(req: SyncUserKeyWalletRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/sync/v1/key_wallet?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) diff --git a/gen/proto/sync/v1/sync_service_grpc.pb.go b/gen/proto/sync/v1/sync_service_grpc.pb.go index dfdfe2d..a18aa16 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -21,7 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( SyncService_SyncConfig_FullMethodName = "/sync.v1.SyncService/SyncConfig" SyncService_UpdateConfig_FullMethodName = "/sync.v1.SyncService/UpdateConfig" - SyncService_SyncGroup_FullMethodName = "/sync.v1.SyncService/SyncGroup" + SyncService_SyncTeam_FullMethodName = "/sync.v1.SyncService/SyncTeam" SyncService_SyncUserKeyWallet_FullMethodName = "/sync.v1.SyncService/SyncUserKeyWallet" SyncService_UpdateUserKeyWallet_FullMethodName = "/sync.v1.SyncService/UpdateUserKeyWallet" ) @@ -35,7 +35,7 @@ type SyncServiceClient interface { // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*UpdateConfigResponse, error) // 通过UID获取所有所在组变动信息 - SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) + SyncTeam(ctx context.Context, in *SyncTeamRequest, opts ...grpc.CallOption) (*SyncTeamResponse, error) // 获取用户密钥对 SyncUserKeyWallet(ctx context.Context, in *SyncUserKeyWalletRequest, opts ...grpc.CallOption) (*SyncUserKeyWalletResponse, error) // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 @@ -68,9 +68,9 @@ func (c *syncServiceClient) UpdateConfig(ctx context.Context, in *UpdateConfigRe return out, nil } -func (c *syncServiceClient) SyncGroup(ctx context.Context, in *SyncGroupRequest, opts ...grpc.CallOption) (*SyncGroupResponse, error) { - out := new(SyncGroupResponse) - err := c.cc.Invoke(ctx, SyncService_SyncGroup_FullMethodName, in, out, opts...) +func (c *syncServiceClient) SyncTeam(ctx context.Context, in *SyncTeamRequest, opts ...grpc.CallOption) (*SyncTeamResponse, error) { + out := new(SyncTeamResponse) + err := c.cc.Invoke(ctx, SyncService_SyncTeam_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -104,7 +104,7 @@ type SyncServiceServer interface { // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) // 通过UID获取所有所在组变动信息 - SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) + SyncTeam(context.Context, *SyncTeamRequest) (*SyncTeamResponse, error) // 获取用户密钥对 SyncUserKeyWallet(context.Context, *SyncUserKeyWalletRequest) (*SyncUserKeyWalletResponse, error) // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 @@ -122,8 +122,8 @@ func (UnimplementedSyncServiceServer) SyncConfig(context.Context, *SyncConfigReq func (UnimplementedSyncServiceServer) UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateConfig not implemented") } -func (UnimplementedSyncServiceServer) SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncGroup not implemented") +func (UnimplementedSyncServiceServer) SyncTeam(context.Context, *SyncTeamRequest) (*SyncTeamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncTeam not implemented") } func (UnimplementedSyncServiceServer) SyncUserKeyWallet(context.Context, *SyncUserKeyWalletRequest) (*SyncUserKeyWalletResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncUserKeyWallet not implemented") @@ -180,20 +180,20 @@ func _SyncService_UpdateConfig_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _SyncService_SyncGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SyncGroupRequest) +func _SyncService_SyncTeam_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncTeamRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SyncServiceServer).SyncGroup(ctx, in) + return srv.(SyncServiceServer).SyncTeam(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SyncService_SyncGroup_FullMethodName, + FullMethod: SyncService_SyncTeam_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).SyncGroup(ctx, req.(*SyncGroupRequest)) + return srv.(SyncServiceServer).SyncTeam(ctx, req.(*SyncTeamRequest)) } return interceptor(ctx, in, info, handler) } @@ -250,8 +250,8 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ Handler: _SyncService_UpdateConfig_Handler, }, { - MethodName: "SyncGroup", - Handler: _SyncService_SyncGroup_Handler, + MethodName: "SyncTeam", + Handler: _SyncService_SyncTeam_Handler, }, { MethodName: "SyncUserKeyWallet", diff --git a/gen/proto/team/v1/team_service.pb.go b/gen/proto/team/v1/team_service.pb.go index f5140ae..3cad6ff 100644 --- a/gen/proto/team/v1/team_service.pb.go +++ b/gen/proto/team/v1/team_service.pb.go @@ -393,9 +393,9 @@ type InviteMemberRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TeamId string `protobuf:"bytes,1,opt,name=teamId,proto3" json:"teamId,omitempty"` - UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` - EncryptedGroupPrivateKey string `protobuf:"bytes,3,opt,name=encryptedGroupPrivateKey,proto3" json:"encryptedGroupPrivateKey,omitempty"` // 使用受邀请用户的公钥加密后的团队私钥 + TeamId string `protobuf:"bytes,1,opt,name=teamId,proto3" json:"teamId,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` + EncryptedTeamPrivateKey string `protobuf:"bytes,3,opt,name=encryptedTeamPrivateKey,proto3" json:"encryptedTeamPrivateKey,omitempty"` // 使用受邀请用户的公钥加密后的团队私钥 } func (x *InviteMemberRequest) Reset() { @@ -444,9 +444,9 @@ func (x *InviteMemberRequest) GetUserId() string { return "" } -func (x *InviteMemberRequest) GetEncryptedGroupPrivateKey() string { +func (x *InviteMemberRequest) GetEncryptedTeamPrivateKey() string { if x != nil { - return x.EncryptedGroupPrivateKey + return x.EncryptedTeamPrivateKey } return "" } @@ -698,81 +698,81 @@ var file_team_v1_team_service_proto_rawDesc = []byte{ 0x6d, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x01, 0x0a, - 0x13, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x22, 0x16, 0x0a, 0x14, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, - 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0x8e, 0x06, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x2e, - 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, - 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, - 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, - 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, - 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x17, 0x3a, 0x01, 0x2a, 0x1a, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, - 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x67, 0x61, 0x70, - 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, - 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, - 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, - 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, - 0x78, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, - 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x41, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, - 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, - 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x54, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, + 0x65, 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x16, 0x0a, + 0x14, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, + 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0x8e, 0x06, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, + 0x64, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, + 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, + 0x2a, 0x1a, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, + 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, + 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, + 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x78, 0x0a, 0x0c, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, + 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, + 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, + 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, + 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, + 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/team/v1/team_service.pb.ts b/gen/proto/team/v1/team_service.pb.ts index f0d2b78..bad68aa 100644 --- a/gen/proto/team/v1/team_service.pb.ts +++ b/gen/proto/team/v1/team_service.pb.ts @@ -40,7 +40,7 @@ export type DeleteTeamResponse = { export type InviteMemberRequest = { teamId?: string userId?: string - encryptedGroupPrivateKey?: string + encryptedTeamPrivateKey?: string } export type InviteMemberResponse = { diff --git a/proto/sync/v1/key_wallet.proto b/proto/sync/v1/key_wallet.proto index f29ce07..cd71f7c 100644 --- a/proto/sync/v1/key_wallet.proto +++ b/proto/sync/v1/key_wallet.proto @@ -8,7 +8,7 @@ option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1" message UserKeyWallet { string uid = 1; string gid = 2; - string encryptedGroupPrivateKey = 3; + string encryptedTeamPrivateKey = 3; google.protobuf.Timestamp createdAt = 4; google.protobuf.Timestamp updatedAt = 5; google.protobuf.Timestamp deletedAt = 6; diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index 6cbca62..f757f57 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -24,8 +24,8 @@ service SyncService { }; } // 通过UID获取所有所在组变动信息 - rpc SyncGroup(SyncGroupRequest) returns (SyncGroupResponse) { - option (google.api.http) = {get:"/gapi/sync/v1/group"}; + rpc SyncTeam(SyncTeamRequest) returns (SyncTeamResponse) { + option (google.api.http) = {get:"/gapi/sync/v1/team"}; } // 获取用户密钥对 rpc SyncUserKeyWallet(SyncUserKeyWalletRequest) returns (SyncUserKeyWalletResponse) { @@ -42,7 +42,7 @@ service SyncService { // SyncConfig message SyncConfigRequest { google.protobuf.Timestamp after = 1; // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 - string groupId = 2; + string teamId = 2; } message SyncConfigResponse { @@ -55,7 +55,7 @@ message SyncConfigResponse { // UpdateConfig message UpdateConfigRequest { - string groupId = 2; + string teamId = 2; oneof data { Host host = 11; KnownHost knownHost = 12; @@ -73,14 +73,14 @@ message UpdateConfigResponse { } } -// SyncGroup -message SyncGroupRequest { +// SyncTeam +message SyncTeamRequest { google.protobuf.Timestamp after = 1; } -message SyncGroupResponse { +message SyncTeamResponse { google.protobuf.Timestamp serverTime = 1; - repeated team.v1.Team groups = 11; + repeated team.v1.Team teams = 11; } // SyncUserKeyWallet diff --git a/proto/team/v1/team_service.proto b/proto/team/v1/team_service.proto index 7973884..68ee012 100644 --- a/proto/team/v1/team_service.proto +++ b/proto/team/v1/team_service.proto @@ -90,7 +90,7 @@ message DeleteTeamResponse {} message InviteMemberRequest { string teamId = 1; string userId = 2; - string encryptedGroupPrivateKey = 3; // 使用受邀请用户的公钥加密后的团队私钥 + string encryptedTeamPrivateKey = 3; // 使用受邀请用户的公钥加密后的团队私钥 } message InviteMemberResponse {} From 1357a32d80a6eb6ffde585598d6c64fbe8306338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=88=90=E9=94=B4?= Date: Wed, 22 Nov 2023 14:53:12 +0800 Subject: [PATCH 43/46] update: remove email in user info --- gen/openapi/user/v1/user_service.swagger.json | 4 -- gen/proto/user/v1/user.pb.go | 52 ++++++++----------- gen/proto/user/v1/user.pb.ts | 1 - proto/user/v1/user.proto | 1 - 4 files changed, 21 insertions(+), 37 deletions(-) diff --git a/gen/openapi/user/v1/user_service.swagger.json b/gen/openapi/user/v1/user_service.swagger.json index 92490a9..6bbc514 100644 --- a/gen/openapi/user/v1/user_service.swagger.json +++ b/gen/openapi/user/v1/user_service.swagger.json @@ -222,10 +222,6 @@ "avatar": { "type": "string", "title": "头像链接" - }, - "email": { - "type": "string", - "title": "邮箱" } } }, diff --git a/gen/proto/user/v1/user.pb.go b/gen/proto/user/v1/user.pb.go index 3d85592..e1d6e44 100644 --- a/gen/proto/user/v1/user.pb.go +++ b/gen/proto/user/v1/user.pb.go @@ -81,7 +81,6 @@ type User struct { NickName string `protobuf:"bytes,2,opt,name=nickName,proto3" json:"nickName,omitempty"` // 用户名 Status UserStatus `protobuf:"varint,3,opt,name=status,proto3,enum=user.v1.UserStatus" json:"status,omitempty"` // 用户状态 Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` // 头像链接 - Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` // 邮箱 } func (x *User) Reset() { @@ -144,40 +143,31 @@ func (x *User) GetAvatar() string { return "" } -func (x *User) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - var File_user_v1_user_proto protoreflect.FileDescriptor var file_user_v1_user_proto_rawDesc = []byte{ 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x22, 0x8d, 0x01, - 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2a, 0x7d, 0x0a, - 0x0a, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x55, - 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x53, 0x45, 0x52, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, - 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x45, - 0x4d, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x03, 0x42, 0x3c, 0x5a, 0x3a, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, - 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x22, 0x77, 0x0a, + 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x13, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x2a, 0x7d, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x55, + 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, + 0x4c, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x45, 0x4d, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x48, + 0x45, 0x43, 0x4b, 0x10, 0x03, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, + 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x73, 0x65, + 0x72, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/user/v1/user.pb.ts b/gen/proto/user/v1/user.pb.ts index 803af48..e1cf802 100644 --- a/gen/proto/user/v1/user.pb.ts +++ b/gen/proto/user/v1/user.pb.ts @@ -16,5 +16,4 @@ export type User = { nickName?: string status?: UserStatus avatar?: string - email?: string } \ No newline at end of file diff --git a/proto/user/v1/user.proto b/proto/user/v1/user.proto index 353130f..05e2420 100644 --- a/proto/user/v1/user.proto +++ b/proto/user/v1/user.proto @@ -15,5 +15,4 @@ message User { string nickName = 2; // 用户名 UserStatus status = 3; // 用户状态 string avatar = 4; // 头像链接 - string email = 5; // 邮箱 } \ No newline at end of file From 2a98726ef49c80ca4f13ac552788d84874c78086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=88=90=E9=94=B4?= Date: Wed, 22 Nov 2023 15:56:08 +0800 Subject: [PATCH 44/46] update: reformat create team request --- gen/openapi/team/v1/team_service.swagger.json | 22 +- gen/proto/team/v1/team_service.pb.go | 284 ++++++++++-------- gen/proto/team/v1/team_service.pb.ts | 7 +- proto/team/v1/team_service.proto | 7 +- 4 files changed, 198 insertions(+), 122 deletions(-) diff --git a/gen/openapi/team/v1/team_service.swagger.json b/gen/openapi/team/v1/team_service.swagger.json index 0103b1d..9cd3400 100644 --- a/gen/openapi/team/v1/team_service.swagger.json +++ b/gen/openapi/team/v1/team_service.swagger.json @@ -285,8 +285,26 @@ "v1CreateTeamRequest": { "type": "object", "properties": { - "team": { - "$ref": "#/definitions/v1Team" + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "uid": { + "type": "string", + "title": "创建者" + }, + "publicKey": { + "type": "string", + "title": "公钥,公钥存在服务器上,加密的私钥与相关用户关联存储" + }, + "encryptedPrivateKey": { + "type": "string", + "title": "创建者拥有的使用创建者公钥加密后的私钥" } } }, diff --git a/gen/proto/team/v1/team_service.pb.go b/gen/proto/team/v1/team_service.pb.go index 3cad6ff..90c432d 100644 --- a/gen/proto/team/v1/team_service.pb.go +++ b/gen/proto/team/v1/team_service.pb.go @@ -120,7 +120,12 @@ type CreateTeamRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Team *Team `protobuf:"bytes,1,opt,name=team,proto3" json:"team,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` + Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid,omitempty"` // 创建者 + PublicKey string `protobuf:"bytes,5,opt,name=publicKey,proto3" json:"publicKey,omitempty"` // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 + EncryptedPrivateKey string `protobuf:"bytes,6,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` // 创建者拥有的使用创建者公钥加密后的私钥 } func (x *CreateTeamRequest) Reset() { @@ -155,11 +160,46 @@ func (*CreateTeamRequest) Descriptor() ([]byte, []int) { return file_team_v1_team_service_proto_rawDescGZIP(), []int{2} } -func (x *CreateTeamRequest) GetTeam() *Team { +func (x *CreateTeamRequest) GetName() string { if x != nil { - return x.Team + return x.Name } - return nil + return "" +} + +func (x *CreateTeamRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CreateTeamRequest) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *CreateTeamRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *CreateTeamRequest) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *CreateTeamRequest) GetEncryptedPrivateKey() string { + if x != nil { + return x.EncryptedPrivateKey + } + return "" } type CreateTeamResponse struct { @@ -681,98 +721,107 @@ var file_team_v1_team_service_proto_rawDesc = []byte{ 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, - 0x36, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, - 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x37, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, - 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, - 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, - 0x22, 0x36, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, - 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x37, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, - 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, - 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, - 0x6d, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x0a, 0x13, - 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x54, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, - 0x65, 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x16, 0x0a, - 0x14, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, - 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, - 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, - 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0x8e, 0x06, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x61, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, - 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x67, 0x61, - 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, - 0x64, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, - 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, - 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, - 0x2a, 0x1a, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, - 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, - 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, - 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, - 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x78, 0x0a, 0x0c, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, - 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, + 0xc3, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x37, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x74, + 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x36, + 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, + 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x37, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x04, + 0x74, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, + 0x23, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x0a, 0x13, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x38, 0x0a, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x65, + 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x65, 0x61, + 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x16, 0x0a, 0x14, 0x49, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, + 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8e, 0x06, + 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, + 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, + 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, + 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x1a, + 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, + 0x65, 0x61, 0x6d, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, + 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x12, 0x78, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, - 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, - 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, - 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, - 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, + 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, + 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, + 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x42, 0x3c, + 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, + 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, + 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -807,29 +856,28 @@ var file_team_v1_team_service_proto_goTypes = []interface{}{ } var file_team_v1_team_service_proto_depIdxs = []int32{ 14, // 0: team.v1.GetTeamResponse.team:type_name -> team.v1.Team - 14, // 1: team.v1.CreateTeamRequest.team:type_name -> team.v1.Team - 14, // 2: team.v1.CreateTeamResponse.team:type_name -> team.v1.Team - 14, // 3: team.v1.UpdateTeamRequest.team:type_name -> team.v1.Team - 14, // 4: team.v1.UpdateTeamResponse.team:type_name -> team.v1.Team - 0, // 5: team.v1.TeamService.GetTeam:input_type -> team.v1.GetTeamRequest - 2, // 6: team.v1.TeamService.CreateTeam:input_type -> team.v1.CreateTeamRequest - 4, // 7: team.v1.TeamService.UpdateTeam:input_type -> team.v1.UpdateTeamRequest - 6, // 8: team.v1.TeamService.DeleteTeam:input_type -> team.v1.DeleteTeamRequest - 8, // 9: team.v1.TeamService.InviteMember:input_type -> team.v1.InviteMemberRequest - 10, // 10: team.v1.TeamService.RemoveMember:input_type -> team.v1.RemoveMemberRequest - 12, // 11: team.v1.TeamService.AcceptInvite:input_type -> team.v1.AcceptInviteRequest - 1, // 12: team.v1.TeamService.GetTeam:output_type -> team.v1.GetTeamResponse - 3, // 13: team.v1.TeamService.CreateTeam:output_type -> team.v1.CreateTeamResponse - 5, // 14: team.v1.TeamService.UpdateTeam:output_type -> team.v1.UpdateTeamResponse - 7, // 15: team.v1.TeamService.DeleteTeam:output_type -> team.v1.DeleteTeamResponse - 9, // 16: team.v1.TeamService.InviteMember:output_type -> team.v1.InviteMemberResponse - 11, // 17: team.v1.TeamService.RemoveMember:output_type -> team.v1.RemoveMemberResponse - 13, // 18: team.v1.TeamService.AcceptInvite:output_type -> team.v1.AcceptInviteResponse - 12, // [12:19] is the sub-list for method output_type - 5, // [5:12] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 14, // 1: team.v1.CreateTeamResponse.team:type_name -> team.v1.Team + 14, // 2: team.v1.UpdateTeamRequest.team:type_name -> team.v1.Team + 14, // 3: team.v1.UpdateTeamResponse.team:type_name -> team.v1.Team + 0, // 4: team.v1.TeamService.GetTeam:input_type -> team.v1.GetTeamRequest + 2, // 5: team.v1.TeamService.CreateTeam:input_type -> team.v1.CreateTeamRequest + 4, // 6: team.v1.TeamService.UpdateTeam:input_type -> team.v1.UpdateTeamRequest + 6, // 7: team.v1.TeamService.DeleteTeam:input_type -> team.v1.DeleteTeamRequest + 8, // 8: team.v1.TeamService.InviteMember:input_type -> team.v1.InviteMemberRequest + 10, // 9: team.v1.TeamService.RemoveMember:input_type -> team.v1.RemoveMemberRequest + 12, // 10: team.v1.TeamService.AcceptInvite:input_type -> team.v1.AcceptInviteRequest + 1, // 11: team.v1.TeamService.GetTeam:output_type -> team.v1.GetTeamResponse + 3, // 12: team.v1.TeamService.CreateTeam:output_type -> team.v1.CreateTeamResponse + 5, // 13: team.v1.TeamService.UpdateTeam:output_type -> team.v1.UpdateTeamResponse + 7, // 14: team.v1.TeamService.DeleteTeam:output_type -> team.v1.DeleteTeamResponse + 9, // 15: team.v1.TeamService.InviteMember:output_type -> team.v1.InviteMemberResponse + 11, // 16: team.v1.TeamService.RemoveMember:output_type -> team.v1.RemoveMemberResponse + 13, // 17: team.v1.TeamService.AcceptInvite:output_type -> team.v1.AcceptInviteResponse + 11, // [11:18] is the sub-list for method output_type + 4, // [4:11] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_team_v1_team_service_proto_init() } diff --git a/gen/proto/team/v1/team_service.pb.ts b/gen/proto/team/v1/team_service.pb.ts index bad68aa..0da2c2b 100644 --- a/gen/proto/team/v1/team_service.pb.ts +++ b/gen/proto/team/v1/team_service.pb.ts @@ -15,7 +15,12 @@ export type GetTeamResponse = { } export type CreateTeamRequest = { - team?: TeamV1Team.Team + name?: string + description?: string + avatar?: string + uid?: string + publicKey?: string + encryptedPrivateKey?: string } export type CreateTeamResponse = { diff --git a/proto/team/v1/team_service.proto b/proto/team/v1/team_service.proto index 68ee012..fe4dc70 100644 --- a/proto/team/v1/team_service.proto +++ b/proto/team/v1/team_service.proto @@ -66,7 +66,12 @@ message GetTeamResponse { } message CreateTeamRequest { - Team team = 1; + string name = 1; + string description = 2; + string avatar = 3; + string uid = 4; // 创建者 + string publicKey = 5; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 + string encryptedPrivateKey = 6; // 创建者拥有的使用创建者公钥加密后的私钥 } message CreateTeamResponse { From 82a399cc102552688eed70c8f4d036fdda6a8347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=88=90=E9=94=B4?= Date: Wed, 22 Nov 2023 17:32:39 +0800 Subject: [PATCH 45/46] update: move key wallet from sync to user --- gen/openapi/sync/v1/sync_service.swagger.json | 2 +- .../{sync => user}/v1/key_wallet.swagger.json | 2 +- gen/proto/sync/v1/sync_service.pb.go | 44 +++++----- gen/proto/sync/v1/sync_service.pb.ts | 8 +- gen/proto/{sync => user}/v1/key_wallet.pb.go | 80 +++++++++---------- gen/proto/{sync => user}/v1/key_wallet.pb.ts | 2 +- proto/sync/v1/sync_service.proto | 8 +- proto/{sync => user}/v1/key_wallet.proto | 6 +- 8 files changed, 76 insertions(+), 76 deletions(-) rename gen/openapi/{sync => user}/v1/key_wallet.swagger.json (94%) rename gen/proto/{sync => user}/v1/key_wallet.pb.go (72%) rename gen/proto/{sync => user}/v1/key_wallet.pb.ts (96%) rename proto/{sync => user}/v1/key_wallet.proto (86%) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index f3c2bbc..6548c79 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -581,7 +581,7 @@ "uid": { "type": "string" }, - "gid": { + "tid": { "type": "string" }, "encryptedTeamPrivateKey": { diff --git a/gen/openapi/sync/v1/key_wallet.swagger.json b/gen/openapi/user/v1/key_wallet.swagger.json similarity index 94% rename from gen/openapi/sync/v1/key_wallet.swagger.json rename to gen/openapi/user/v1/key_wallet.swagger.json index 230de76..3752ae0 100644 --- a/gen/openapi/sync/v1/key_wallet.swagger.json +++ b/gen/openapi/user/v1/key_wallet.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "sync/v1/key_wallet.proto", + "title": "user/v1/key_wallet.proto", "version": "version not set" }, "consumes": [ diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 44c43c2..5ae65a4 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -8,6 +8,7 @@ package syncV1 import ( v1 "github.com/juanjiTech/jTerm-proto/gen/proto/team/v1" + v11 "github.com/juanjiTech/jTerm-proto/gen/proto/user/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -544,7 +545,7 @@ type SyncUserKeyWalletResponse struct { ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=serverTime,proto3" json:"serverTime,omitempty"` // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` EncryptedPrivateKey string `protobuf:"bytes,3,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` - UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` + UserKeyWalletSet []*v11.UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` } func (x *SyncUserKeyWalletResponse) Reset() { @@ -600,7 +601,7 @@ func (x *SyncUserKeyWalletResponse) GetEncryptedPrivateKey() string { return "" } -func (x *SyncUserKeyWalletResponse) GetUserKeyWalletSet() []*UserKeyWallet { +func (x *SyncUserKeyWalletResponse) GetUserKeyWalletSet() []*v11.UserKeyWallet { if x != nil { return x.UserKeyWalletSet } @@ -613,9 +614,9 @@ type UpdateUserKeyWalletRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` - UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` + PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` + UserKeyWalletSet []*v11.UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` } func (x *UpdateUserKeyWalletRequest) Reset() { @@ -664,7 +665,7 @@ func (x *UpdateUserKeyWalletRequest) GetEncryptedPrivateKey() string { return "" } -func (x *UpdateUserKeyWalletRequest) GetUserKeyWalletSet() []*UserKeyWallet { +func (x *UpdateUserKeyWalletRequest) GetUserKeyWalletSet() []*v11.UserKeyWallet { if x != nil { return x.UserKeyWalletSet } @@ -676,9 +677,9 @@ type UpdateUserKeyWalletResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` - UserKeyWalletSet []*UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` + PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + EncryptedPrivateKey string `protobuf:"bytes,2,opt,name=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` + UserKeyWalletSet []*v11.UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` } func (x *UpdateUserKeyWalletResponse) Reset() { @@ -727,7 +728,7 @@ func (x *UpdateUserKeyWalletResponse) GetEncryptedPrivateKey() string { return "" } -func (x *UpdateUserKeyWalletResponse) GetUserKeyWalletSet() []*UserKeyWallet { +func (x *UpdateUserKeyWalletResponse) GetUserKeyWalletSet() []*v11.UserKeyWallet { if x != nil { return x.UserKeyWalletSet } @@ -747,10 +748,10 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, - 0x79, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x79, 0x6e, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x18, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, @@ -831,7 +832,7 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, + 0x32, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, @@ -842,7 +843,7 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x22, 0xb1, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, @@ -853,7 +854,7 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, - 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x74, 0x32, 0xc3, 0x04, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, @@ -929,7 +930,7 @@ var file_sync_v1_sync_service_proto_goTypes = []interface{}{ (*SshKey)(nil), // 13: sync.v1.SshKey (*Identity)(nil), // 14: sync.v1.Identity (*v1.Team)(nil), // 15: team.v1.Team - (*UserKeyWallet)(nil), // 16: sync.v1.UserKeyWallet + (*v11.UserKeyWallet)(nil), // 16: user.v1.UserKeyWallet } var file_sync_v1_sync_service_proto_depIdxs = []int32{ 10, // 0: sync.v1.SyncConfigRequest.after:type_name -> google.protobuf.Timestamp @@ -951,9 +952,9 @@ var file_sync_v1_sync_service_proto_depIdxs = []int32{ 15, // 16: sync.v1.SyncTeamResponse.teams:type_name -> team.v1.Team 10, // 17: sync.v1.SyncUserKeyWalletRequest.after:type_name -> google.protobuf.Timestamp 10, // 18: sync.v1.SyncUserKeyWalletResponse.serverTime:type_name -> google.protobuf.Timestamp - 16, // 19: sync.v1.SyncUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet - 16, // 20: sync.v1.UpdateUserKeyWalletRequest.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet - 16, // 21: sync.v1.UpdateUserKeyWalletResponse.userKeyWalletSet:type_name -> sync.v1.UserKeyWallet + 16, // 19: sync.v1.SyncUserKeyWalletResponse.userKeyWalletSet:type_name -> user.v1.UserKeyWallet + 16, // 20: sync.v1.UpdateUserKeyWalletRequest.userKeyWalletSet:type_name -> user.v1.UserKeyWallet + 16, // 21: sync.v1.UpdateUserKeyWalletResponse.userKeyWalletSet:type_name -> user.v1.UserKeyWallet 0, // 22: sync.v1.SyncService.SyncConfig:input_type -> sync.v1.SyncConfigRequest 2, // 23: sync.v1.SyncService.UpdateConfig:input_type -> sync.v1.UpdateConfigRequest 4, // 24: sync.v1.SyncService.SyncTeam:input_type -> sync.v1.SyncTeamRequest @@ -978,7 +979,6 @@ func file_sync_v1_sync_service_proto_init() { } file_sync_v1_host_proto_init() file_sync_v1_keychain_proto_init() - file_sync_v1_key_wallet_proto_init() file_sync_v1_known_hosts_proto_init() if !protoimpl.UnsafeEnabled { file_sync_v1_sync_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index 5af9399..c8f66ae 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -7,8 +7,8 @@ import * as fm from "../../fetch.pb" import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" import * as TeamV1Team from "../../team/v1/team.pb" +import * as UserV1Key_wallet from "../../user/v1/key_wallet.pb" import * as SyncV1Host from "./host.pb" -import * as SyncV1Key_wallet from "./key_wallet.pb" import * as SyncV1Keychain from "./keychain.pb" import * as SyncV1Known_hosts from "./known_hosts.pb" @@ -65,19 +65,19 @@ export type SyncUserKeyWalletResponse = { serverTime?: GoogleProtobufTimestamp.Timestamp publicKey?: string encryptedPrivateKey?: string - userKeyWalletSet?: SyncV1Key_wallet.UserKeyWallet[] + userKeyWalletSet?: UserV1Key_wallet.UserKeyWallet[] } export type UpdateUserKeyWalletRequest = { publicKey?: string encryptedPrivateKey?: string - userKeyWalletSet?: SyncV1Key_wallet.UserKeyWallet[] + userKeyWalletSet?: UserV1Key_wallet.UserKeyWallet[] } export type UpdateUserKeyWalletResponse = { publicKey?: string encryptedPrivateKey?: string - userKeyWalletSet?: SyncV1Key_wallet.UserKeyWallet[] + userKeyWalletSet?: UserV1Key_wallet.UserKeyWallet[] } export class SyncService { diff --git a/gen/proto/sync/v1/key_wallet.pb.go b/gen/proto/user/v1/key_wallet.pb.go similarity index 72% rename from gen/proto/sync/v1/key_wallet.pb.go rename to gen/proto/user/v1/key_wallet.pb.go index 564e262..42644c2 100644 --- a/gen/proto/sync/v1/key_wallet.pb.go +++ b/gen/proto/user/v1/key_wallet.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.31.0 // protoc (unknown) -// source: sync/v1/key_wallet.proto +// source: user/v1/key_wallet.proto -package syncV1 +package userV1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -27,7 +27,7 @@ type UserKeyWallet struct { unknownFields protoimpl.UnknownFields Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - Gid string `protobuf:"bytes,2,opt,name=gid,proto3" json:"gid,omitempty"` + Tid string `protobuf:"bytes,2,opt,name=tid,proto3" json:"tid,omitempty"` EncryptedTeamPrivateKey string `protobuf:"bytes,3,opt,name=encryptedTeamPrivateKey,proto3" json:"encryptedTeamPrivateKey,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` @@ -37,7 +37,7 @@ type UserKeyWallet struct { func (x *UserKeyWallet) Reset() { *x = UserKeyWallet{} if protoimpl.UnsafeEnabled { - mi := &file_sync_v1_key_wallet_proto_msgTypes[0] + mi := &file_user_v1_key_wallet_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +50,7 @@ func (x *UserKeyWallet) String() string { func (*UserKeyWallet) ProtoMessage() {} func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { - mi := &file_sync_v1_key_wallet_proto_msgTypes[0] + mi := &file_user_v1_key_wallet_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +63,7 @@ func (x *UserKeyWallet) ProtoReflect() protoreflect.Message { // Deprecated: Use UserKeyWallet.ProtoReflect.Descriptor instead. func (*UserKeyWallet) Descriptor() ([]byte, []int) { - return file_sync_v1_key_wallet_proto_rawDescGZIP(), []int{0} + return file_user_v1_key_wallet_proto_rawDescGZIP(), []int{0} } func (x *UserKeyWallet) GetUid() string { @@ -73,9 +73,9 @@ func (x *UserKeyWallet) GetUid() string { return "" } -func (x *UserKeyWallet) GetGid() string { +func (x *UserKeyWallet) GetTid() string { if x != nil { - return x.Gid + return x.Tid } return "" } @@ -108,17 +108,17 @@ func (x *UserKeyWallet) GetDeletedAt() *timestamppb.Timestamp { return nil } -var File_sync_v1_key_wallet_proto protoreflect.FileDescriptor +var File_user_v1_key_wallet_proto protoreflect.FileDescriptor -var file_sync_v1_key_wallet_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, +var file_user_v1_key_wallet_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x02, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x65, 0x6e, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, @@ -136,31 +136,31 @@ var file_sync_v1_key_wallet_proto_rawDesc = []byte{ 0x41, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, + 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_sync_v1_key_wallet_proto_rawDescOnce sync.Once - file_sync_v1_key_wallet_proto_rawDescData = file_sync_v1_key_wallet_proto_rawDesc + file_user_v1_key_wallet_proto_rawDescOnce sync.Once + file_user_v1_key_wallet_proto_rawDescData = file_user_v1_key_wallet_proto_rawDesc ) -func file_sync_v1_key_wallet_proto_rawDescGZIP() []byte { - file_sync_v1_key_wallet_proto_rawDescOnce.Do(func() { - file_sync_v1_key_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(file_sync_v1_key_wallet_proto_rawDescData) +func file_user_v1_key_wallet_proto_rawDescGZIP() []byte { + file_user_v1_key_wallet_proto_rawDescOnce.Do(func() { + file_user_v1_key_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_v1_key_wallet_proto_rawDescData) }) - return file_sync_v1_key_wallet_proto_rawDescData + return file_user_v1_key_wallet_proto_rawDescData } -var file_sync_v1_key_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_sync_v1_key_wallet_proto_goTypes = []interface{}{ - (*UserKeyWallet)(nil), // 0: sync.v1.UserKeyWallet +var file_user_v1_key_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_user_v1_key_wallet_proto_goTypes = []interface{}{ + (*UserKeyWallet)(nil), // 0: user.v1.UserKeyWallet (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } -var file_sync_v1_key_wallet_proto_depIdxs = []int32{ - 1, // 0: sync.v1.UserKeyWallet.createdAt:type_name -> google.protobuf.Timestamp - 1, // 1: sync.v1.UserKeyWallet.updatedAt:type_name -> google.protobuf.Timestamp - 1, // 2: sync.v1.UserKeyWallet.deletedAt:type_name -> google.protobuf.Timestamp +var file_user_v1_key_wallet_proto_depIdxs = []int32{ + 1, // 0: user.v1.UserKeyWallet.createdAt:type_name -> google.protobuf.Timestamp + 1, // 1: user.v1.UserKeyWallet.updatedAt:type_name -> google.protobuf.Timestamp + 1, // 2: user.v1.UserKeyWallet.deletedAt:type_name -> google.protobuf.Timestamp 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -168,13 +168,13 @@ var file_sync_v1_key_wallet_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_sync_v1_key_wallet_proto_init() } -func file_sync_v1_key_wallet_proto_init() { - if File_sync_v1_key_wallet_proto != nil { +func init() { file_user_v1_key_wallet_proto_init() } +func file_user_v1_key_wallet_proto_init() { + if File_user_v1_key_wallet_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_sync_v1_key_wallet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_user_v1_key_wallet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserKeyWallet); i { case 0: return &v.state @@ -191,18 +191,18 @@ func file_sync_v1_key_wallet_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sync_v1_key_wallet_proto_rawDesc, + RawDescriptor: file_user_v1_key_wallet_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_sync_v1_key_wallet_proto_goTypes, - DependencyIndexes: file_sync_v1_key_wallet_proto_depIdxs, - MessageInfos: file_sync_v1_key_wallet_proto_msgTypes, + GoTypes: file_user_v1_key_wallet_proto_goTypes, + DependencyIndexes: file_user_v1_key_wallet_proto_depIdxs, + MessageInfos: file_user_v1_key_wallet_proto_msgTypes, }.Build() - File_sync_v1_key_wallet_proto = out.File - file_sync_v1_key_wallet_proto_rawDesc = nil - file_sync_v1_key_wallet_proto_goTypes = nil - file_sync_v1_key_wallet_proto_depIdxs = nil + File_user_v1_key_wallet_proto = out.File + file_user_v1_key_wallet_proto_rawDesc = nil + file_user_v1_key_wallet_proto_goTypes = nil + file_user_v1_key_wallet_proto_depIdxs = nil } diff --git a/gen/proto/sync/v1/key_wallet.pb.ts b/gen/proto/user/v1/key_wallet.pb.ts similarity index 96% rename from gen/proto/sync/v1/key_wallet.pb.ts rename to gen/proto/user/v1/key_wallet.pb.ts index 89c193c..bf577b3 100644 --- a/gen/proto/sync/v1/key_wallet.pb.ts +++ b/gen/proto/user/v1/key_wallet.pb.ts @@ -7,7 +7,7 @@ import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" export type UserKeyWallet = { uid?: string - gid?: string + tid?: string encryptedTeamPrivateKey?: string createdAt?: GoogleProtobufTimestamp.Timestamp updatedAt?: GoogleProtobufTimestamp.Timestamp diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index f757f57..2808597 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -6,8 +6,8 @@ import "google/protobuf/timestamp.proto"; import "team/v1/team.proto"; import "sync/v1/host.proto"; import "sync/v1/keychain.proto"; -import "sync/v1/key_wallet.proto"; import "sync/v1/known_hosts.proto"; +import "user/v1/key_wallet.proto"; option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1"; @@ -92,18 +92,18 @@ message SyncUserKeyWalletResponse { google.protobuf.Timestamp serverTime = 1; // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 string publicKey = 2; string encryptedPrivateKey = 3; - repeated UserKeyWallet userKeyWalletSet = 4; + repeated user.v1.UserKeyWallet userKeyWalletSet = 4; } // UpdateUserKeyWallet message UpdateUserKeyWalletRequest { string publicKey = 1; string encryptedPrivateKey = 2; - repeated UserKeyWallet userKeyWalletSet = 4; + repeated user.v1.UserKeyWallet userKeyWalletSet = 4; } message UpdateUserKeyWalletResponse { string publicKey = 1; string encryptedPrivateKey = 2; - repeated UserKeyWallet userKeyWalletSet = 4; + repeated user.v1.UserKeyWallet userKeyWalletSet = 4; } diff --git a/proto/sync/v1/key_wallet.proto b/proto/user/v1/key_wallet.proto similarity index 86% rename from proto/sync/v1/key_wallet.proto rename to proto/user/v1/key_wallet.proto index cd71f7c..620ac2d 100644 --- a/proto/sync/v1/key_wallet.proto +++ b/proto/user/v1/key_wallet.proto @@ -1,13 +1,13 @@ syntax = "proto3"; -package sync.v1; +package user.v1; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/sync/v1;syncV1"; +option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/user/v1;userV1"; message UserKeyWallet { string uid = 1; - string gid = 2; + string tid = 2; string encryptedTeamPrivateKey = 3; google.protobuf.Timestamp createdAt = 4; google.protobuf.Timestamp updatedAt = 5; From 423e8fda8f1cfc130306aab182f4336dc9ebc31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=88=90=E9=94=B4?= Date: Thu, 23 Nov 2023 10:18:33 +0800 Subject: [PATCH 46/46] feat: improve invite service --- gen/openapi/team/v1/team_service.swagger.json | 130 ++++- gen/proto/team/v1/team.pb.go | 160 +++++- gen/proto/team/v1/team.pb.ts | 10 + gen/proto/team/v1/team_service.pb.go | 527 ++++++++++++++---- gen/proto/team/v1/team_service.pb.gw.go | 172 ++++++ gen/proto/team/v1/team_service.pb.ts | 23 + gen/proto/team/v1/team_service_grpc.pb.go | 92 ++- proto/team/v1/team.proto | 10 + proto/team/v1/team_service.proto | 32 +- 9 files changed, 1012 insertions(+), 144 deletions(-) diff --git a/gen/openapi/team/v1/team_service.swagger.json b/gen/openapi/team/v1/team_service.swagger.json index 9cd3400..1319e7c 100644 --- a/gen/openapi/team/v1/team_service.swagger.json +++ b/gen/openapi/team/v1/team_service.swagger.json @@ -175,6 +175,77 @@ ] } }, + "/gapi/team/v1/team/member/invite/list": { + "get": { + "summary": "列出邀请中列表", + "operationId": "TeamService_ListInvitingMember", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListInvitingMemberResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "teamId", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "cursor", + "description": "分页游标", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "TeamService" + ] + } + }, + "/gapi/team/v1/team/member/invite/revoke": { + "post": { + "summary": "撤回邀请", + "operationId": "TeamService_RevokeInviteMember", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RevokeInviteMemberResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RevokeInviteMemberRequest" + } + } + ], + "tags": [ + "TeamService" + ] + } + }, "/gapi/team/v1/team/member/remove": { "post": { "summary": "从团队中移除成员", @@ -335,6 +406,35 @@ } } }, + "v1InviteInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "deletedAt": { + "type": "string", + "format": "date-time" + }, + "teamId": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, "v1InviteMemberRequest": { "type": "object", "properties": { @@ -351,7 +451,24 @@ } }, "v1InviteMemberResponse": { - "type": "object" + "type": "object", + "properties": { + "inviteId": { + "type": "string" + } + } + }, + "v1ListInvitingMemberResponse": { + "type": "object", + "properties": { + "inviteMembers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1InviteInfo" + } + } + } }, "v1RemoveMemberRequest": { "type": "object", @@ -367,6 +484,17 @@ "v1RemoveMemberResponse": { "type": "object" }, + "v1RevokeInviteMemberRequest": { + "type": "object", + "properties": { + "inviteId": { + "type": "string" + } + } + }, + "v1RevokeInviteMemberResponse": { + "type": "object" + }, "v1Team": { "type": "object", "properties": { diff --git a/gen/proto/team/v1/team.pb.go b/gen/proto/team/v1/team.pb.go index 33aae73..b18d7df 100644 --- a/gen/proto/team/v1/team.pb.go +++ b/gen/proto/team/v1/team.pb.go @@ -132,6 +132,101 @@ func (x *Team) GetPublicKey() string { return "" } +type InviteInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` + TeamId string `protobuf:"bytes,5,opt,name=teamId,proto3" json:"teamId,omitempty"` + Uid string `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"` + Username string `protobuf:"bytes,7,opt,name=username,proto3" json:"username,omitempty"` +} + +func (x *InviteInfo) Reset() { + *x = InviteInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InviteInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InviteInfo) ProtoMessage() {} + +func (x *InviteInfo) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_proto_msgTypes[1] + 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 InviteInfo.ProtoReflect.Descriptor instead. +func (*InviteInfo) Descriptor() ([]byte, []int) { + return file_team_v1_team_proto_rawDescGZIP(), []int{1} +} + +func (x *InviteInfo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *InviteInfo) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *InviteInfo) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *InviteInfo) GetDeletedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeletedAt + } + return nil +} + +func (x *InviteInfo) GetTeamId() string { + if x != nil { + return x.TeamId + } + return "" +} + +func (x *InviteInfo) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *InviteInfo) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + var File_team_v1_team_proto protoreflect.FileDescriptor var file_team_v1_team_proto_rawDesc = []byte{ @@ -159,11 +254,28 @@ var file_team_v1_team_proto_rawDesc = []byte{ 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, - 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4b, 0x65, 0x79, 0x22, 0x90, 0x02, 0x0a, 0x0a, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, + 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, + 0x61, 0x6d, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -178,20 +290,24 @@ func file_team_v1_team_proto_rawDescGZIP() []byte { return file_team_v1_team_proto_rawDescData } -var file_team_v1_team_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_team_v1_team_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_team_v1_team_proto_goTypes = []interface{}{ (*Team)(nil), // 0: team.v1.Team - (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp + (*InviteInfo)(nil), // 1: team.v1.InviteInfo + (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp } var file_team_v1_team_proto_depIdxs = []int32{ - 1, // 0: team.v1.Team.createdAt:type_name -> google.protobuf.Timestamp - 1, // 1: team.v1.Team.updatedAt:type_name -> google.protobuf.Timestamp - 1, // 2: team.v1.Team.deletedAt:type_name -> google.protobuf.Timestamp - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 2, // 0: team.v1.Team.createdAt:type_name -> google.protobuf.Timestamp + 2, // 1: team.v1.Team.updatedAt:type_name -> google.protobuf.Timestamp + 2, // 2: team.v1.Team.deletedAt:type_name -> google.protobuf.Timestamp + 2, // 3: team.v1.InviteInfo.createdAt:type_name -> google.protobuf.Timestamp + 2, // 4: team.v1.InviteInfo.updatedAt:type_name -> google.protobuf.Timestamp + 2, // 5: team.v1.InviteInfo.deletedAt:type_name -> google.protobuf.Timestamp + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_team_v1_team_proto_init() } @@ -212,6 +328,18 @@ func file_team_v1_team_proto_init() { return nil } } + file_team_v1_team_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InviteInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -219,7 +347,7 @@ func file_team_v1_team_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_team_v1_team_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/gen/proto/team/v1/team.pb.ts b/gen/proto/team/v1/team.pb.ts index 4e6f124..5cd1267 100644 --- a/gen/proto/team/v1/team.pb.ts +++ b/gen/proto/team/v1/team.pb.ts @@ -15,4 +15,14 @@ export type Team = { avatar?: string uid?: string publicKey?: string +} + +export type InviteInfo = { + id?: string + createdAt?: GoogleProtobufTimestamp.Timestamp + updatedAt?: GoogleProtobufTimestamp.Timestamp + deletedAt?: GoogleProtobufTimestamp.Timestamp + teamId?: string + uid?: string + username?: string } \ No newline at end of file diff --git a/gen/proto/team/v1/team_service.pb.go b/gen/proto/team/v1/team_service.pb.go index 90c432d..4223882 100644 --- a/gen/proto/team/v1/team_service.pb.go +++ b/gen/proto/team/v1/team_service.pb.go @@ -495,6 +495,8 @@ type InviteMemberResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + InviteId string `protobuf:"bytes,1,opt,name=inviteId,proto3" json:"inviteId,omitempty"` } func (x *InviteMemberResponse) Reset() { @@ -529,6 +531,200 @@ func (*InviteMemberResponse) Descriptor() ([]byte, []int) { return file_team_v1_team_service_proto_rawDescGZIP(), []int{9} } +func (x *InviteMemberResponse) GetInviteId() string { + if x != nil { + return x.InviteId + } + return "" +} + +type ListInvitingMemberRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TeamId string `protobuf:"bytes,1,opt,name=teamId,proto3" json:"teamId,omitempty"` + Cursor string `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` // 分页游标 +} + +func (x *ListInvitingMemberRequest) Reset() { + *x = ListInvitingMemberRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInvitingMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInvitingMemberRequest) ProtoMessage() {} + +func (x *ListInvitingMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[10] + 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 ListInvitingMemberRequest.ProtoReflect.Descriptor instead. +func (*ListInvitingMemberRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{10} +} + +func (x *ListInvitingMemberRequest) GetTeamId() string { + if x != nil { + return x.TeamId + } + return "" +} + +func (x *ListInvitingMemberRequest) GetCursor() string { + if x != nil { + return x.Cursor + } + return "" +} + +type ListInvitingMemberResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InviteMembers []*InviteInfo `protobuf:"bytes,1,rep,name=inviteMembers,proto3" json:"inviteMembers,omitempty"` +} + +func (x *ListInvitingMemberResponse) Reset() { + *x = ListInvitingMemberResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInvitingMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInvitingMemberResponse) ProtoMessage() {} + +func (x *ListInvitingMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[11] + 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 ListInvitingMemberResponse.ProtoReflect.Descriptor instead. +func (*ListInvitingMemberResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{11} +} + +func (x *ListInvitingMemberResponse) GetInviteMembers() []*InviteInfo { + if x != nil { + return x.InviteMembers + } + return nil +} + +type RevokeInviteMemberRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InviteId string `protobuf:"bytes,1,opt,name=inviteId,proto3" json:"inviteId,omitempty"` +} + +func (x *RevokeInviteMemberRequest) Reset() { + *x = RevokeInviteMemberRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokeInviteMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeInviteMemberRequest) ProtoMessage() {} + +func (x *RevokeInviteMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[12] + 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 RevokeInviteMemberRequest.ProtoReflect.Descriptor instead. +func (*RevokeInviteMemberRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{12} +} + +func (x *RevokeInviteMemberRequest) GetInviteId() string { + if x != nil { + return x.InviteId + } + return "" +} + +type RevokeInviteMemberResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RevokeInviteMemberResponse) Reset() { + *x = RevokeInviteMemberResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_team_v1_team_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokeInviteMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeInviteMemberResponse) ProtoMessage() {} + +func (x *RevokeInviteMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_team_v1_team_service_proto_msgTypes[13] + 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 RevokeInviteMemberResponse.ProtoReflect.Descriptor instead. +func (*RevokeInviteMemberResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{13} +} + type RemoveMemberRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -541,7 +737,7 @@ type RemoveMemberRequest struct { func (x *RemoveMemberRequest) Reset() { *x = RemoveMemberRequest{} if protoimpl.UnsafeEnabled { - mi := &file_team_v1_team_service_proto_msgTypes[10] + mi := &file_team_v1_team_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -554,7 +750,7 @@ func (x *RemoveMemberRequest) String() string { func (*RemoveMemberRequest) ProtoMessage() {} func (x *RemoveMemberRequest) ProtoReflect() protoreflect.Message { - mi := &file_team_v1_team_service_proto_msgTypes[10] + mi := &file_team_v1_team_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -567,7 +763,7 @@ func (x *RemoveMemberRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveMemberRequest.ProtoReflect.Descriptor instead. func (*RemoveMemberRequest) Descriptor() ([]byte, []int) { - return file_team_v1_team_service_proto_rawDescGZIP(), []int{10} + return file_team_v1_team_service_proto_rawDescGZIP(), []int{14} } func (x *RemoveMemberRequest) GetTeamId() string { @@ -593,7 +789,7 @@ type RemoveMemberResponse struct { func (x *RemoveMemberResponse) Reset() { *x = RemoveMemberResponse{} if protoimpl.UnsafeEnabled { - mi := &file_team_v1_team_service_proto_msgTypes[11] + mi := &file_team_v1_team_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -606,7 +802,7 @@ func (x *RemoveMemberResponse) String() string { func (*RemoveMemberResponse) ProtoMessage() {} func (x *RemoveMemberResponse) ProtoReflect() protoreflect.Message { - mi := &file_team_v1_team_service_proto_msgTypes[11] + mi := &file_team_v1_team_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -619,7 +815,7 @@ func (x *RemoveMemberResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveMemberResponse.ProtoReflect.Descriptor instead. func (*RemoveMemberResponse) Descriptor() ([]byte, []int) { - return file_team_v1_team_service_proto_rawDescGZIP(), []int{11} + return file_team_v1_team_service_proto_rawDescGZIP(), []int{15} } type AcceptInviteRequest struct { @@ -633,7 +829,7 @@ type AcceptInviteRequest struct { func (x *AcceptInviteRequest) Reset() { *x = AcceptInviteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_team_v1_team_service_proto_msgTypes[12] + mi := &file_team_v1_team_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -646,7 +842,7 @@ func (x *AcceptInviteRequest) String() string { func (*AcceptInviteRequest) ProtoMessage() {} func (x *AcceptInviteRequest) ProtoReflect() protoreflect.Message { - mi := &file_team_v1_team_service_proto_msgTypes[12] + mi := &file_team_v1_team_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -659,7 +855,7 @@ func (x *AcceptInviteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AcceptInviteRequest.ProtoReflect.Descriptor instead. func (*AcceptInviteRequest) Descriptor() ([]byte, []int) { - return file_team_v1_team_service_proto_rawDescGZIP(), []int{12} + return file_team_v1_team_service_proto_rawDescGZIP(), []int{16} } func (x *AcceptInviteRequest) GetInviteId() string { @@ -678,7 +874,7 @@ type AcceptInviteResponse struct { func (x *AcceptInviteResponse) Reset() { *x = AcceptInviteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_team_v1_team_service_proto_msgTypes[13] + mi := &file_team_v1_team_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -691,7 +887,7 @@ func (x *AcceptInviteResponse) String() string { func (*AcceptInviteResponse) ProtoMessage() {} func (x *AcceptInviteResponse) ProtoReflect() protoreflect.Message { - mi := &file_team_v1_team_service_proto_msgTypes[13] + mi := &file_team_v1_team_service_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -704,7 +900,7 @@ func (x *AcceptInviteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AcceptInviteResponse.ProtoReflect.Descriptor instead. func (*AcceptInviteResponse) Descriptor() ([]byte, []int) { - return file_team_v1_team_service_proto_rawDescGZIP(), []int{13} + return file_team_v1_team_service_proto_rawDescGZIP(), []int{17} } var File_team_v1_team_service_proto protoreflect.FileDescriptor @@ -755,73 +951,108 @@ var file_team_v1_team_service_proto_rawDesc = []byte{ 0x64, 0x12, 0x38, 0x0a, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x65, 0x61, - 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x16, 0x0a, 0x14, 0x49, + 0x6d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x32, 0x0a, 0x14, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, - 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, - 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x76, - 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x76, - 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, - 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8e, 0x06, - 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, - 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, - 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, - 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, - 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, - 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x1a, - 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, - 0x65, 0x61, 0x6d, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, - 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, - 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, - 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x12, 0x78, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, - 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, - 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, - 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x72, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, - 0x76, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, + 0x4b, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, + 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x57, 0x0a, 0x1a, + 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x69, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, + 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x37, 0x0a, 0x19, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x1c, + 0x0a, 0x1a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x13, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, - 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, + 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x16, + 0x0a, 0x14, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb1, 0x08, 0x0a, 0x0b, 0x54, 0x65, 0x61, 0x6d, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, + 0x6d, 0x12, 0x17, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, - 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x42, 0x3c, - 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, - 0x6e, 0x6a, 0x69, 0x54, 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, - 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x64, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, + 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, + 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x64, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x1a, 0x12, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x6b, 0x0a, 0x0a, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, + 0x61, 0x6d, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, + 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, + 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x69, + 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x74, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x69, 0x6e, + 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x67, 0x61, + 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x2f, 0x6c, 0x69, + 0x73, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x6e, 0x76, + 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x74, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, + 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, + 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x2f, + 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, + 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, + 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x12, 0x78, 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, + 0x12, 0x1c, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x49, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, + 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x75, 0x61, 0x6e, 0x6a, 0x69, 0x54, + 0x65, 0x63, 0x68, 0x2f, 0x6a, 0x54, 0x65, 0x72, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x3b, 0x74, 0x65, 0x61, 0x6d, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -836,48 +1067,58 @@ func file_team_v1_team_service_proto_rawDescGZIP() []byte { return file_team_v1_team_service_proto_rawDescData } -var file_team_v1_team_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_team_v1_team_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_team_v1_team_service_proto_goTypes = []interface{}{ - (*GetTeamRequest)(nil), // 0: team.v1.GetTeamRequest - (*GetTeamResponse)(nil), // 1: team.v1.GetTeamResponse - (*CreateTeamRequest)(nil), // 2: team.v1.CreateTeamRequest - (*CreateTeamResponse)(nil), // 3: team.v1.CreateTeamResponse - (*UpdateTeamRequest)(nil), // 4: team.v1.UpdateTeamRequest - (*UpdateTeamResponse)(nil), // 5: team.v1.UpdateTeamResponse - (*DeleteTeamRequest)(nil), // 6: team.v1.DeleteTeamRequest - (*DeleteTeamResponse)(nil), // 7: team.v1.DeleteTeamResponse - (*InviteMemberRequest)(nil), // 8: team.v1.InviteMemberRequest - (*InviteMemberResponse)(nil), // 9: team.v1.InviteMemberResponse - (*RemoveMemberRequest)(nil), // 10: team.v1.RemoveMemberRequest - (*RemoveMemberResponse)(nil), // 11: team.v1.RemoveMemberResponse - (*AcceptInviteRequest)(nil), // 12: team.v1.AcceptInviteRequest - (*AcceptInviteResponse)(nil), // 13: team.v1.AcceptInviteResponse - (*Team)(nil), // 14: team.v1.Team + (*GetTeamRequest)(nil), // 0: team.v1.GetTeamRequest + (*GetTeamResponse)(nil), // 1: team.v1.GetTeamResponse + (*CreateTeamRequest)(nil), // 2: team.v1.CreateTeamRequest + (*CreateTeamResponse)(nil), // 3: team.v1.CreateTeamResponse + (*UpdateTeamRequest)(nil), // 4: team.v1.UpdateTeamRequest + (*UpdateTeamResponse)(nil), // 5: team.v1.UpdateTeamResponse + (*DeleteTeamRequest)(nil), // 6: team.v1.DeleteTeamRequest + (*DeleteTeamResponse)(nil), // 7: team.v1.DeleteTeamResponse + (*InviteMemberRequest)(nil), // 8: team.v1.InviteMemberRequest + (*InviteMemberResponse)(nil), // 9: team.v1.InviteMemberResponse + (*ListInvitingMemberRequest)(nil), // 10: team.v1.ListInvitingMemberRequest + (*ListInvitingMemberResponse)(nil), // 11: team.v1.ListInvitingMemberResponse + (*RevokeInviteMemberRequest)(nil), // 12: team.v1.RevokeInviteMemberRequest + (*RevokeInviteMemberResponse)(nil), // 13: team.v1.RevokeInviteMemberResponse + (*RemoveMemberRequest)(nil), // 14: team.v1.RemoveMemberRequest + (*RemoveMemberResponse)(nil), // 15: team.v1.RemoveMemberResponse + (*AcceptInviteRequest)(nil), // 16: team.v1.AcceptInviteRequest + (*AcceptInviteResponse)(nil), // 17: team.v1.AcceptInviteResponse + (*Team)(nil), // 18: team.v1.Team + (*InviteInfo)(nil), // 19: team.v1.InviteInfo } var file_team_v1_team_service_proto_depIdxs = []int32{ - 14, // 0: team.v1.GetTeamResponse.team:type_name -> team.v1.Team - 14, // 1: team.v1.CreateTeamResponse.team:type_name -> team.v1.Team - 14, // 2: team.v1.UpdateTeamRequest.team:type_name -> team.v1.Team - 14, // 3: team.v1.UpdateTeamResponse.team:type_name -> team.v1.Team - 0, // 4: team.v1.TeamService.GetTeam:input_type -> team.v1.GetTeamRequest - 2, // 5: team.v1.TeamService.CreateTeam:input_type -> team.v1.CreateTeamRequest - 4, // 6: team.v1.TeamService.UpdateTeam:input_type -> team.v1.UpdateTeamRequest - 6, // 7: team.v1.TeamService.DeleteTeam:input_type -> team.v1.DeleteTeamRequest - 8, // 8: team.v1.TeamService.InviteMember:input_type -> team.v1.InviteMemberRequest - 10, // 9: team.v1.TeamService.RemoveMember:input_type -> team.v1.RemoveMemberRequest - 12, // 10: team.v1.TeamService.AcceptInvite:input_type -> team.v1.AcceptInviteRequest - 1, // 11: team.v1.TeamService.GetTeam:output_type -> team.v1.GetTeamResponse - 3, // 12: team.v1.TeamService.CreateTeam:output_type -> team.v1.CreateTeamResponse - 5, // 13: team.v1.TeamService.UpdateTeam:output_type -> team.v1.UpdateTeamResponse - 7, // 14: team.v1.TeamService.DeleteTeam:output_type -> team.v1.DeleteTeamResponse - 9, // 15: team.v1.TeamService.InviteMember:output_type -> team.v1.InviteMemberResponse - 11, // 16: team.v1.TeamService.RemoveMember:output_type -> team.v1.RemoveMemberResponse - 13, // 17: team.v1.TeamService.AcceptInvite:output_type -> team.v1.AcceptInviteResponse - 11, // [11:18] is the sub-list for method output_type - 4, // [4:11] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 18, // 0: team.v1.GetTeamResponse.team:type_name -> team.v1.Team + 18, // 1: team.v1.CreateTeamResponse.team:type_name -> team.v1.Team + 18, // 2: team.v1.UpdateTeamRequest.team:type_name -> team.v1.Team + 18, // 3: team.v1.UpdateTeamResponse.team:type_name -> team.v1.Team + 19, // 4: team.v1.ListInvitingMemberResponse.inviteMembers:type_name -> team.v1.InviteInfo + 0, // 5: team.v1.TeamService.GetTeam:input_type -> team.v1.GetTeamRequest + 2, // 6: team.v1.TeamService.CreateTeam:input_type -> team.v1.CreateTeamRequest + 4, // 7: team.v1.TeamService.UpdateTeam:input_type -> team.v1.UpdateTeamRequest + 6, // 8: team.v1.TeamService.DeleteTeam:input_type -> team.v1.DeleteTeamRequest + 8, // 9: team.v1.TeamService.InviteMember:input_type -> team.v1.InviteMemberRequest + 10, // 10: team.v1.TeamService.ListInvitingMember:input_type -> team.v1.ListInvitingMemberRequest + 12, // 11: team.v1.TeamService.RevokeInviteMember:input_type -> team.v1.RevokeInviteMemberRequest + 14, // 12: team.v1.TeamService.RemoveMember:input_type -> team.v1.RemoveMemberRequest + 16, // 13: team.v1.TeamService.AcceptInvite:input_type -> team.v1.AcceptInviteRequest + 1, // 14: team.v1.TeamService.GetTeam:output_type -> team.v1.GetTeamResponse + 3, // 15: team.v1.TeamService.CreateTeam:output_type -> team.v1.CreateTeamResponse + 5, // 16: team.v1.TeamService.UpdateTeam:output_type -> team.v1.UpdateTeamResponse + 7, // 17: team.v1.TeamService.DeleteTeam:output_type -> team.v1.DeleteTeamResponse + 9, // 18: team.v1.TeamService.InviteMember:output_type -> team.v1.InviteMemberResponse + 11, // 19: team.v1.TeamService.ListInvitingMember:output_type -> team.v1.ListInvitingMemberResponse + 13, // 20: team.v1.TeamService.RevokeInviteMember:output_type -> team.v1.RevokeInviteMemberResponse + 15, // 21: team.v1.TeamService.RemoveMember:output_type -> team.v1.RemoveMemberResponse + 17, // 22: team.v1.TeamService.AcceptInvite:output_type -> team.v1.AcceptInviteResponse + 14, // [14:23] is the sub-list for method output_type + 5, // [5:14] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_team_v1_team_service_proto_init() } @@ -1008,7 +1249,7 @@ func file_team_v1_team_service_proto_init() { } } file_team_v1_team_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveMemberRequest); i { + switch v := v.(*ListInvitingMemberRequest); i { case 0: return &v.state case 1: @@ -1020,7 +1261,7 @@ func file_team_v1_team_service_proto_init() { } } file_team_v1_team_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveMemberResponse); i { + switch v := v.(*ListInvitingMemberResponse); i { case 0: return &v.state case 1: @@ -1032,7 +1273,7 @@ func file_team_v1_team_service_proto_init() { } } file_team_v1_team_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AcceptInviteRequest); i { + switch v := v.(*RevokeInviteMemberRequest); i { case 0: return &v.state case 1: @@ -1044,6 +1285,54 @@ func file_team_v1_team_service_proto_init() { } } file_team_v1_team_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokeInviteMemberResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveMemberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveMemberResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcceptInviteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_team_v1_team_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AcceptInviteResponse); i { case 0: return &v.state @@ -1062,7 +1351,7 @@ func file_team_v1_team_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_team_v1_team_service_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/team/v1/team_service.pb.gw.go b/gen/proto/team/v1/team_service.pb.gw.go index 2afb2b6..a58e925 100644 --- a/gen/proto/team/v1/team_service.pb.gw.go +++ b/gen/proto/team/v1/team_service.pb.gw.go @@ -203,6 +203,76 @@ func local_request_TeamService_InviteMember_0(ctx context.Context, marshaler run } +var ( + filter_TeamService_ListInvitingMember_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TeamService_ListInvitingMember_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListInvitingMemberRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TeamService_ListInvitingMember_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListInvitingMember(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TeamService_ListInvitingMember_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListInvitingMemberRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TeamService_ListInvitingMember_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListInvitingMember(ctx, &protoReq) + return msg, metadata, err + +} + +func request_TeamService_RevokeInviteMember_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeInviteMemberRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RevokeInviteMember(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TeamService_RevokeInviteMember_0(ctx context.Context, marshaler runtime.Marshaler, server TeamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeInviteMemberRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RevokeInviteMember(ctx, &protoReq) + return msg, metadata, err + +} + func request_TeamService_RemoveMember_0(ctx context.Context, marshaler runtime.Marshaler, client TeamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveMemberRequest var metadata runtime.ServerMetadata @@ -402,6 +472,56 @@ func RegisterTeamServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_TeamService_ListInvitingMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/team.v1.TeamService/ListInvitingMember", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/invite/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TeamService_ListInvitingMember_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_ListInvitingMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_RevokeInviteMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/team.v1.TeamService/RevokeInviteMember", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/invite/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TeamService_RevokeInviteMember_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_RevokeInviteMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_TeamService_RemoveMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -603,6 +723,50 @@ func RegisterTeamServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_TeamService_ListInvitingMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/team.v1.TeamService/ListInvitingMember", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/invite/list")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TeamService_ListInvitingMember_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_ListInvitingMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_TeamService_RevokeInviteMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/team.v1.TeamService/RevokeInviteMember", runtime.WithHTTPPathPattern("/gapi/team/v1/team/member/invite/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TeamService_RevokeInviteMember_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TeamService_RevokeInviteMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_TeamService_RemoveMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -661,6 +825,10 @@ var ( pattern_TeamService_InviteMember_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"gapi", "team", "v1", "member", "invite"}, "")) + pattern_TeamService_ListInvitingMember_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4, 2, 5}, []string{"gapi", "team", "v1", "member", "invite", "list"}, "")) + + pattern_TeamService_RevokeInviteMember_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4, 2, 5}, []string{"gapi", "team", "v1", "member", "invite", "revoke"}, "")) + pattern_TeamService_RemoveMember_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"gapi", "team", "v1", "member", "remove"}, "")) pattern_TeamService_AcceptInvite_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"gapi", "team", "v1", "member", "accept"}, "")) @@ -677,6 +845,10 @@ var ( forward_TeamService_InviteMember_0 = runtime.ForwardResponseMessage + forward_TeamService_ListInvitingMember_0 = runtime.ForwardResponseMessage + + forward_TeamService_RevokeInviteMember_0 = runtime.ForwardResponseMessage + forward_TeamService_RemoveMember_0 = runtime.ForwardResponseMessage forward_TeamService_AcceptInvite_0 = runtime.ForwardResponseMessage diff --git a/gen/proto/team/v1/team_service.pb.ts b/gen/proto/team/v1/team_service.pb.ts index 0da2c2b..bbc47cb 100644 --- a/gen/proto/team/v1/team_service.pb.ts +++ b/gen/proto/team/v1/team_service.pb.ts @@ -49,6 +49,23 @@ export type InviteMemberRequest = { } export type InviteMemberResponse = { + inviteId?: string +} + +export type ListInvitingMemberRequest = { + teamId?: string + cursor?: string +} + +export type ListInvitingMemberResponse = { + inviteMembers?: TeamV1Team.InviteInfo[] +} + +export type RevokeInviteMemberRequest = { + inviteId?: string +} + +export type RevokeInviteMemberResponse = { } export type RemoveMemberRequest = { @@ -82,6 +99,12 @@ export class TeamService { static InviteMember(req: InviteMemberRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/team/v1/team/member/invite`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } + static ListInvitingMember(req: ListInvitingMemberRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/team/v1/team/member/invite/list?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + } + static RevokeInviteMember(req: RevokeInviteMemberRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/team/v1/team/member/invite/revoke`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + } static RemoveMember(req: RemoveMemberRequest, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/gapi/team/v1/team/member/remove`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) } diff --git a/gen/proto/team/v1/team_service_grpc.pb.go b/gen/proto/team/v1/team_service_grpc.pb.go index ddecb2d..083088e 100644 --- a/gen/proto/team/v1/team_service_grpc.pb.go +++ b/gen/proto/team/v1/team_service_grpc.pb.go @@ -19,13 +19,15 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - TeamService_GetTeam_FullMethodName = "/team.v1.TeamService/GetTeam" - TeamService_CreateTeam_FullMethodName = "/team.v1.TeamService/CreateTeam" - TeamService_UpdateTeam_FullMethodName = "/team.v1.TeamService/UpdateTeam" - TeamService_DeleteTeam_FullMethodName = "/team.v1.TeamService/DeleteTeam" - TeamService_InviteMember_FullMethodName = "/team.v1.TeamService/InviteMember" - TeamService_RemoveMember_FullMethodName = "/team.v1.TeamService/RemoveMember" - TeamService_AcceptInvite_FullMethodName = "/team.v1.TeamService/AcceptInvite" + TeamService_GetTeam_FullMethodName = "/team.v1.TeamService/GetTeam" + TeamService_CreateTeam_FullMethodName = "/team.v1.TeamService/CreateTeam" + TeamService_UpdateTeam_FullMethodName = "/team.v1.TeamService/UpdateTeam" + TeamService_DeleteTeam_FullMethodName = "/team.v1.TeamService/DeleteTeam" + TeamService_InviteMember_FullMethodName = "/team.v1.TeamService/InviteMember" + TeamService_ListInvitingMember_FullMethodName = "/team.v1.TeamService/ListInvitingMember" + TeamService_RevokeInviteMember_FullMethodName = "/team.v1.TeamService/RevokeInviteMember" + TeamService_RemoveMember_FullMethodName = "/team.v1.TeamService/RemoveMember" + TeamService_AcceptInvite_FullMethodName = "/team.v1.TeamService/AcceptInvite" ) // TeamServiceClient is the client API for TeamService service. @@ -42,6 +44,10 @@ type TeamServiceClient interface { DeleteTeam(ctx context.Context, in *DeleteTeamRequest, opts ...grpc.CallOption) (*DeleteTeamResponse, error) // 邀请成员加入团队 InviteMember(ctx context.Context, in *InviteMemberRequest, opts ...grpc.CallOption) (*InviteMemberResponse, error) + // 列出邀请中列表 + ListInvitingMember(ctx context.Context, in *ListInvitingMemberRequest, opts ...grpc.CallOption) (*ListInvitingMemberResponse, error) + // 撤回邀请 + RevokeInviteMember(ctx context.Context, in *RevokeInviteMemberRequest, opts ...grpc.CallOption) (*RevokeInviteMemberResponse, error) // 从团队中移除成员 RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...grpc.CallOption) (*RemoveMemberResponse, error) // 接受邀请加入团队 @@ -101,6 +107,24 @@ func (c *teamServiceClient) InviteMember(ctx context.Context, in *InviteMemberRe return out, nil } +func (c *teamServiceClient) ListInvitingMember(ctx context.Context, in *ListInvitingMemberRequest, opts ...grpc.CallOption) (*ListInvitingMemberResponse, error) { + out := new(ListInvitingMemberResponse) + err := c.cc.Invoke(ctx, TeamService_ListInvitingMember_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *teamServiceClient) RevokeInviteMember(ctx context.Context, in *RevokeInviteMemberRequest, opts ...grpc.CallOption) (*RevokeInviteMemberResponse, error) { + out := new(RevokeInviteMemberResponse) + err := c.cc.Invoke(ctx, TeamService_RevokeInviteMember_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *teamServiceClient) RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...grpc.CallOption) (*RemoveMemberResponse, error) { out := new(RemoveMemberResponse) err := c.cc.Invoke(ctx, TeamService_RemoveMember_FullMethodName, in, out, opts...) @@ -133,6 +157,10 @@ type TeamServiceServer interface { DeleteTeam(context.Context, *DeleteTeamRequest) (*DeleteTeamResponse, error) // 邀请成员加入团队 InviteMember(context.Context, *InviteMemberRequest) (*InviteMemberResponse, error) + // 列出邀请中列表 + ListInvitingMember(context.Context, *ListInvitingMemberRequest) (*ListInvitingMemberResponse, error) + // 撤回邀请 + RevokeInviteMember(context.Context, *RevokeInviteMemberRequest) (*RevokeInviteMemberResponse, error) // 从团队中移除成员 RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error) // 接受邀请加入团队 @@ -159,6 +187,12 @@ func (UnimplementedTeamServiceServer) DeleteTeam(context.Context, *DeleteTeamReq func (UnimplementedTeamServiceServer) InviteMember(context.Context, *InviteMemberRequest) (*InviteMemberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InviteMember not implemented") } +func (UnimplementedTeamServiceServer) ListInvitingMember(context.Context, *ListInvitingMemberRequest) (*ListInvitingMemberResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInvitingMember not implemented") +} +func (UnimplementedTeamServiceServer) RevokeInviteMember(context.Context, *RevokeInviteMemberRequest) (*RevokeInviteMemberResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RevokeInviteMember not implemented") +} func (UnimplementedTeamServiceServer) RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveMember not implemented") } @@ -268,6 +302,42 @@ func _TeamService_InviteMember_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _TeamService_ListInvitingMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListInvitingMemberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServiceServer).ListInvitingMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TeamService_ListInvitingMember_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServiceServer).ListInvitingMember(ctx, req.(*ListInvitingMemberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TeamService_RevokeInviteMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RevokeInviteMemberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TeamServiceServer).RevokeInviteMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TeamService_RevokeInviteMember_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TeamServiceServer).RevokeInviteMember(ctx, req.(*RevokeInviteMemberRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _TeamService_RemoveMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RemoveMemberRequest) if err := dec(in); err != nil { @@ -331,6 +401,14 @@ var TeamService_ServiceDesc = grpc.ServiceDesc{ MethodName: "InviteMember", Handler: _TeamService_InviteMember_Handler, }, + { + MethodName: "ListInvitingMember", + Handler: _TeamService_ListInvitingMember_Handler, + }, + { + MethodName: "RevokeInviteMember", + Handler: _TeamService_RevokeInviteMember_Handler, + }, { MethodName: "RemoveMember", Handler: _TeamService_RemoveMember_Handler, diff --git a/proto/team/v1/team.proto b/proto/team/v1/team.proto index 05bec63..8ccc321 100644 --- a/proto/team/v1/team.proto +++ b/proto/team/v1/team.proto @@ -16,3 +16,13 @@ message Team { string uid = 8; // 创建者 string publicKey = 9; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 } + +message InviteInfo { + string id = 1; + google.protobuf.Timestamp createdAt = 2; + google.protobuf.Timestamp updatedAt = 3; + google.protobuf.Timestamp deletedAt = 4; + string teamId = 5; + string uid = 6; + string username = 7; +} \ No newline at end of file diff --git a/proto/team/v1/team_service.proto b/proto/team/v1/team_service.proto index fe4dc70..c3b314c 100644 --- a/proto/team/v1/team_service.proto +++ b/proto/team/v1/team_service.proto @@ -41,6 +41,19 @@ service TeamService { body: "*" }; } + // 列出邀请中列表 + rpc ListInvitingMember(ListInvitingMemberRequest) returns (ListInvitingMemberResponse) { + option (google.api.http) = { + get: "/gapi/team/v1/team/member/invite/list" + }; + } + // 撤回邀请 + rpc RevokeInviteMember(RevokeInviteMemberRequest) returns (RevokeInviteMemberResponse) { + option (google.api.http) = { + post: "/gapi/team/v1/team/member/invite/revoke" + body: "*" + }; + } // 从团队中移除成员 rpc RemoveMember(RemoveMemberRequest) returns (RemoveMemberResponse) { option (google.api.http) = { @@ -98,7 +111,24 @@ message InviteMemberRequest { string encryptedTeamPrivateKey = 3; // 使用受邀请用户的公钥加密后的团队私钥 } -message InviteMemberResponse {} +message InviteMemberResponse { + string inviteId = 1; +} + +message ListInvitingMemberRequest { + string teamId = 1; + string cursor = 2; // 分页游标 +} + +message ListInvitingMemberResponse { + repeated InviteInfo inviteMembers = 1; +} + +message RevokeInviteMemberRequest { + string inviteId = 1; +} + +message RevokeInviteMemberResponse {} message RemoveMemberRequest { string teamId = 1;