2020-09-21 19:52:10 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
option go_package = "./pb";
|
|
|
|
|
|
|
|
|
|
package pb;
|
|
|
|
|
|
2021-01-25 16:41:30 +08:00
|
|
|
import "models/rpc_messages.proto";
|
2020-09-21 19:52:10 +08:00
|
|
|
|
|
|
|
|
service HTTPLocationService {
|
|
|
|
|
// 创建路径规则
|
|
|
|
|
rpc createHTTPLocation (CreateHTTPLocationRequest) returns (CreateHTTPLocationResponse);
|
|
|
|
|
|
|
|
|
|
// 修改路径规则
|
2020-11-13 18:23:06 +08:00
|
|
|
rpc updateHTTPLocation (UpdateHTTPLocationRequest) returns (RPCSuccess);
|
2020-09-21 19:52:10 +08:00
|
|
|
|
|
|
|
|
// 查找路径规则配置
|
|
|
|
|
rpc findEnabledHTTPLocationConfig (FindEnabledHTTPLocationConfigRequest) returns (FindEnabledHTTPLocationConfigResponse);
|
|
|
|
|
|
|
|
|
|
// 删除路径规则
|
2020-11-13 18:23:06 +08:00
|
|
|
rpc deleteHTTPLocation (DeleteHTTPLocationRequest) returns (RPCSuccess);
|
2020-09-21 19:52:10 +08:00
|
|
|
|
|
|
|
|
// 查找反向代理设置
|
|
|
|
|
rpc findAndInitHTTPLocationReverseProxyConfig (FindAndInitHTTPLocationReverseProxyConfigRequest) returns (FindAndInitHTTPLocationReverseProxyConfigResponse);
|
|
|
|
|
|
|
|
|
|
// 初始化Web设置
|
|
|
|
|
rpc findAndInitHTTPLocationWebConfig (FindAndInitHTTPLocationWebConfigRequest) returns (FindAndInitHTTPLocationWebConfigResponse);
|
2020-09-22 11:36:40 +08:00
|
|
|
|
|
|
|
|
// 修改反向代理设置
|
2020-11-13 18:23:06 +08:00
|
|
|
rpc updateHTTPLocationReverseProxy (UpdateHTTPLocationReverseProxyRequest) returns (RPCSuccess);
|
2020-09-21 19:52:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建路径规则
|
|
|
|
|
message CreateHTTPLocationRequest {
|
|
|
|
|
int64 parentId = 1;
|
|
|
|
|
string name = 2;
|
|
|
|
|
string description = 3;
|
|
|
|
|
string pattern = 4;
|
|
|
|
|
bool isBreak = 5;
|
2021-06-09 21:43:58 +08:00
|
|
|
bytes condsJSON = 6;
|
2021-12-12 16:38:18 +08:00
|
|
|
repeated string domains = 7;
|
2020-09-21 19:52:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message CreateHTTPLocationResponse {
|
|
|
|
|
int64 locationId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改路径规则
|
|
|
|
|
message UpdateHTTPLocationRequest {
|
|
|
|
|
int64 locationId = 1;
|
|
|
|
|
string name = 2;
|
|
|
|
|
string description = 3;
|
|
|
|
|
string pattern = 4;
|
|
|
|
|
bool isOn = 5;
|
|
|
|
|
bool isBreak = 6;
|
2021-06-09 21:43:58 +08:00
|
|
|
bytes condsJSON = 7;
|
2021-12-12 16:38:18 +08:00
|
|
|
repeated string domains = 8;
|
2020-09-21 19:52:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查找路径规则配置
|
|
|
|
|
message FindEnabledHTTPLocationConfigRequest {
|
|
|
|
|
int64 locationId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message FindEnabledHTTPLocationConfigResponse {
|
|
|
|
|
bytes locationJSON = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除路径规则
|
|
|
|
|
message DeleteHTTPLocationRequest {
|
|
|
|
|
int64 locationId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查找反向代理设置
|
|
|
|
|
message FindAndInitHTTPLocationReverseProxyConfigRequest {
|
|
|
|
|
int64 locationId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message FindAndInitHTTPLocationReverseProxyConfigResponse {
|
|
|
|
|
bytes reverseProxyJSON = 1;
|
|
|
|
|
bytes reverseProxyRefJSON = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 初始化Web设置
|
|
|
|
|
message FindAndInitHTTPLocationWebConfigRequest {
|
|
|
|
|
int64 locationId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message FindAndInitHTTPLocationWebConfigResponse {
|
|
|
|
|
bytes webJSON = 1;
|
2020-09-22 11:36:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改反向代理设置
|
|
|
|
|
message UpdateHTTPLocationReverseProxyRequest {
|
|
|
|
|
int64 locationId = 1;
|
|
|
|
|
bytes reverseProxyJSON = 2;
|
|
|
|
|
}
|