2020-09-20 11:56:22 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
option go_package = "./pb";
|
|
|
|
|
|
|
|
|
|
package pb;
|
|
|
|
|
|
2021-01-25 16:41:30 +08:00
|
|
|
import "models/model_http_access_log_policy.proto";
|
2021-07-29 16:51:11 +08:00
|
|
|
import "models/rpc_messages.proto";
|
|
|
|
|
import "models/model_http_access_log.proto";
|
2020-09-20 11:56:22 +08:00
|
|
|
|
|
|
|
|
service HTTPAccessLogPolicyService {
|
2021-07-29 16:51:11 +08:00
|
|
|
// 计算访问日志策略数量
|
|
|
|
|
rpc countAllEnabledHTTPAccessLogPolicies (CountAllEnabledHTTPAccessLogPoliciesRequest) returns (RPCCountResponse);
|
|
|
|
|
|
|
|
|
|
// 列出单页访问日志策略
|
|
|
|
|
rpc listEnabledHTTPAccessLogPolicies (ListEnabledHTTPAccessLogPoliciesRequest) returns (ListEnabledHTTPAccessLogPoliciesResponse);
|
|
|
|
|
|
|
|
|
|
// 创建访问日志策略
|
|
|
|
|
rpc createHTTPAccessLogPolicy (CreateHTTPAccessLogPolicyRequest) returns (CreateHTTPAccessLogPolicyResponse);
|
|
|
|
|
|
|
|
|
|
// 修改访问日志策略
|
|
|
|
|
rpc updateHTTPAccessLogPolicy (UpdateHTTPAccessLogPolicyRequest) returns (RPCSuccess);
|
|
|
|
|
|
|
|
|
|
// 查找单个访问日志策略
|
|
|
|
|
rpc findEnabledHTTPAccessLogPolicy (FindEnabledHTTPAccessLogPolicyRequest) returns (FindEnabledHTTPAccessLogPolicyResponse);
|
|
|
|
|
|
|
|
|
|
// 删除访问日志策略
|
|
|
|
|
rpc deleteHTTPAccessLogPolicy (DeleteHTTPAccessLogPolicyRequest) returns (RPCSuccess);
|
|
|
|
|
|
|
|
|
|
// 测试写入某个访问日志策略
|
|
|
|
|
rpc writeHTTPAccessLogPolicy (WriteHTTPAccessLogPolicyRequest) returns (RPCSuccess);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 计算访问日志策略数量
|
|
|
|
|
message CountAllEnabledHTTPAccessLogPoliciesRequest {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 列出单页访问日志策略
|
|
|
|
|
message ListEnabledHTTPAccessLogPoliciesRequest {
|
|
|
|
|
int64 offset = 1;
|
|
|
|
|
int64 size = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ListEnabledHTTPAccessLogPoliciesResponse {
|
|
|
|
|
repeated HTTPAccessLogPolicy httpAccessLogPolicies = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建访问日志策略
|
|
|
|
|
message CreateHTTPAccessLogPolicyRequest {
|
|
|
|
|
string name = 1;
|
|
|
|
|
string type = 2;
|
|
|
|
|
bytes optionsJSON = 3;
|
|
|
|
|
bytes condsJSON = 4;
|
|
|
|
|
bool isPublic = 5;
|
2022-04-22 17:14:17 +08:00
|
|
|
bool firewallOnly = 6;
|
2020-09-20 11:56:22 +08:00
|
|
|
}
|
|
|
|
|
|
2021-07-29 16:51:11 +08:00
|
|
|
message CreateHTTPAccessLogPolicyResponse {
|
|
|
|
|
int64 httpAccessLogPolicyId = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改访问日志策略
|
|
|
|
|
message UpdateHTTPAccessLogPolicyRequest {
|
|
|
|
|
int64 httpAccessLogPolicyId = 1;
|
|
|
|
|
string name = 2;
|
|
|
|
|
bool isOn = 3;
|
|
|
|
|
bytes optionsJSON = 4;
|
|
|
|
|
bytes condsJSON = 5;
|
|
|
|
|
bool isPublic = 6;
|
2022-04-22 17:14:17 +08:00
|
|
|
bool firewallOnly = 7;
|
2021-07-29 16:51:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查找单个访问日志策略
|
|
|
|
|
message FindEnabledHTTPAccessLogPolicyRequest {
|
|
|
|
|
int64 httpAccessLogPolicyId = 1;
|
|
|
|
|
}
|
2020-09-20 11:56:22 +08:00
|
|
|
|
2021-07-29 16:51:11 +08:00
|
|
|
message FindEnabledHTTPAccessLogPolicyResponse {
|
|
|
|
|
HTTPAccessLogPolicy httpAccessLogPolicy = 1;
|
2020-09-20 11:56:22 +08:00
|
|
|
}
|
|
|
|
|
|
2021-07-29 16:51:11 +08:00
|
|
|
// 删除策略
|
|
|
|
|
message DeleteHTTPAccessLogPolicyRequest {
|
|
|
|
|
int64 httpAccessLogPolicyId = 1;
|
2020-09-20 11:56:22 +08:00
|
|
|
}
|
|
|
|
|
|
2021-07-29 16:51:11 +08:00
|
|
|
// 测试写入某个访问日志策略
|
|
|
|
|
message WriteHTTPAccessLogPolicyRequest {
|
|
|
|
|
int64 httpAccessLogPolicyId = 1;
|
|
|
|
|
HTTPAccessLog httpAccessLog = 2;
|
|
|
|
|
}
|