diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index efe05c3..6548c79 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/config": { "get": { "summary": "拉取指定时间点之后的配置变动信息", - "operationId": "SyncService_Sync", + "operationId": "SyncService_SyncConfig", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SyncResponse" + "$ref": "#/definitions/v1SyncConfigResponse" } }, "default": { @@ -44,7 +44,7 @@ "format": "date-time" }, { - "name": "groupId", + "name": "teamId", "in": "query", "required": false, "type": "string" @@ -53,17 +53,48 @@ "tags": [ "SyncService" ] + }, + "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/sync_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": { @@ -76,6 +107,7 @@ "parameters": [ { "name": "after", + "description": "获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息", "in": "query", "required": false, "type": "string", @@ -85,17 +117,15 @@ "tags": [ "SyncService" ] - } - }, - "/gapi/sync/v1/update": { + }, "post": { - "summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。", - "operationId": "SyncService_Update", + "summary": "修改用户密钥对,修改的时候所有相关组的加密密钥均要替换", + "operationId": "SyncService_UpdateUserKeyWallet", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateResponse" + "$ref": "#/definitions/v1UpdateUserKeyWalletResponse" } }, "default": { @@ -111,7 +141,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1UpdateRequest" + "$ref": "#/definitions/v1UpdateUserKeyWalletRequest" } } ], @@ -120,15 +150,15 @@ ] } }, - "/gapi/sync/v1/update_group": { - "post": { - "summary": "更新组信息", - "operationId": "SyncService_UpdateGroup", + "/gapi/sync/v1/team": { + "get": { + "summary": "通过UID获取所有所在组变动信息", + "operationId": "SyncService_SyncTeam", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UpdateGroupResponse" + "$ref": "#/definitions/v1SyncTeamResponse" } }, "default": { @@ -140,12 +170,11 @@ }, "parameters": [ { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1UpdateGroupRequest" - } + "name": "after", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" } ], "tags": [ @@ -183,53 +212,6 @@ } } }, - "v1Group": { - "type": "object", - "properties": { - "groupBasic": { - "$ref": "#/definitions/v1GroupBasic" - }, - "memberId": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "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": "创建者" - } - } - }, "v1Host": { "type": "object", "properties": { @@ -404,23 +386,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": { @@ -458,21 +424,86 @@ } } }, - "v1UpdateGroupRequest": { + "v1SyncTeamResponse": { + "type": "object", + "properties": { + "serverTime": { + "type": "string", + "format": "date-time" + }, + "teams": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Team" + } + } + } + }, + "v1SyncUserKeyWalletResponse": { "type": "object", "properties": { - "group": { - "$ref": "#/definitions/v1Group" + "serverTime": { + "type": "string", + "format": "date-time", + "title": "当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱" + }, + "publicKey": { + "type": "string" + }, + "encryptedPrivateKey": { + "type": "string" + }, + "userKeyWalletSet": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UserKeyWallet" + } } } }, - "v1UpdateGroupResponse": { - "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": "公钥,公钥存在服务器上,加密的私钥与相关用户关联存储" + } + } }, - "v1UpdateRequest": { + "v1UpdateConfigRequest": { "type": "object", "properties": { - "groupId": { + "teamId": { "type": "string" }, "host": { @@ -487,9 +518,10 @@ "identity": { "$ref": "#/definitions/v1Identity" } - } + }, + "title": "UpdateConfig" }, - "v1UpdateResponse": { + "v1UpdateConfigResponse": { "type": "object", "properties": { "host": { @@ -505,6 +537,69 @@ "$ref": "#/definitions/v1Identity" } } + }, + "v1UpdateUserKeyWalletRequest": { + "type": "object", + "properties": { + "publicKey": { + "type": "string" + }, + "encryptedPrivateKey": { + "type": "string" + }, + "userKeyWalletSet": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UserKeyWallet" + } + } + }, + "title": "UpdateUserKeyWallet" + }, + "v1UpdateUserKeyWalletResponse": { + "type": "object", + "properties": { + "publicKey": { + "type": "string" + }, + "encryptedPrivateKey": { + "type": "string" + }, + "userKeyWalletSet": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UserKeyWallet" + } + } + } + }, + "v1UserKeyWallet": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "tid": { + "type": "string" + }, + "encryptedTeamPrivateKey": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "deletedAt": { + "type": "string", + "format": "date-time" + } + } } } } 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..1319e7c --- /dev/null +++ b/gen/openapi/team/v1/team_service.swagger.json @@ -0,0 +1,552 @@ +{ + "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/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": "邀请成员加入团队", + "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/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": "从团队中移除成员", + "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" + } + } + } + }, + "v1AcceptInviteRequest": { + "type": "object", + "properties": { + "inviteId": { + "type": "string" + } + } + }, + "v1AcceptInviteResponse": { + "type": "object" + }, + "v1CreateTeamRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "uid": { + "type": "string", + "title": "创建者" + }, + "publicKey": { + "type": "string", + "title": "公钥,公钥存在服务器上,加密的私钥与相关用户关联存储" + }, + "encryptedPrivateKey": { + "type": "string", + "title": "创建者拥有的使用创建者公钥加密后的私钥" + } + } + }, + "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" + } + } + }, + "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": { + "teamId": { + "type": "string" + }, + "userId": { + "type": "string" + }, + "encryptedTeamPrivateKey": { + "type": "string", + "title": "使用受邀请用户的公钥加密后的团队私钥" + } + } + }, + "v1InviteMemberResponse": { + "type": "object", + "properties": { + "inviteId": { + "type": "string" + } + } + }, + "v1ListInvitingMemberResponse": { + "type": "object", + "properties": { + "inviteMembers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1InviteInfo" + } + } + } + }, + "v1RemoveMemberRequest": { + "type": "object", + "properties": { + "teamId": { + "type": "string" + }, + "userId": { + "type": "string" + } + } + }, + "v1RemoveMemberResponse": { + "type": "object" + }, + "v1RevokeInviteMemberRequest": { + "type": "object", + "properties": { + "inviteId": { + "type": "string" + } + } + }, + "v1RevokeInviteMemberResponse": { + "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/key_wallet.swagger.json b/gen/openapi/user/v1/key_wallet.swagger.json new file mode 100644 index 0000000..3752ae0 --- /dev/null +++ b/gen/openapi/user/v1/key_wallet.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "user/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/user/v1/user_service.swagger.json b/gen/openapi/user/v1/user_service.swagger.json index 7ef032a..6bbc514 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": { @@ -182,10 +222,6 @@ "avatar": { "type": "string", "title": "头像链接" - }, - "email": { - "type": "string", - "title": "邮箱" } } }, 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 deleted file mode 100644 index 459d2b1..0000000 --- a/gen/proto/sync/v1/group.pb.go +++ /dev/null @@ -1,300 +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=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"` -} - -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) GetMemberId() []string { - if x != nil { - return x.MemberId - } - 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=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"` - 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"` // 创建者 -} - -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 "" -} - -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, - 0x5a, 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, 0xad, 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, 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, 2) -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 -} -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 -} - -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 - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sync_v1_group_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - 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/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 610b736..5ae65a4 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -7,6 +7,8 @@ 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" @@ -22,17 +24,18 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type SyncRequest struct { +// SyncConfig +type SyncConfigRequest struct { state protoimpl.MessageState 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=group_id,json=groupId,proto3" json:"group_id,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 *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)) @@ -40,13 +43,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)) @@ -58,39 +61,39 @@ 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) GetTeamId() string { if x != nil { - return x.GroupId + return x.TeamId } return "" } -type SyncResponse struct { +type SyncConfigResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache 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 *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)) @@ -98,13 +101,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)) @@ -116,63 +119,64 @@ 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 } -type UpdateRequest struct { +// UpdateConfig +type UpdateConfigRequest 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"` + TeamId string `protobuf:"bytes,2,opt,name=teamId,proto3" json:"teamId,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)) @@ -180,13 +184,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)) @@ -198,97 +202,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) GetTeamId() string { if x != nil { - return x.GroupId + return x.TeamId } 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 { - KnownHost *KnownHost `protobuf:"bytes,12,opt,name=known_host,json=knownHost,proto3,oneof"` +type UpdateConfigRequest_KnownHost struct { + KnownHost *KnownHost `protobuf:"bytes,12,opt,name=knownHost,proto3,oneof"` } -type UpdateRequest_SshKey struct { - SshKey *SshKey `protobuf:"bytes,13,opt,name=ssh_key,json=sshKey,proto3,oneof"` +type UpdateConfigRequest_SshKey struct { + SshKey *SshKey `protobuf:"bytes,13,opt,name=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)) @@ -296,13 +300,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)) @@ -314,84 +318,85 @@ 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 { - KnownHost *KnownHost `protobuf:"bytes,12,opt,name=known_host,json=knownHost,proto3,oneof"` +type UpdateConfigResponse_KnownHost struct { + KnownHost *KnownHost `protobuf:"bytes,12,opt,name=knownHost,proto3,oneof"` } -type UpdateResponse_SshKey struct { - SshKey *SshKey `protobuf:"bytes,13,opt,name=ssh_key,json=sshKey,proto3,oneof"` +type UpdateConfigResponse_SshKey struct { + SshKey *SshKey `protobuf:"bytes,13,opt,name=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() {} -type UpdateGroupRequest struct { +// SyncTeam +type SyncTeamRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` } -func (x *UpdateGroupRequest) Reset() { - *x = UpdateGroupRequest{} +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)) @@ -399,13 +404,13 @@ func (x *UpdateGroupRequest) Reset() { } } -func (x *UpdateGroupRequest) String() string { +func (x *SyncTeamRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateGroupRequest) ProtoMessage() {} +func (*SyncTeamRequest) ProtoMessage() {} -func (x *UpdateGroupRequest) 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)) @@ -417,26 +422,29 @@ func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateGroupRequest.ProtoReflect.Descriptor instead. -func (*UpdateGroupRequest) 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 *UpdateGroupRequest) GetGroup() *Group { +func (x *SyncTeamRequest) GetAfter() *timestamppb.Timestamp { if x != nil { - return x.Group + return x.After } return nil } -type UpdateGroupResponse 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"` + Teams []*v1.Team `protobuf:"bytes,11,rep,name=teams,proto3" json:"teams,omitempty"` } -func (x *UpdateGroupResponse) Reset() { - *x = UpdateGroupResponse{} +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)) @@ -444,13 +452,13 @@ func (x *UpdateGroupResponse) Reset() { } } -func (x *UpdateGroupResponse) String() string { +func (x *SyncTeamResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateGroupResponse) ProtoMessage() {} +func (*SyncTeamResponse) ProtoMessage() {} -func (x *UpdateGroupResponse) 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)) @@ -462,21 +470,36 @@ func (x *UpdateGroupResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateGroupResponse.ProtoReflect.Descriptor instead. -func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncTeamResponse.ProtoReflect.Descriptor instead. +func (*SyncTeamResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{5} } -type SyncGroupRequest struct { +func (x *SyncTeamResponse) GetServerTime() *timestamppb.Timestamp { + if x != nil { + return x.ServerTime + } + return nil +} + +func (x *SyncTeamResponse) GetTeams() []*v1.Team { + if x != nil { + return x.Teams + } + return nil +} + +// SyncUserKeyWallet +type SyncUserKeyWalletRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` + After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 } -func (x *SyncGroupRequest) Reset() { - *x = SyncGroupRequest{} +func (x *SyncUserKeyWalletRequest) Reset() { + *x = SyncUserKeyWalletRequest{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -484,13 +507,13 @@ func (x *SyncGroupRequest) Reset() { } } -func (x *SyncGroupRequest) String() string { +func (x *SyncUserKeyWalletRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncGroupRequest) ProtoMessage() {} +func (*SyncUserKeyWalletRequest) ProtoMessage() {} -func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { +func (x *SyncUserKeyWalletRequest) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -502,29 +525,31 @@ func (x *SyncGroupRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SyncGroupRequest.ProtoReflect.Descriptor instead. -func (*SyncGroupRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncUserKeyWalletRequest.ProtoReflect.Descriptor instead. +func (*SyncUserKeyWalletRequest) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{6} } -func (x *SyncGroupRequest) GetAfter() *timestamppb.Timestamp { +func (x *SyncUserKeyWalletRequest) GetAfter() *timestamppb.Timestamp { if x != nil { return x.After } return nil } -type SyncGroupResponse struct { +type SyncUserKeyWalletResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ServerTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"` - Groups []*Group `protobuf:"bytes,11,rep,name=groups,proto3" json:"groups,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 []*v11.UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` } -func (x *SyncGroupResponse) Reset() { - *x = SyncGroupResponse{} +func (x *SyncUserKeyWalletResponse) Reset() { + *x = SyncUserKeyWalletResponse{} if protoimpl.UnsafeEnabled { mi := &file_sync_v1_sync_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -532,13 +557,13 @@ func (x *SyncGroupResponse) Reset() { } } -func (x *SyncGroupResponse) String() string { +func (x *SyncUserKeyWalletResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncGroupResponse) ProtoMessage() {} +func (*SyncUserKeyWalletResponse) ProtoMessage() {} -func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { +func (x *SyncUserKeyWalletResponse) ProtoReflect() protoreflect.Message { mi := &file_sync_v1_sync_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -550,21 +575,162 @@ func (x *SyncGroupResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SyncGroupResponse.ProtoReflect.Descriptor instead. -func (*SyncGroupResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncUserKeyWalletResponse.ProtoReflect.Descriptor instead. +func (*SyncUserKeyWalletResponse) Descriptor() ([]byte, []int) { return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{7} } -func (x *SyncGroupResponse) GetServerTime() *timestamppb.Timestamp { +func (x *SyncUserKeyWalletResponse) GetServerTime() *timestamppb.Timestamp { if x != nil { return x.ServerTime } return nil } -func (x *SyncGroupResponse) GetGroups() []*Group { +func (x *SyncUserKeyWalletResponse) GetPublicKey() string { if x != nil { - return x.Groups + return x.PublicKey + } + return "" +} + +func (x *SyncUserKeyWalletResponse) GetEncryptedPrivateKey() string { + if x != nil { + return x.EncryptedPrivateKey + } + return "" +} + +func (x *SyncUserKeyWalletResponse) GetUserKeyWalletSet() []*v11.UserKeyWallet { + if x != nil { + return x.UserKeyWalletSet + } + return nil +} + +// UpdateUserKeyWallet +type UpdateUserKeyWalletRequest 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=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` + UserKeyWalletSet []*v11.UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` +} + +func (x *UpdateUserKeyWalletRequest) Reset() { + *x = UpdateUserKeyWalletRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserKeyWalletRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserKeyWalletRequest) ProtoMessage() {} + +func (x *UpdateUserKeyWalletRequest) 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 UpdateUserKeyWalletRequest.ProtoReflect.Descriptor instead. +func (*UpdateUserKeyWalletRequest) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateUserKeyWalletRequest) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *UpdateUserKeyWalletRequest) GetEncryptedPrivateKey() string { + if x != nil { + return x.EncryptedPrivateKey + } + return "" +} + +func (x *UpdateUserKeyWalletRequest) GetUserKeyWalletSet() []*v11.UserKeyWallet { + if x != nil { + return x.UserKeyWalletSet + } + return nil +} + +type UpdateUserKeyWalletResponse 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=encryptedPrivateKey,proto3" json:"encryptedPrivateKey,omitempty"` + UserKeyWalletSet []*v11.UserKeyWallet `protobuf:"bytes,4,rep,name=userKeyWalletSet,proto3" json:"userKeyWalletSet,omitempty"` +} + +func (x *UpdateUserKeyWalletResponse) Reset() { + *x = UpdateUserKeyWalletResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sync_v1_sync_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserKeyWalletResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserKeyWalletResponse) ProtoMessage() {} + +func (x *UpdateUserKeyWalletResponse) 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 UpdateUserKeyWalletResponse.ProtoReflect.Descriptor instead. +func (*UpdateUserKeyWalletResponse) Descriptor() ([]byte, []int) { + return file_sync_v1_sync_service_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateUserKeyWalletResponse) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *UpdateUserKeyWalletResponse) GetEncryptedPrivateKey() string { + if x != nil { + return x.EncryptedPrivateKey + } + return "" +} + +func (x *UpdateUserKeyWalletResponse) GetUserKeyWalletSet() []*v11.UserKeyWallet { + if x != nil { + return x.UserKeyWalletSet } return nil } @@ -578,110 +744,160 @@ 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, 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, - 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, + 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, 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, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x61, 0x66, 0x74, 0x65, 0x72, + 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, 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, + 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, 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, 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, + 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, 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, + 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, 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, + 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, 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 ( @@ -696,55 +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, 8) +var file_sync_v1_sync_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) 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 + (*SyncConfigRequest)(nil), // 0: sync.v1.SyncConfigRequest + (*SyncConfigResponse)(nil), // 1: sync.v1.SyncConfigResponse + (*UpdateConfigRequest)(nil), // 2: sync.v1.UpdateConfigRequest + (*UpdateConfigResponse)(nil), // 3: sync.v1.UpdateConfigResponse + (*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 + (*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 + (*v11.UserKeyWallet)(nil), // 16: user.v1.UserKeyWallet } 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 + 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.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 -> 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 + 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.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 + 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() } @@ -755,10 +980,9 @@ func file_sync_v1_sync_service_proto_init() { file_sync_v1_host_proto_init() file_sync_v1_keychain_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.(*SyncRequest); i { + switch v := v.(*SyncConfigRequest); i { case 0: return &v.state case 1: @@ -770,7 +994,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: @@ -782,7 +1006,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: @@ -794,7 +1018,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: @@ -806,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.(*UpdateGroupRequest); i { + switch v := v.(*SyncTeamRequest); i { case 0: return &v.state case 1: @@ -818,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.(*UpdateGroupResponse); i { + switch v := v.(*SyncTeamResponse); i { case 0: return &v.state case 1: @@ -830,7 +1054,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.(*SyncUserKeyWalletRequest); i { case 0: return &v.state case 1: @@ -842,7 +1066,31 @@ 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.(*SyncUserKeyWalletResponse); 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[8].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[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUserKeyWalletResponse); i { case 0: return &v.state case 1: @@ -855,16 +1103,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{ @@ -872,7 +1120,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: 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 5151082..6be4f5d 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,77 +96,113 @@ 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 } -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 ( + filter_SyncService_SyncTeam_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +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 - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + 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.UpdateGroup(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_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 +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 - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + 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.UpdateGroup(ctx, &protoReq) + msg, err := server.SyncTeam(ctx, &protoReq) return msg, metadata, err } var ( - filter_SyncService_SyncGroup_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_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_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_SyncGroup_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.SyncGroup(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_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_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_SyncGroup_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.SyncUserKeyWallet(ctx, &protoReq) + return msg, metadata, err + +} + +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) + 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.UpdateUserKeyWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +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) + 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.SyncGroup(ctx, &protoReq) + msg, err := server.UpdateUserKeyWallet(ctx, &protoReq) return msg, metadata, err } @@ -177,7 +213,32 @@ func local_request_SyncService_SyncGroup_0(ctx context.Context, marshaler runtim // 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 + 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/SyncConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/config")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + 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 { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyncService_SyncConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + 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 @@ -185,12 +246,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/UpdateConfig", runtime.WithHTTPPathPattern("/gapi/sync/v1/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_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 { @@ -198,11 +259,11 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_Sync_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateConfig_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("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 @@ -210,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/Update", runtime.WithHTTPPathPattern("/gapi/sync/v1/update")) + 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_Update_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 { @@ -223,11 +284,11 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_Update_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncTeam_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_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 @@ -235,12 +296,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/SyncUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/key_wallet")) 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_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 { @@ -248,11 +309,11 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_UpdateGroup_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_SyncGroup_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 @@ -260,12 +321,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/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/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_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 { @@ -273,7 +334,7 @@ func RegisterSyncServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return } - forward_SyncService_SyncGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_UpdateUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -318,91 +379,113 @@ 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/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/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()...) }) - mux.Handle("POST", pattern_SyncService_UpdateGroup_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/UpdateGroup", runtime.WithHTTPPathPattern("/gapi/sync/v1/update_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_UpdateGroup_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_UpdateGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SyncService_SyncTeam_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/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("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/UpdateUserKeyWallet", runtime.WithHTTPPathPattern("/gapi/sync/v1/key_wallet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + 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_UpdateUserKeyWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -410,21 +493,25 @@ 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", "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", "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_SyncTeam_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "team"}, "")) - 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_UpdateUserKeyWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"gapi", "sync", "v1", "key_wallet"}, "")) ) var ( - forward_SyncService_Sync_0 = runtime.ForwardResponseMessage + forward_SyncService_SyncConfig_0 = runtime.ForwardResponseMessage + + forward_SyncService_UpdateConfig_0 = runtime.ForwardResponseMessage - forward_SyncService_Update_0 = runtime.ForwardResponseMessage + forward_SyncService_SyncTeam_0 = runtime.ForwardResponseMessage - forward_SyncService_UpdateGroup_0 = runtime.ForwardResponseMessage + forward_SyncService_SyncUserKeyWallet_0 = runtime.ForwardResponseMessage - forward_SyncService_SyncGroup_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 b6382fa..c8f66ae 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -6,7 +6,8 @@ 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 UserV1Key_wallet from "../../user/v1/key_wallet.pb" import * as SyncV1Host from "./host.pb" import * as SyncV1Keychain from "./keychain.pb" import * as SyncV1Known_hosts from "./known_hosts.pb" @@ -19,12 +20,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 + teamId?: string } -export type SyncResponse = { +export type SyncConfigResponse = { serverTime?: GoogleProtobufTimestamp.Timestamp hostSet?: SyncV1Host.Host[] knownHostSet?: SyncV1Known_hosts.KnownHost[] @@ -33,47 +34,66 @@ export type SyncResponse = { } -type BaseUpdateRequest = { - groupId?: string +type BaseUpdateConfigRequest = { + teamId?: 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 = { - group?: SyncV1Group.Group +export type SyncTeamRequest = { + after?: GoogleProtobufTimestamp.Timestamp } -export type UpdateGroupResponse = { +export type SyncTeamResponse = { + serverTime?: GoogleProtobufTimestamp.Timestamp + teams?: TeamV1Team.Team[] } -export type SyncGroupRequest = { +export type SyncUserKeyWalletRequest = { after?: GoogleProtobufTimestamp.Timestamp } -export type SyncGroupResponse = { +export type SyncUserKeyWalletResponse = { serverTime?: GoogleProtobufTimestamp.Timestamp - groups?: SyncV1Group.Group[] + publicKey?: string + encryptedPrivateKey?: string + userKeyWalletSet?: UserV1Key_wallet.UserKeyWallet[] +} + +export type UpdateUserKeyWalletRequest = { + publicKey?: string + encryptedPrivateKey?: string + userKeyWalletSet?: UserV1Key_wallet.UserKeyWallet[] +} + +export type UpdateUserKeyWalletResponse = { + publicKey?: string + encryptedPrivateKey?: string + userKeyWalletSet?: UserV1Key_wallet.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/config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + } + 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 Update(req: UpdateRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/update`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) + static SyncTeam(req: SyncTeamRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/team?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } - 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)}) + static SyncUserKeyWallet(req: SyncUserKeyWalletRequest, initReq?: fm.InitReq): Promise { + return fm.fetchReq(`/gapi/sync/v1/key_wallet?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } - static SyncGroup(req: SyncGroupRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/gapi/sync/v1/sync_group?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) + static UpdateUserKeyWallet(req: UpdateUserKeyWalletRequest, initReq?: fm.InitReq): Promise { + 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 635dc1d..a18aa16 100644 --- a/gen/proto/sync/v1/sync_service_grpc.pb.go +++ b/gen/proto/sync/v1/sync_service_grpc.pb.go @@ -19,10 +19,11 @@ 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_SyncConfig_FullMethodName = "/sync.v1.SyncService/SyncConfig" + SyncService_UpdateConfig_FullMethodName = "/sync.v1.SyncService/UpdateConfig" + SyncService_SyncTeam_FullMethodName = "/sync.v1.SyncService/SyncTeam" + SyncService_SyncUserKeyWallet_FullMethodName = "/sync.v1.SyncService/SyncUserKeyWallet" + SyncService_UpdateUserKeyWallet_FullMethodName = "/sync.v1.SyncService/UpdateUserKeyWallet" ) // SyncServiceClient is the client API for SyncService service. @@ -30,13 +31,15 @@ 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) - // 提交最新配置 若配置的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) + SyncConfig(ctx context.Context, in *SyncConfigRequest, opts ...grpc.CallOption) (*SyncConfigResponse, error) + // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 + UpdateConfig(ctx context.Context, in *UpdateConfigRequest, opts ...grpc.CallOption) (*UpdateConfigResponse, error) + // 通过UID获取所有所在组变动信息 + SyncTeam(ctx context.Context, in *SyncTeamRequest, opts ...grpc.CallOption) (*SyncTeamResponse, error) + // 获取用户密钥对 + SyncUserKeyWallet(ctx context.Context, in *SyncUserKeyWalletRequest, opts ...grpc.CallOption) (*SyncUserKeyWalletResponse, error) + // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 + UpdateUserKeyWallet(ctx context.Context, in *UpdateUserKeyWalletRequest, opts ...grpc.CallOption) (*UpdateUserKeyWalletResponse, error) } type syncServiceClient struct { @@ -47,36 +50,45 @@ 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 } 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...) +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 } 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) 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) 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 } @@ -88,13 +100,15 @@ func (c *syncServiceClient) SyncGroup(ctx context.Context, in *SyncGroupRequest, // for forward compatibility 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) + SyncConfig(context.Context, *SyncConfigRequest) (*SyncConfigResponse, error) + // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 + UpdateConfig(context.Context, *UpdateConfigRequest) (*UpdateConfigResponse, error) + // 通过UID获取所有所在组变动信息 + SyncTeam(context.Context, *SyncTeamRequest) (*SyncTeamResponse, error) + // 获取用户密钥对 + SyncUserKeyWallet(context.Context, *SyncUserKeyWalletRequest) (*SyncUserKeyWalletResponse, error) + // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 + UpdateUserKeyWallet(context.Context, *UpdateUserKeyWalletRequest) (*UpdateUserKeyWalletResponse, error) mustEmbedUnimplementedSyncServiceServer() } @@ -102,17 +116,20 @@ 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") +func (UnimplementedSyncServiceServer) SyncTeam(context.Context, *SyncTeamRequest) (*SyncTeamResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncTeam not implemented") } -func (UnimplementedSyncServiceServer) SyncGroup(context.Context, *SyncGroupRequest) (*SyncGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncGroup not implemented") +func (UnimplementedSyncServiceServer) SyncUserKeyWallet(context.Context, *SyncUserKeyWalletRequest) (*SyncUserKeyWalletResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncUserKeyWallet not implemented") +} +func (UnimplementedSyncServiceServer) UpdateUserKeyWallet(context.Context, *UpdateUserKeyWalletRequest) (*UpdateUserKeyWalletResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUserKeyWallet not implemented") } func (UnimplementedSyncServiceServer) mustEmbedUnimplementedSyncServiceServer() {} @@ -127,74 +144,92 @@ 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).SyncConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncService_SyncConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncServiceServer).SyncConfig(ctx, req.(*SyncConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +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).Sync(ctx, in) + return srv.(SyncServiceServer).UpdateConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SyncService_Sync_FullMethodName, + FullMethod: SyncService_UpdateConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).Sync(ctx, req.(*SyncRequest)) + return srv.(SyncServiceServer).UpdateConfig(ctx, req.(*UpdateConfigRequest)) } 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_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).Update(ctx, in) + return srv.(SyncServiceServer).SyncTeam(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SyncService_Update_FullMethodName, + FullMethod: SyncService_SyncTeam_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).Update(ctx, req.(*UpdateRequest)) + return srv.(SyncServiceServer).SyncTeam(ctx, req.(*SyncTeamRequest)) } 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) +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).UpdateGroup(ctx, in) + return srv.(SyncServiceServer).SyncUserKeyWallet(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SyncService_UpdateGroup_FullMethodName, + FullMethod: SyncService_SyncUserKeyWallet_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).UpdateGroup(ctx, req.(*UpdateGroupRequest)) + return srv.(SyncServiceServer).SyncUserKeyWallet(ctx, req.(*SyncUserKeyWalletRequest)) } 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_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).SyncGroup(ctx, in) + return srv.(SyncServiceServer).UpdateUserKeyWallet(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SyncService_SyncGroup_FullMethodName, + FullMethod: SyncService_UpdateUserKeyWallet_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SyncServiceServer).SyncGroup(ctx, req.(*SyncGroupRequest)) + return srv.(SyncServiceServer).UpdateUserKeyWallet(ctx, req.(*UpdateUserKeyWalletRequest)) } return interceptor(ctx, in, info, handler) } @@ -207,20 +242,24 @@ var SyncService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*SyncServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "Sync", - Handler: _SyncService_Sync_Handler, + MethodName: "SyncConfig", + Handler: _SyncService_SyncConfig_Handler, + }, + { + MethodName: "UpdateConfig", + Handler: _SyncService_UpdateConfig_Handler, }, { - MethodName: "Update", - Handler: _SyncService_Update_Handler, + MethodName: "SyncTeam", + Handler: _SyncService_SyncTeam_Handler, }, { - MethodName: "UpdateGroup", - Handler: _SyncService_UpdateGroup_Handler, + MethodName: "SyncUserKeyWallet", + Handler: _SyncService_SyncUserKeyWallet_Handler, }, { - MethodName: "SyncGroup", - Handler: _SyncService_SyncGroup_Handler, + MethodName: "UpdateUserKeyWallet", + Handler: _SyncService_UpdateUserKeyWallet_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/gen/proto/team/v1/team.pb.go b/gen/proto/team/v1/team.pb.go new file mode 100644 index 0000000..b18d7df --- /dev/null +++ b/gen/proto/team/v1/team.pb.go @@ -0,0 +1,362 @@ +// 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 "" +} + +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{ + 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, 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 ( + 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, 2) +var file_team_v1_team_proto_goTypes = []interface{}{ + (*Team)(nil), // 0: team.v1.Team + (*InviteInfo)(nil), // 1: team.v1.InviteInfo + (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp +} +var file_team_v1_team_proto_depIdxs = []int32{ + 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() } +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 + } + } + 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_team_v1_team_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + 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/team/v1/team.pb.ts b/gen/proto/team/v1/team.pb.ts new file mode 100644 index 0000000..5cd1267 --- /dev/null +++ b/gen/proto/team/v1/team.pb.ts @@ -0,0 +1,28 @@ +/* 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 Team = { + id?: string + createdAt?: GoogleProtobufTimestamp.Timestamp + updatedAt?: GoogleProtobufTimestamp.Timestamp + deletedAt?: GoogleProtobufTimestamp.Timestamp + name?: string + description?: string + 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 new file mode 100644 index 0000000..4223882 --- /dev/null +++ b/gen/proto/team/v1/team_service.pb.go @@ -0,0 +1,1366 @@ +// 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 + + 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() { + *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) GetName() string { + if x != nil { + return x.Name + } + 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 { + 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"` + EncryptedTeamPrivateKey string `protobuf:"bytes,3,opt,name=encryptedTeamPrivateKey,proto3" json:"encryptedTeamPrivateKey,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) GetEncryptedTeamPrivateKey() string { + if x != nil { + return x.EncryptedTeamPrivateKey + } + return "" +} + +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() { + *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} +} + +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 + 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[14] + 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[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 RemoveMemberRequest.ProtoReflect.Descriptor instead. +func (*RemoveMemberRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{14} +} + +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[15] + 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[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 RemoveMemberResponse.ProtoReflect.Descriptor instead. +func (*RemoveMemberResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{15} +} + +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[16] + 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[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 AcceptInviteRequest.ProtoReflect.Descriptor instead. +func (*AcceptInviteRequest) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{16} +} + +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[17] + 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[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 AcceptInviteResponse.ProtoReflect.Descriptor instead. +func (*AcceptInviteResponse) Descriptor() ([]byte, []int) { + return file_team_v1_team_service_proto_rawDescGZIP(), []int{17} +} + +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, + 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, 0x32, 0x0a, 0x14, 0x49, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 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, 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, + 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 ( + 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, 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 + (*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{ + 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() } +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.(*ListInvitingMemberRequest); 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.(*ListInvitingMemberResponse); 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[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokeInviteMemberRequest); 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.(*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 + 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: 18, + 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..a58e925 --- /dev/null +++ b/gen/proto/team/v1/team_service.pb.gw.go @@ -0,0 +1,855 @@ +// 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 + +} + +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 + + 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 + +} + +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. +// 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("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() + 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()...) + + }) + + 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 +} + +// 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("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() + 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()...) + + }) + + 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 +} + +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_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"}, "")) +) + +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_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 new file mode 100644 index 0000000..bbc47cb --- /dev/null +++ b/gen/proto/team/v1/team_service.pb.ts @@ -0,0 +1,114 @@ +/* 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 = { + name?: string + description?: string + avatar?: string + uid?: string + publicKey?: string + encryptedPrivateKey?: string +} + +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 + encryptedTeamPrivateKey?: string +} + +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 = { + teamId?: string + userId?: string +} + +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"}) + } + 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 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)}) + } + 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 new file mode 100644 index 0000000..083088e --- /dev/null +++ b/gen/proto/team/v1/team_service_grpc.pb.go @@ -0,0 +1,423 @@ +// 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_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. +// +// 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) + // 列出邀请中列表 + 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) + // 接受邀请加入团队 + AcceptInvite(ctx context.Context, in *AcceptInviteRequest, opts ...grpc.CallOption) (*AcceptInviteResponse, 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) 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...) + if err != nil { + return nil, err + } + 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 +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) + // 列出邀请中列表 + ListInvitingMember(context.Context, *ListInvitingMemberRequest) (*ListInvitingMemberResponse, error) + // 撤回邀请 + RevokeInviteMember(context.Context, *RevokeInviteMemberRequest) (*RevokeInviteMemberResponse, error) + // 从团队中移除成员 + RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error) + // 接受邀请加入团队 + AcceptInvite(context.Context, *AcceptInviteRequest) (*AcceptInviteResponse, 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) 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") +} +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. +// 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_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 { + 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) +} + +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) +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: "ListInvitingMember", + Handler: _TeamService_ListInvitingMember_Handler, + }, + { + MethodName: "RevokeInviteMember", + Handler: _TeamService_RevokeInviteMember_Handler, + }, + { + MethodName: "RemoveMember", + Handler: _TeamService_RemoveMember_Handler, + }, + { + MethodName: "AcceptInvite", + Handler: _TeamService_AcceptInvite_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "team/v1/team_service.proto", +} diff --git a/gen/proto/user/v1/key_wallet.pb.go b/gen/proto/user/v1/key_wallet.pb.go new file mode 100644 index 0000000..42644c2 --- /dev/null +++ b/gen/proto/user/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: user/v1/key_wallet.proto + +package userV1 + +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"` + 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"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` +} + +func (x *UserKeyWallet) Reset() { + *x = UserKeyWallet{} + if protoimpl.UnsafeEnabled { + mi := &file_user_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_user_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_user_v1_key_wallet_proto_rawDescGZIP(), []int{0} +} + +func (x *UserKeyWallet) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *UserKeyWallet) GetTid() string { + if x != nil { + return x.Tid + } + return "" +} + +func (x *UserKeyWallet) GetEncryptedTeamPrivateKey() string { + if x != nil { + return x.EncryptedTeamPrivateKey + } + 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_user_v1_key_wallet_proto protoreflect.FileDescriptor + +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, 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, + 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, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + 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_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_user_v1_key_wallet_proto_rawDescData +} + +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_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 + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +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_user_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_user_v1_key_wallet_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + 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_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/group.pb.ts b/gen/proto/user/v1/key_wallet.pb.ts similarity index 67% rename from gen/proto/sync/v1/group.pb.ts rename to gen/proto/user/v1/key_wallet.pb.ts index 0ecc0ff..bf577b3 100644 --- a/gen/proto/sync/v1/group.pb.ts +++ b/gen/proto/user/v1/key_wallet.pb.ts @@ -5,18 +5,11 @@ */ import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" -export type Group = { - groupBasic?: GroupBasic - memberId?: string[] -} - -export type GroupBasic = { - id?: string +export type UserKeyWallet = { + uid?: string + tid?: string + encryptedTeamPrivateKey?: string createdAt?: GoogleProtobufTimestamp.Timestamp updatedAt?: GoogleProtobufTimestamp.Timestamp deletedAt?: GoogleProtobufTimestamp.Timestamp - name?: string - description?: string - avatar?: string - uid?: string } \ No newline at end of file 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/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/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 deleted file mode 100644 index 585f9b2..0000000 --- a/proto/sync/v1/group.proto +++ /dev/null @@ -1,22 +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 group_basic = 1; - repeated string member_id = 2; -} - -message GroupBasic { - string id = 1; - google.protobuf.Timestamp created_at = 2; - google.protobuf.Timestamp updated_at = 3; - google.protobuf.Timestamp deleted_at = 4; - string name = 5; - string description = 6; - string avatar = 7; - string uid = 8; // 创建者 -} 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 419bcce..2808597 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -3,81 +3,107 @@ 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/known_hosts.proto"; -import "sync/v1/group.proto"; +import "user/v1/key_wallet.proto"; 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/config"}; } - // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。 - rpc Update(UpdateRequest) returns (UpdateResponse) { + // 提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。这里只负责配置内容修改。 + rpc UpdateConfig(UpdateConfigRequest) returns (UpdateConfigResponse) { option (google.api.http) = { - post:"/gapi/sync/v1/update" + post:"/gapi/sync/v1/config" body: "*" }; } - // 更新组信息 - rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse) { + // 通过UID获取所有所在组变动信息 + rpc SyncTeam(SyncTeamRequest) returns (SyncTeamResponse) { + option (google.api.http) = {get:"/gapi/sync/v1/team"}; + } + // 获取用户密钥对 + rpc SyncUserKeyWallet(SyncUserKeyWalletRequest) returns (SyncUserKeyWalletResponse) { + option (google.api.http) = {get:"/gapi/sync/v1/key_wallet"}; + } + // 修改用户密钥对,修改的时候所有相关组的加密密钥均要替换 + rpc UpdateUserKeyWallet(UpdateUserKeyWalletRequest) returns (UpdateUserKeyWalletResponse) { option (google.api.http) = { - post:"/gapi/sync/v1/update_group" + post:"/gapi/sync/v1/key_wallet" body: "*" }; } - // 通过UID获取所有组信息 - rpc SyncGroup(SyncGroupRequest) returns (SyncGroupResponse) { - option (google.api.http) = {get:"/gapi/sync/v1/sync_group"}; - } } - -message SyncRequest { +// SyncConfig +message SyncConfigRequest { google.protobuf.Timestamp after = 1; // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 - string group_id = 2; + string teamId = 2; } -message SyncResponse { +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; } -message UpdateRequest { - string group_id = 2; +// UpdateConfig +message UpdateConfigRequest { + string teamId = 2; oneof data { Host host = 11; - KnownHost known_host = 12; - SshKey ssh_key = 13; + KnownHost knownHost = 12; + SshKey sshKey = 13; Identity identity = 14; } } -message UpdateResponse { +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; } } -message UpdateGroupRequest { - Group group = 1; +// SyncTeam +message SyncTeamRequest { + google.protobuf.Timestamp after = 1; } -message UpdateGroupResponse {} +message SyncTeamResponse { + google.protobuf.Timestamp serverTime = 1; + repeated team.v1.Team teams = 11; +} -message SyncGroupRequest { - google.protobuf.Timestamp after = 1; +// SyncUserKeyWallet +message SyncUserKeyWalletRequest { + google.protobuf.Timestamp after = 1; // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 +} + +message SyncUserKeyWalletResponse { + google.protobuf.Timestamp serverTime = 1; // 当前服务器时间,用于给客户端下一次拉取变动时做一个参照,避免因客户端时间偏差导致同步混乱 + string publicKey = 2; + string encryptedPrivateKey = 3; + repeated user.v1.UserKeyWallet userKeyWalletSet = 4; } -message SyncGroupResponse { - google.protobuf.Timestamp server_time = 1; - repeated Group groups = 11; -} \ No newline at end of file +// UpdateUserKeyWallet +message UpdateUserKeyWalletRequest { + string publicKey = 1; + string encryptedPrivateKey = 2; + repeated user.v1.UserKeyWallet userKeyWalletSet = 4; +} + +message UpdateUserKeyWalletResponse { + string publicKey = 1; + string encryptedPrivateKey = 2; + repeated user.v1.UserKeyWallet userKeyWalletSet = 4; +} diff --git a/proto/team/v1/team.proto b/proto/team/v1/team.proto new file mode 100644 index 0000000..8ccc321 --- /dev/null +++ b/proto/team/v1/team.proto @@ -0,0 +1,28 @@ +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; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 +} + +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 new file mode 100644 index 0000000..c3b314c --- /dev/null +++ b/proto/team/v1/team_service.proto @@ -0,0 +1,144 @@ +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 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) = { + post: "/gapi/team/v1/team/member/remove" + body: "*" + }; + } + // 接受邀请加入团队 + rpc AcceptInvite(AcceptInviteRequest) returns (AcceptInviteResponse) { + option (google.api.http) = { + post: "/gapi/team/v1/team/member/accept" + body: "*" + }; + } +} + +message GetTeamRequest { + string id = 1; +} + +message GetTeamResponse { + Team team = 1; +} + +message CreateTeamRequest { + string name = 1; + string description = 2; + string avatar = 3; + string uid = 4; // 创建者 + string publicKey = 5; // 公钥,公钥存在服务器上,加密的私钥与相关用户关联存储 + string encryptedPrivateKey = 6; // 创建者拥有的使用创建者公钥加密后的私钥 +} + +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 encryptedTeamPrivateKey = 3; // 使用受邀请用户的公钥加密后的团队私钥 +} + +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; + string userId = 2; +} + +message RemoveMemberResponse {} + +message AcceptInviteRequest { + string inviteId = 1; +} + +message AcceptInviteResponse {} diff --git a/proto/user/v1/key_wallet.proto b/proto/user/v1/key_wallet.proto new file mode 100644 index 0000000..620ac2d --- /dev/null +++ b/proto/user/v1/key_wallet.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package user.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/juanjiTech/jTerm-proto/gen/proto/user/v1;userV1"; + +message UserKeyWallet { + string uid = 1; + string tid = 2; + string encryptedTeamPrivateKey = 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/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 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; +}