From 8639bd213ea04863c3f4fff5e6ffba9960e45945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sun, 9 Jul 2023 10:15:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=83=A8=E5=88=86API?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/rpc.json | 4 ++-- pkg/rpc/pb/model_http_cache_task.pb.go | 6 +++--- pkg/rpc/pb/model_http_cache_task_key.pb.go | 18 +++++++++--------- .../protos/models/model_http_cache_task.proto | 6 +++--- .../models/model_http_cache_task_key.proto | 14 +++++++------- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/build/rpc.json b/build/rpc.json index b122d21..e7d5e4f 100644 --- a/build/rpc.json +++ b/build/rpc.json @@ -19806,12 +19806,12 @@ }, { "name": "HTTPCacheTask", - "code": "message HTTPCacheTask {\n\tint64 id = 1;\n\tint64 userId = 2;\n\tstring type = 3;\n\tstring keyType = 4;\n\tint64 createdAt = 5;\n\tint64 doneAt = 6;\n\tbool isDone = 7;\n\tbool isOk = 8;\n\tstring description = 9;\n\n\tUser user = 30;\n\trepeated HTTPCacheTaskKey httpCacheTaskKeys = 31;\n}", + "code": "message HTTPCacheTask {\n\tint64 id = 1; // 任务ID\n\tint64 userId = 2;\n\tstring type = 3;\n\tstring keyType = 4;\n\tint64 createdAt = 5;\n\tint64 doneAt = 6;\n\tbool isDone = 7;\n\tbool isOk = 8;\n\tstring description = 9;\n\n\tUser user = 30; // 所属用户\n\trepeated HTTPCacheTaskKey httpCacheTaskKeys = 31; // 包含的Key\n}", "doc": "" }, { "name": "HTTPCacheTaskKey", - "code": "message HTTPCacheTaskKey {\n\tint64 id = 1;\n\tint64 taskId = 2;\n\tstring key = 3;\n\tstring type = 4;\n\tstring keyType = 5;\n\tbool isDone = 6; // 是否已完成\n\tbool isDoing = 9; // 是否执行中\n\tbytes errorsJSON = 7;\n\tint64 nodeClusterId = 8;\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}", "doc": "" }, { diff --git a/pkg/rpc/pb/model_http_cache_task.pb.go b/pkg/rpc/pb/model_http_cache_task.pb.go index 9b46228..7361dd8 100644 --- a/pkg/rpc/pb/model_http_cache_task.pb.go +++ b/pkg/rpc/pb/model_http_cache_task.pb.go @@ -30,7 +30,7 @@ type HTTPCacheTask struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 任务ID UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` KeyType string `protobuf:"bytes,4,opt,name=keyType,proto3" json:"keyType,omitempty"` @@ -39,8 +39,8 @@ type HTTPCacheTask struct { IsDone bool `protobuf:"varint,7,opt,name=isDone,proto3" json:"isDone,omitempty"` IsOk bool `protobuf:"varint,8,opt,name=isOk,proto3" json:"isOk,omitempty"` Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` - User *User `protobuf:"bytes,30,opt,name=user,proto3" json:"user,omitempty"` - HttpCacheTaskKeys []*HTTPCacheTaskKey `protobuf:"bytes,31,rep,name=httpCacheTaskKeys,proto3" json:"httpCacheTaskKeys,omitempty"` + User *User `protobuf:"bytes,30,opt,name=user,proto3" json:"user,omitempty"` // 所属用户 + HttpCacheTaskKeys []*HTTPCacheTaskKey `protobuf:"bytes,31,rep,name=httpCacheTaskKeys,proto3" json:"httpCacheTaskKeys,omitempty"` // 包含的Key } func (x *HTTPCacheTask) Reset() { 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 034379a..c0c4091 100644 --- a/pkg/rpc/pb/model_http_cache_task_key.pb.go +++ b/pkg/rpc/pb/model_http_cache_task_key.pb.go @@ -30,15 +30,15 @@ type HTTPCacheTaskKey struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - TaskId int64 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId,omitempty"` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` - KeyType string `protobuf:"bytes,5,opt,name=keyType,proto3" json:"keyType,omitempty"` - 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 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 } func (x *HTTPCacheTaskKey) Reset() { diff --git a/pkg/rpc/protos/models/model_http_cache_task.proto b/pkg/rpc/protos/models/model_http_cache_task.proto index d7025f4..40756c9 100644 --- a/pkg/rpc/protos/models/model_http_cache_task.proto +++ b/pkg/rpc/protos/models/model_http_cache_task.proto @@ -7,7 +7,7 @@ import "models/model_user.proto"; import "models/model_http_cache_task_key.proto"; message HTTPCacheTask { - int64 id = 1; + int64 id = 1; // 任务ID int64 userId = 2; string type = 3; string keyType = 4; @@ -17,6 +17,6 @@ message HTTPCacheTask { bool isOk = 8; string description = 9; - User user = 30; - repeated HTTPCacheTaskKey httpCacheTaskKeys = 31; + User user = 30; // 所属用户 + repeated HTTPCacheTaskKey httpCacheTaskKeys = 31; // 包含的Key } \ No newline at end of file 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 7d59960..0c1b6a9 100644 --- a/pkg/rpc/protos/models/model_http_cache_task_key.proto +++ b/pkg/rpc/protos/models/model_http_cache_task_key.proto @@ -4,13 +4,13 @@ option go_package = "./pb"; package pb; message HTTPCacheTaskKey { - int64 id = 1; - int64 taskId = 2; - string key = 3; - string type = 4; - string keyType = 5; + int64 id = 1; // 缓存键ID + int64 taskId = 2; // 任务ID + string key = 3; // 缓存键 + string type = 4; // 操作类型:purge|fetch + string keyType = 5; // 键类型:key|prefix bool isDone = 6; // 是否已完成 bool isDoing = 9; // 是否执行中 - bytes errorsJSON = 7; - int64 nodeClusterId = 8; + bytes errorsJSON = 7; // 错误信息 + int64 nodeClusterId = 8; // 所属集群ID } \ No newline at end of file