2020-11-07 19:40:32 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
option go_package = "./pb";
|
|
|
|
|
|
|
|
|
|
package pb;
|
|
|
|
|
|
2021-01-25 16:41:30 +08:00
|
|
|
import "models/rpc_messages.proto";
|
|
|
|
|
import "models/model_ip_list.proto";
|
2020-11-07 19:40:32 +08:00
|
|
|
|
|
|
|
|
// IP列表
|
|
|
|
|
service IPListService {
|
|
|
|
|
// 创建IP列表
|
|
|
|
|
rpc createIPList (CreateIPListRequest) returns (CreateIPListResponse);
|
|
|
|
|
|
|
|
|
|
// 修改IP列表
|
2020-11-13 18:23:06 +08:00
|
|
|
rpc updateIPList (UpdateIPListRequest) returns (RPCSuccess);
|
2020-11-07 19:40:32 +08:00
|
|
|
|
|
|
|
|
// 查找IP列表
|
|
|
|
|
rpc findEnabledIPList (FindEnabledIPListRequest) returns (FindEnabledIPListResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建IP列表
|
|
|
|
|
message CreateIPListRequest {
|
|
|
|
|
string type = 1;
|
|
|
|
|
string name = 2;
|
|
|
|
|
string code = 3;
|
|
|
|
|
bytes timeoutJSON = 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message CreateIPListResponse {
|
|
|
|
|
int64 ipListId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改IP列表
|
|
|
|
|
message UpdateIPListRequest {
|
|
|
|
|
int64 ipListId = 1;
|
|
|
|
|
string name = 2;
|
|
|
|
|
string code = 3;
|
|
|
|
|
bytes timeoutJSON = 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查找IP列表
|
|
|
|
|
message FindEnabledIPListRequest {
|
|
|
|
|
int64 ipListId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message FindEnabledIPListResponse {
|
|
|
|
|
IPList ipList = 1;
|
|
|
|
|
}
|