2021-05-27 17:08:57 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
option go_package = "./pb";
|
|
|
|
|
|
|
|
|
|
package pb;
|
|
|
|
|
|
|
|
|
|
import "models/model_ns_record.proto";
|
|
|
|
|
import "models/rpc_messages.proto";
|
|
|
|
|
|
|
|
|
|
// 域名记录相关服务
|
|
|
|
|
service NSRecordService {
|
|
|
|
|
// 创建记录
|
|
|
|
|
rpc createNSRecord (CreateNSRecordRequest) returns (CreateNSRecordResponse);
|
|
|
|
|
|
|
|
|
|
// 修改记录
|
|
|
|
|
rpc updateNSRecord (UpdateNSRecordRequest) returns (RPCSuccess);
|
|
|
|
|
|
|
|
|
|
// 删除记录
|
|
|
|
|
rpc deleteNSRecord (DeleteNSRecordRequest) returns (RPCSuccess);
|
|
|
|
|
|
|
|
|
|
// 计算记录数量
|
|
|
|
|
rpc countAllEnabledNSRecords (CountAllEnabledNSRecordsRequest) returns (RPCCountResponse);
|
|
|
|
|
|
|
|
|
|
// 读取单页记录
|
|
|
|
|
rpc listEnabledNSRecords (ListEnabledNSRecordsRequest) returns (ListEnabledNSRecordsResponse);
|
|
|
|
|
|
|
|
|
|
// 查询单个记录信息
|
|
|
|
|
rpc findEnabledNSRecord (FindEnabledNSRecordRequest) returns (FindEnabledNSRecordResponse);
|
2021-06-01 16:43:13 +08:00
|
|
|
|
|
|
|
|
// 根据版本列出一组记录
|
|
|
|
|
rpc listNSRecordsAfterVersion (ListNSRecordsAfterVersionRequest) returns (ListNSRecordsAfterVersionResponse);
|
2021-05-27 17:08:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建记录
|
|
|
|
|
message CreateNSRecordRequest {
|
|
|
|
|
int64 nsDomainId = 1;
|
|
|
|
|
string description = 2;
|
|
|
|
|
string name = 3;
|
|
|
|
|
string type = 4;
|
|
|
|
|
string value = 5;
|
|
|
|
|
int32 ttl = 6;
|
2021-08-09 13:59:55 +08:00
|
|
|
repeated int64 nsRouteIds = 7 [deprecated = true];
|
|
|
|
|
repeated string nsRouteCodes = 8; // 路线代号
|
2021-05-27 17:08:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message CreateNSRecordResponse {
|
|
|
|
|
int64 nsRecordId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改记录
|
|
|
|
|
message UpdateNSRecordRequest {
|
|
|
|
|
int64 nsRecordId = 1;
|
|
|
|
|
string description = 2;
|
|
|
|
|
string name = 3;
|
|
|
|
|
string type = 4;
|
|
|
|
|
string value = 5;
|
|
|
|
|
int32 ttl = 6;
|
2021-08-09 13:59:55 +08:00
|
|
|
repeated int64 nsRouteIds = 7 [deprecated = true];
|
2021-07-20 19:03:56 +08:00
|
|
|
bool isOn = 8;
|
2021-08-09 13:59:55 +08:00
|
|
|
repeated string nsRouteCodes = 9; // 路线代号
|
2021-05-27 17:08:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除记录
|
|
|
|
|
message DeleteNSRecordRequest {
|
|
|
|
|
int64 nsRecordId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 计算记录数量
|
|
|
|
|
message CountAllEnabledNSRecordsRequest {
|
|
|
|
|
int64 nsDomainId = 1;
|
|
|
|
|
string type = 2;
|
2021-08-09 13:59:55 +08:00
|
|
|
int64 nsRouteId = 3 [deprecated = true]; // 使用nsRouteCode代替
|
|
|
|
|
string nsRouteCode = 5;
|
2021-05-27 17:08:57 +08:00
|
|
|
string keyword = 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 读取单页记录
|
|
|
|
|
message ListEnabledNSRecordsRequest {
|
|
|
|
|
int64 nsDomainId = 1;
|
|
|
|
|
string type = 2;
|
2021-08-09 13:59:55 +08:00
|
|
|
int64 nsRouteId = 3 [deprecated = true]; // 使用nsRouteCode代替
|
|
|
|
|
string nsRouteCode = 7;
|
2021-05-27 17:08:57 +08:00
|
|
|
string keyword = 4;
|
|
|
|
|
int64 offset = 5;
|
|
|
|
|
int64 size = 6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ListEnabledNSRecordsResponse {
|
|
|
|
|
repeated NSRecord nsRecords = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查询单个记录信息
|
|
|
|
|
message FindEnabledNSRecordRequest {
|
|
|
|
|
int64 nsRecordId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message FindEnabledNSRecordResponse {
|
|
|
|
|
NSRecord nsRecord = 1;
|
2021-06-01 16:43:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据版本列出一组记录
|
|
|
|
|
message ListNSRecordsAfterVersionRequest {
|
|
|
|
|
int64 version = 1;
|
|
|
|
|
int64 size = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ListNSRecordsAfterVersionResponse {
|
|
|
|
|
repeated NSRecord nsRecords = 1;
|
2021-05-27 17:08:57 +08:00
|
|
|
}
|