阶段性提交

This commit is contained in:
刘祥超
2021-06-17 21:18:05 +08:00
parent 04e567b6d8
commit 0226b4aa98
15 changed files with 1590 additions and 130 deletions

View File

@@ -0,0 +1,13 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
// 服务认证策略
message HTTPAuthPolicy {
int64 id = 1;
bool isOn = 2;
string name = 3;
string type = 4;
bytes paramsJSON = 5;
}

View File

@@ -0,0 +1,47 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/model_http_auth_policy.proto";
import "models/rpc_messages.proto";
// 服务认证策略服务
service HTTPAuthPolicyService {
// 创建策略
rpc createHTTPAuthPolicy (CreateHTTPAuthPolicyRequest) returns (CreateHTTPAuthPolicyResponse);
// 修改策略
rpc updateHTTPAuthPolicy (UpdateHTTPAuthPolicyRequest) returns (RPCSuccess);
// 查找策略信息
rpc findEnabledHTTPAuthPolicy (FindEnabledHTTPAuthPolicyRequest) returns (FindEnabledHTTPAuthPolicyResponse);
}
// 创建策略
message CreateHTTPAuthPolicyRequest {
string name = 1;
string type = 2;
bytes paramsJSON = 3;
}
message CreateHTTPAuthPolicyResponse {
int64 httpAuthPolicyId = 1;
}
// 修改策略
message UpdateHTTPAuthPolicyRequest {
int64 httpAuthPolicyId = 1;
string name = 2;
bytes paramsJSON = 3;
bool isOn = 4;
}
// 查找策略信息
message FindEnabledHTTPAuthPolicyRequest {
int64 httpAuthPolicyId = 1;
}
message FindEnabledHTTPAuthPolicyResponse {
HTTPAuthPolicy httpAuthPolicy = 1;
}

View File

@@ -69,6 +69,9 @@ service HTTPWebService {
// 查找主机跳转设置
rpc findHTTPWebHostRedirects (FindHTTPWebHostRedirectsRequest) returns (FindHTTPWebHostRedirectsResponse);
// 更改认证设置
rpc updateHTTPWebAuth (UpdateHTTPWebAuthRequest) returns (RPCSuccess);
}
// 创建Web配置
@@ -207,4 +210,10 @@ message FindHTTPWebHostRedirectsRequest {
message FindHTTPWebHostRedirectsResponse {
bytes hostRedirectsJSON = 1;
}
// 更改认证设置
message UpdateHTTPWebAuthRequest {
int64 webId = 1;
bytes authJSON = 2;
}