mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-22 10:40:25 +08:00
实现重写规则管理
This commit is contained in:
41
pkg/rpc/protos/service_http_rewrite_rule.proto
Normal file
41
pkg/rpc/protos/service_http_rewrite_rule.proto
Normal file
@@ -0,0 +1,41 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "rpc_messages.proto";
|
||||
|
||||
service HTTPRewriteRuleService {
|
||||
// 创建重写规则
|
||||
rpc createHTTPRewriteRule (CreateHTTPRewriteRuleRequest) returns (CreateHTTPRewriteRuleResponse);
|
||||
|
||||
// 修改重写规则
|
||||
rpc updateHTTPRewriteRule (UpdateHTTPRewriteRuleRequest) returns (RPCUpdateSuccess);
|
||||
}
|
||||
|
||||
// 创建重写规则
|
||||
message CreateHTTPRewriteRuleRequest {
|
||||
string pattern = 1;
|
||||
string replace = 2;
|
||||
string mode = 3;
|
||||
int32 redirectStatus = 4;
|
||||
bool isBreak = 5;
|
||||
string proxyHost = 6;
|
||||
bool isOn = 7;
|
||||
}
|
||||
|
||||
message CreateHTTPRewriteRuleResponse {
|
||||
int64 rewriteRuleId = 1;
|
||||
}
|
||||
|
||||
// 修改重写规则
|
||||
message UpdateHTTPRewriteRuleRequest {
|
||||
int64 rewriteRuleId = 1;
|
||||
string pattern = 2;
|
||||
string replace = 3;
|
||||
string mode = 4;
|
||||
int32 redirectStatus = 5;
|
||||
bool isBreak = 6;
|
||||
string proxyHost = 7;
|
||||
bool isOn = 8;
|
||||
}
|
||||
Reference in New Issue
Block a user