From 57f22f4fb2910064f7a3adcd8ee9fb3d4f56b6fe Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 10 Mar 2024 11:24:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BC=93=E5=AD=98=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E9=94=AE=E5=80=BC=E4=B8=AD=E5=A2=9E=E5=8A=A0=E9=9B=86=E7=BE=A4?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/rpc.json | 6 +- pkg/rpc/pb/model_http_cache_task_key.pb.go | 80 +++++++++++-------- .../models/model_http_cache_task_key.proto | 4 + 3 files changed, 56 insertions(+), 34 deletions(-) diff --git a/build/rpc.json b/build/rpc.json index c943bb5..fc11547 100644 --- a/build/rpc.json +++ b/build/rpc.json @@ -799,7 +799,9 @@ "responseMessageName": "FindAdminWithUsernameResponse", "code": "rpc findAdminWithUsername(FindAdminWithUsernameRequest) returns (FindAdminWithUsernameResponse);", "doc": "使用用管理员户名查找管理员信息", - "roles": [], + "roles": [ + "admin" + ], "isDeprecated": false }, { @@ -20580,7 +20582,7 @@ }, { "name": "HTTPCacheTaskKey", - "code": "message HTTPCacheTaskKey {\n\tint64 id = 1; // 缓存键ID\n\tint64 taskId = 2; // 任务ID\n\tstring key = 3; // 缓存键\n\tstring type = 4; // 操作类型:purge|fetch\n\tstring keyType = 5; // 键类型:key|prefix\n\tbool isDone = 6; // 是否已完成\n\tbool isDoing = 9; // 是否执行中\n\tbytes errorsJSON = 7; // 错误信息\n\tint64 nodeClusterId = 8; // 所属集群ID\n}", + "code": "message HTTPCacheTaskKey {\n\tint64 id = 1; // 缓存键ID\n\tint64 taskId = 2; // 任务ID\n\tstring key = 3; // 缓存键\n\tstring type = 4; // 操作类型:purge|fetch\n\tstring keyType = 5; // 键类型:key|prefix\n\tbool isDone = 6; // 是否已完成\n\tbool isDoing = 9; // 是否执行中\n\tbytes errorsJSON = 7; // 错误信息\n\tint64 nodeClusterId = 8; // 所属集群ID\n\n\tNodeCluster nodeCluster = 30; // 所属集群,不一定有内容\n}", "doc": "" }, { diff --git a/pkg/rpc/pb/model_http_cache_task_key.pb.go b/pkg/rpc/pb/model_http_cache_task_key.pb.go index 199f3c4..9e749b2 100644 --- a/pkg/rpc/pb/model_http_cache_task_key.pb.go +++ b/pkg/rpc/pb/model_http_cache_task_key.pb.go @@ -25,15 +25,16 @@ type HTTPCacheTaskKey struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 缓存键ID - TaskId int64 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId,omitempty"` // 任务ID - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // 缓存键 - Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // 操作类型:purge|fetch - KeyType string `protobuf:"bytes,5,opt,name=keyType,proto3" json:"keyType,omitempty"` // 键类型:key|prefix - IsDone bool `protobuf:"varint,6,opt,name=isDone,proto3" json:"isDone,omitempty"` // 是否已完成 - IsDoing bool `protobuf:"varint,9,opt,name=isDoing,proto3" json:"isDoing,omitempty"` // 是否执行中 - ErrorsJSON []byte `protobuf:"bytes,7,opt,name=errorsJSON,proto3" json:"errorsJSON,omitempty"` // 错误信息 - NodeClusterId int64 `protobuf:"varint,8,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"` // 所属集群ID + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 缓存键ID + TaskId int64 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId,omitempty"` // 任务ID + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // 缓存键 + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // 操作类型:purge|fetch + KeyType string `protobuf:"bytes,5,opt,name=keyType,proto3" json:"keyType,omitempty"` // 键类型:key|prefix + IsDone bool `protobuf:"varint,6,opt,name=isDone,proto3" json:"isDone,omitempty"` // 是否已完成 + IsDoing bool `protobuf:"varint,9,opt,name=isDoing,proto3" json:"isDoing,omitempty"` // 是否执行中 + ErrorsJSON []byte `protobuf:"bytes,7,opt,name=errorsJSON,proto3" json:"errorsJSON,omitempty"` // 错误信息 + NodeClusterId int64 `protobuf:"varint,8,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"` // 所属集群ID + NodeCluster *NodeCluster `protobuf:"bytes,30,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"` // 所属集群,不一定有内容 } func (x *HTTPCacheTaskKey) Reset() { @@ -131,29 +132,41 @@ func (x *HTTPCacheTaskKey) GetNodeClusterId() int64 { return 0 } +func (x *HTTPCacheTaskKey) GetNodeCluster() *NodeCluster { + if x != nil { + return x.NodeCluster + } + return nil +} + var File_models_model_http_cache_task_key_proto protoreflect.FileDescriptor var file_models_model_http_cache_task_key_proto_rawDesc = []byte{ 0x0a, 0x26, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6b, - 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xf2, 0x01, 0x0a, - 0x10, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4b, 0x65, - 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x44, - 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x44, 0x6f, 0x6e, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x24, 0x0a, 0x0d, 0x6e, - 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, - 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x02, + 0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4b, + 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, + 0x44, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x44, 0x6f, + 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x24, 0x0a, 0x0d, + 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -171,13 +184,15 @@ func file_models_model_http_cache_task_key_proto_rawDescGZIP() []byte { var file_models_model_http_cache_task_key_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_models_model_http_cache_task_key_proto_goTypes = []interface{}{ (*HTTPCacheTaskKey)(nil), // 0: pb.HTTPCacheTaskKey + (*NodeCluster)(nil), // 1: pb.NodeCluster } var file_models_model_http_cache_task_key_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 1, // 0: pb.HTTPCacheTaskKey.nodeCluster:type_name -> pb.NodeCluster + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] 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 } func init() { file_models_model_http_cache_task_key_proto_init() } @@ -185,6 +200,7 @@ func file_models_model_http_cache_task_key_proto_init() { if File_models_model_http_cache_task_key_proto != nil { return } + file_models_model_node_cluster_proto_init() if !protoimpl.UnsafeEnabled { file_models_model_http_cache_task_key_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HTTPCacheTaskKey); i { diff --git a/pkg/rpc/protos/models/model_http_cache_task_key.proto b/pkg/rpc/protos/models/model_http_cache_task_key.proto index 0c1b6a9..68a1f24 100644 --- a/pkg/rpc/protos/models/model_http_cache_task_key.proto +++ b/pkg/rpc/protos/models/model_http_cache_task_key.proto @@ -3,6 +3,8 @@ option go_package = "./pb"; package pb; +import "models/model_node_cluster.proto"; + message HTTPCacheTaskKey { int64 id = 1; // 缓存键ID int64 taskId = 2; // 任务ID @@ -13,4 +15,6 @@ message HTTPCacheTaskKey { bool isDoing = 9; // 是否执行中 bytes errorsJSON = 7; // 错误信息 int64 nodeClusterId = 8; // 所属集群ID + + NodeCluster nodeCluster = 30; // 所属集群,不一定有内容 } \ No newline at end of file