From 30fb4286ed1632124a486b3b64bf0959dd20ebe7 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 25 Sep 2023 21:18:34 +0800 Subject: [PATCH 1/3] feat: group_in in Sync --- proto/sync/v1/sync_service.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/proto/sync/v1/sync_service.proto b/proto/sync/v1/sync_service.proto index f8b3f1e..1be79f4 100644 --- a/proto/sync/v1/sync_service.proto +++ b/proto/sync/v1/sync_service.proto @@ -22,6 +22,7 @@ service SyncService { message SyncRequest { google.protobuf.Timestamp after = 1; // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 + string group_id = 2; } message SyncResponse { From e665c5d308f3d8e66fbc8c1c200e90907970d6d1 Mon Sep 17 00:00:00 2001 From: GoldenSheep Date: Mon, 25 Sep 2023 21:20:09 +0800 Subject: [PATCH 2/3] feat: gen code --- gen/openapi/sync/v1/sync_service.swagger.json | 8 +- gen/proto/auth/v1/auth_service.pb.ts | 2 +- gen/proto/sync/v1/host.pb.ts | 2 +- gen/proto/sync/v1/keychain.pb.ts | 2 +- gen/proto/sync/v1/known_hosts.pb.ts | 2 +- gen/proto/sync/v1/sync_service.pb.go | 136 ++++++++++-------- gen/proto/sync/v1/sync_service.pb.ts | 11 +- gen/proto/user/v1/user_service.pb.ts | 4 +- 8 files changed, 92 insertions(+), 75 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index b784475..a9bfb9d 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -42,6 +42,12 @@ "required": false, "type": "string", "format": "date-time" + }, + { + "name": "groupId", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -461,7 +467,7 @@ "title": "密钥ID" } }, - "title": "Identity(身份) 包含身份验证详细信息,如果某些服务器需要提供同一组凭据,则可以节省配置的时间。\n这些凭据可以快速添加为身份并与主机条目链接。当凭据发生更改时,不必更新每台主机而只需更新身份即可。" + "title": "Identity(身份) 包含身份验证详细信息,如果某些服务器需要提供同一组凭据,则可以节省配置的时间。\r\n这些凭据可以快速添加为身份并与主机条目链接。当凭据发生更改时,不必更新每台主机而只需更新身份即可。" }, "v1KnownHost": { "type": "object", diff --git a/gen/proto/auth/v1/auth_service.pb.ts b/gen/proto/auth/v1/auth_service.pb.ts index e8747a4..df8ddc6 100644 --- a/gen/proto/auth/v1/auth_service.pb.ts +++ b/gen/proto/auth/v1/auth_service.pb.ts @@ -4,7 +4,7 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as fm from "../../fetch.pb" +import * as fm from "..\..\fetch.pb" export type RegisterRequest = { email?: string verifyCode?: string diff --git a/gen/proto/sync/v1/host.pb.ts b/gen/proto/sync/v1/host.pb.ts index f28903c..499376c 100644 --- a/gen/proto/sync/v1/host.pb.ts +++ b/gen/proto/sync/v1/host.pb.ts @@ -4,7 +4,7 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" +import * as GoogleProtobufTimestamp from "..\..\google\protobuf\timestamp.pb" export type Host = { id?: string createdAt?: GoogleProtobufTimestamp.Timestamp diff --git a/gen/proto/sync/v1/keychain.pb.ts b/gen/proto/sync/v1/keychain.pb.ts index 6d420b8..781e311 100644 --- a/gen/proto/sync/v1/keychain.pb.ts +++ b/gen/proto/sync/v1/keychain.pb.ts @@ -4,7 +4,7 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" +import * as GoogleProtobufTimestamp from "..\..\google\protobuf\timestamp.pb" export type SshKey = { id?: string createdAt?: GoogleProtobufTimestamp.Timestamp diff --git a/gen/proto/sync/v1/known_hosts.pb.ts b/gen/proto/sync/v1/known_hosts.pb.ts index 2ff346d..198b671 100644 --- a/gen/proto/sync/v1/known_hosts.pb.ts +++ b/gen/proto/sync/v1/known_hosts.pb.ts @@ -4,7 +4,7 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" +import * as GoogleProtobufTimestamp from "..\..\google\protobuf\timestamp.pb" export type KnownHost = { id?: string createdAt?: GoogleProtobufTimestamp.Timestamp diff --git a/gen/proto/sync/v1/sync_service.pb.go b/gen/proto/sync/v1/sync_service.pb.go index 7b8aede..44defde 100644 --- a/gen/proto/sync/v1/sync_service.pb.go +++ b/gen/proto/sync/v1/sync_service.pb.go @@ -27,7 +27,8 @@ type SyncRequest struct { 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"` // 获取该时间之后的设置变化,若不设置该字段,则拉取全量配置信息 + GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` } func (x *SyncRequest) Reset() { @@ -69,6 +70,13 @@ func (x *SyncRequest) GetAfter() *timestamppb.Timestamp { return nil } +func (x *SyncRequest) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + type SyncResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -379,71 +387,73 @@ var file_sync_v1_sync_service_proto_rawDesc = []byte{ 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, 0x22, 0x3f, 0x0a, 0x0b, 0x53, + 0x68, 0x6f, 0x73, 0x74, 0x73, 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, 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, 0xce, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x32, 0xb7, 0x01, 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, 0x57, 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, 0x67, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, - 0x74, 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, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 0xce, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 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, 0x32, 0xb7, 0x01, 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, 0x57, 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, + 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, 0x67, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 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, 0x73, 0x79, 0x6e, + 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index a188290..a63d802 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -4,11 +4,11 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as fm from "../../fetch.pb" -import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" -import * as SyncV1Host from "./host.pb" -import * as SyncV1Keychain from "./keychain.pb" -import * as SyncV1Known_hosts from "./known_hosts.pb" +import * as fm from "..\..\fetch.pb" +import * as GoogleProtobufTimestamp from "..\..\google\protobuf\timestamp.pb" +import * as SyncV1Host from ".\host.pb" +import * as SyncV1Keychain from ".\keychain.pb" +import * as SyncV1Known_hosts from ".\known_hosts.pb" type Absent = { [k in Exclude]?: undefined }; type OneOf = @@ -20,6 +20,7 @@ type OneOf = : never); export type SyncRequest = { after?: GoogleProtobufTimestamp.Timestamp + groupId?: string } export type SyncResponse = { diff --git a/gen/proto/user/v1/user_service.pb.ts b/gen/proto/user/v1/user_service.pb.ts index 01ae130..37f86f9 100644 --- a/gen/proto/user/v1/user_service.pb.ts +++ b/gen/proto/user/v1/user_service.pb.ts @@ -4,8 +4,8 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as fm from "../../fetch.pb" -import * as UserV1User from "./user.pb" +import * as fm from "..\..\fetch.pb" +import * as UserV1User from ".\user.pb" export type GetInfoRequest = { } From 9bc7a2f0ab3c08b20d4a3457f153daf5ac4dfa09 Mon Sep 17 00:00:00 2001 From: GoldenSheep402 Date: Mon, 25 Sep 2023 13:22:00 +0000 Subject: [PATCH 3/3] update: automatic generate new proto --- gen/openapi/sync/v1/sync_service.swagger.json | 2 +- gen/proto/auth/v1/auth_service.pb.ts | 2 +- gen/proto/sync/v1/host.pb.ts | 2 +- gen/proto/sync/v1/keychain.pb.ts | 2 +- gen/proto/sync/v1/known_hosts.pb.ts | 2 +- gen/proto/sync/v1/sync_service.pb.ts | 10 +++++----- gen/proto/user/v1/user_service.pb.ts | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gen/openapi/sync/v1/sync_service.swagger.json b/gen/openapi/sync/v1/sync_service.swagger.json index a9bfb9d..8e4573b 100644 --- a/gen/openapi/sync/v1/sync_service.swagger.json +++ b/gen/openapi/sync/v1/sync_service.swagger.json @@ -467,7 +467,7 @@ "title": "密钥ID" } }, - "title": "Identity(身份) 包含身份验证详细信息,如果某些服务器需要提供同一组凭据,则可以节省配置的时间。\r\n这些凭据可以快速添加为身份并与主机条目链接。当凭据发生更改时,不必更新每台主机而只需更新身份即可。" + "title": "Identity(身份) 包含身份验证详细信息,如果某些服务器需要提供同一组凭据,则可以节省配置的时间。\n这些凭据可以快速添加为身份并与主机条目链接。当凭据发生更改时,不必更新每台主机而只需更新身份即可。" }, "v1KnownHost": { "type": "object", diff --git a/gen/proto/auth/v1/auth_service.pb.ts b/gen/proto/auth/v1/auth_service.pb.ts index df8ddc6..e8747a4 100644 --- a/gen/proto/auth/v1/auth_service.pb.ts +++ b/gen/proto/auth/v1/auth_service.pb.ts @@ -4,7 +4,7 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as fm from "..\..\fetch.pb" +import * as fm from "../../fetch.pb" export type RegisterRequest = { email?: string verifyCode?: string diff --git a/gen/proto/sync/v1/host.pb.ts b/gen/proto/sync/v1/host.pb.ts index 499376c..f28903c 100644 --- a/gen/proto/sync/v1/host.pb.ts +++ b/gen/proto/sync/v1/host.pb.ts @@ -4,7 +4,7 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as GoogleProtobufTimestamp from "..\..\google\protobuf\timestamp.pb" +import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" export type Host = { id?: string createdAt?: GoogleProtobufTimestamp.Timestamp diff --git a/gen/proto/sync/v1/keychain.pb.ts b/gen/proto/sync/v1/keychain.pb.ts index 781e311..6d420b8 100644 --- a/gen/proto/sync/v1/keychain.pb.ts +++ b/gen/proto/sync/v1/keychain.pb.ts @@ -4,7 +4,7 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as GoogleProtobufTimestamp from "..\..\google\protobuf\timestamp.pb" +import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" export type SshKey = { id?: string createdAt?: GoogleProtobufTimestamp.Timestamp diff --git a/gen/proto/sync/v1/known_hosts.pb.ts b/gen/proto/sync/v1/known_hosts.pb.ts index 198b671..2ff346d 100644 --- a/gen/proto/sync/v1/known_hosts.pb.ts +++ b/gen/proto/sync/v1/known_hosts.pb.ts @@ -4,7 +4,7 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as GoogleProtobufTimestamp from "..\..\google\protobuf\timestamp.pb" +import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" export type KnownHost = { id?: string createdAt?: GoogleProtobufTimestamp.Timestamp diff --git a/gen/proto/sync/v1/sync_service.pb.ts b/gen/proto/sync/v1/sync_service.pb.ts index a63d802..d0346d1 100644 --- a/gen/proto/sync/v1/sync_service.pb.ts +++ b/gen/proto/sync/v1/sync_service.pb.ts @@ -4,11 +4,11 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as fm from "..\..\fetch.pb" -import * as GoogleProtobufTimestamp from "..\..\google\protobuf\timestamp.pb" -import * as SyncV1Host from ".\host.pb" -import * as SyncV1Keychain from ".\keychain.pb" -import * as SyncV1Known_hosts from ".\known_hosts.pb" +import * as fm from "../../fetch.pb" +import * as GoogleProtobufTimestamp from "../../google/protobuf/timestamp.pb" +import * as SyncV1Host from "./host.pb" +import * as SyncV1Keychain from "./keychain.pb" +import * as SyncV1Known_hosts from "./known_hosts.pb" type Absent = { [k in Exclude]?: undefined }; type OneOf = diff --git a/gen/proto/user/v1/user_service.pb.ts b/gen/proto/user/v1/user_service.pb.ts index 37f86f9..01ae130 100644 --- a/gen/proto/user/v1/user_service.pb.ts +++ b/gen/proto/user/v1/user_service.pb.ts @@ -4,8 +4,8 @@ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ -import * as fm from "..\..\fetch.pb" -import * as UserV1User from ".\user.pb" +import * as fm from "../../fetch.pb" +import * as UserV1User from "./user.pb" export type GetInfoRequest = { }