增加部分API注释

This commit is contained in:
刘祥超
2023-07-09 10:15:33 +08:00
parent 1c192050c7
commit 8639bd213e
5 changed files with 24 additions and 24 deletions

View File

@@ -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": ""
},
{

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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
}

View File

@@ -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
}