Files
EdgeCommon/pkg/rpc/protos/service_http_page.proto

54 lines
1.4 KiB
Protocol Buffer
Raw Normal View History

2020-09-17 10:15:55 +08:00
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/rpc_messages.proto";
2020-09-17 10:15:55 +08:00
// 自定义页面服务
2020-09-17 10:15:55 +08:00
service HTTPPageService {
// 创建Page
rpc createHTTPPage (CreateHTTPPageRequest) returns (CreateHTTPPageResponse);
// 修改Page
rpc updateHTTPPage (UpdateHTTPPageRequest) returns (RPCSuccess);
2020-09-17 10:15:55 +08:00
// 查找单个Page配置
rpc findEnabledHTTPPageConfig (FindEnabledHTTPPageConfigRequest) returns (FindEnabledHTTPPageConfigResponse);
}
// 创建Page
message CreateHTTPPageRequest {
repeated string statusList = 1; // 状态码列表
string bodyType = 5; // 页面类型html|url|redirectURL
string url = 2; // 读取或者跳转的URL
string body = 4; // HTML内容
int32 newStatus = 3; // 新的状态码
bytes exceptURLPatternsJSON = 6; // 例外URL列表
bytes onlyURLPatternsJSON = 7; // 限制URL列表
2020-09-17 10:15:55 +08:00
}
message CreateHTTPPageResponse {
2022-03-31 15:19:13 +08:00
int64 httpPageId = 1;
2020-09-17 10:15:55 +08:00
}
// 修改Page
message UpdateHTTPPageRequest {
2022-03-31 15:19:13 +08:00
int64 httpPageId = 1;
2020-09-17 10:15:55 +08:00
repeated string statusList = 2;
string bodyType = 6; // 页面类型html|url|redirectURL
2020-09-17 10:15:55 +08:00
string url = 3;
2021-10-10 10:35:09 +08:00
string body = 5;
2020-09-17 10:15:55 +08:00
int32 newStatus = 4;
bytes exceptURLPatternsJSON = 7; // 例外URL列表
bytes onlyURLPatternsJSON = 8; // 限制URL列表
2020-09-17 10:15:55 +08:00
}
// 查找单个Page配置
message FindEnabledHTTPPageConfigRequest {
2022-03-31 15:19:13 +08:00
int64 httpPageId = 1;
2020-09-17 10:15:55 +08:00
}
message FindEnabledHTTPPageConfigResponse {
2020-09-21 19:52:10 +08:00
bytes pageJSON = 1;
2020-09-17 10:15:55 +08:00
}