实现访问日志配置

This commit is contained in:
GoEdgeLab
2020-09-20 11:56:22 +08:00
parent bdaa090b5d
commit e7d37ea6dc
15 changed files with 1203 additions and 144 deletions

View File

@@ -0,0 +1,13 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
message HTTPAccessLogPolicy {
int64 id = 1;
string name = 2;
bool isOn = 3;
string type = 4;
bytes optionsJSON = 5;
bytes condsJSON = 6;
}

View File

@@ -0,0 +1,21 @@
syntax = "proto3";
option go_package = "./pb";
package pb;
import "model_http_access_log_policy.proto";
service HTTPAccessLogPolicyService {
// 获取所有可用策略
rpc findAllEnabledHTTPAccessLogPolicies (FindAllEnabledHTTPAccessLogPoliciesRequest) returns (FindAllEnabledHTTPAccessLogPoliciesResponse);
}
// 获取所有可用策略
message FindAllEnabledHTTPAccessLogPoliciesRequest {
}
message FindAllEnabledHTTPAccessLogPoliciesResponse {
repeated HTTPAccessLogPolicy accessLogPolicies = 1;
}

View File

@@ -33,6 +33,9 @@ service HTTPWebService {
// 更改Pages
rpc updateHTTPWebPages (UpdateHTTPWebPagesRequest) returns (RPCUpdateSuccess);
// 更改访问日志配置
rpc updateHTTPAccessLog (UpdateHTTPAccessLogRequest) returns (RPCUpdateSuccess);
}
// 创建Web配置
@@ -94,3 +97,9 @@ message UpdateHTTPWebPagesRequest {
int64 webId = 1;
bytes pagesJSON = 2;
}
// 更改访问日志配置
message UpdateHTTPAccessLogRequest {
int64 webId = 1;
bytes accessLogJSON = 2;
}