2020-10-10 11:49:30 +08:00
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
option go_package = "./pb";
|
|
|
|
|
|
|
|
|
|
|
|
package pb;
|
|
|
|
|
|
|
2021-01-25 16:41:30 +08:00
|
|
|
|
import "models/model_http_access_log.proto";
|
2020-10-10 11:49:30 +08:00
|
|
|
|
|
|
|
|
|
|
// 访问日志相关服务
|
|
|
|
|
|
service HTTPAccessLogService {
|
|
|
|
|
|
// 创建访问日志
|
|
|
|
|
|
rpc createHTTPAccessLogs (CreateHTTPAccessLogsRequest) returns (CreateHTTPAccessLogsResponse);
|
2020-10-10 19:22:22 +08:00
|
|
|
|
|
|
|
|
|
|
// 列出单页访问日志
|
|
|
|
|
|
rpc listHTTPAccessLogs (ListHTTPAccessLogsRequest) returns (ListHTTPAccessLogsResponse);
|
2020-11-02 21:15:48 +08:00
|
|
|
|
|
|
|
|
|
|
// 查找单个日志
|
|
|
|
|
|
rpc findHTTPAccessLog (FindHTTPAccessLogRequest) returns (FindHTTPAccessLogResponse);
|
2022-04-17 16:18:58 +08:00
|
|
|
|
|
|
|
|
|
|
// 查找日志分区
|
|
|
|
|
|
rpc findHTTPAccessLogPartitions(FindHTTPAccessLogPartitionsRequest) returns (FindHTTPAccessLogPartitionsResponse);
|
2020-10-10 11:49:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 创建访问日志
|
|
|
|
|
|
message CreateHTTPAccessLogsRequest {
|
2021-06-02 11:53:15 +08:00
|
|
|
|
repeated HTTPAccessLog httpAccessLogs = 1;
|
2020-10-10 11:49:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message CreateHTTPAccessLogsResponse {
|
|
|
|
|
|
|
2020-10-10 19:22:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 列出往前的单页访问日志
|
|
|
|
|
|
message ListHTTPAccessLogsRequest {
|
2021-01-03 21:38:12 +08:00
|
|
|
|
string requestId = 1; // 上一页请求ID,可选
|
|
|
|
|
|
int64 serverId = 2; // 服务ID
|
|
|
|
|
|
int64 size = 3; // 单页条数
|
2021-01-10 17:34:48 +08:00
|
|
|
|
string day = 4; // 日期,格式YYYYMMDD
|
2022-03-09 11:01:00 +08:00
|
|
|
|
string hourFrom = 17; // 开始小时
|
|
|
|
|
|
string hourTo = 18; // 结束小时
|
2021-01-03 21:38:12 +08:00
|
|
|
|
bool reverse = 5; // 是否反向查找,可选
|
|
|
|
|
|
bool hasError = 6; // 是否有错误,可选
|
|
|
|
|
|
int64 firewallPolicyId = 7; // WAF策略ID,可选
|
|
|
|
|
|
int64 firewallRuleGroupId = 8; // WAF分组ID,可选
|
|
|
|
|
|
int64 firewallRuleSetId = 9; // WAF规则集ID,可选
|
2021-01-20 16:53:23 +08:00
|
|
|
|
int64 userId = 10; // 用户ID
|
|
|
|
|
|
bool hasFirewallPolicy = 11; // 是否有WAF策略
|
2021-06-04 10:15:37 +08:00
|
|
|
|
string keyword = 12; // 关键词
|
2021-08-07 22:02:18 +08:00
|
|
|
|
string ip = 13;
|
|
|
|
|
|
string domain = 14;
|
2022-01-11 12:02:40 +08:00
|
|
|
|
int64 nodeClusterId = 15;
|
|
|
|
|
|
int64 nodeId = 16;
|
2022-04-17 16:18:58 +08:00
|
|
|
|
int32 partition = 19; // 分区
|
2020-10-10 19:22:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ListHTTPAccessLogsResponse {
|
2021-06-05 10:55:15 +08:00
|
|
|
|
repeated HTTPAccessLog accessLogs = 1 [deprecated = true];
|
|
|
|
|
|
repeated HTTPAccessLog httpAccessLogs = 4;
|
2020-10-10 19:22:22 +08:00
|
|
|
|
string requestId = 2;
|
|
|
|
|
|
bool hasMore = 3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-11-02 21:15:48 +08:00
|
|
|
|
// 查找单个日志
|
|
|
|
|
|
message FindHTTPAccessLogRequest {
|
|
|
|
|
|
string requestId = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message FindHTTPAccessLogResponse {
|
2021-06-02 11:53:15 +08:00
|
|
|
|
HTTPAccessLog httpAccessLog = 1;
|
2020-11-02 21:15:48 +08:00
|
|
|
|
}
|
2022-04-17 16:18:58 +08:00
|
|
|
|
|
|
|
|
|
|
// 查找日志分区
|
|
|
|
|
|
message FindHTTPAccessLogPartitionsRequest {
|
|
|
|
|
|
string day = 1; // YYYYMMDD
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message FindHTTPAccessLogPartitionsResponse {
|
|
|
|
|
|
repeated int32 partitions = 1;
|
|
|
|
|
|
repeated int32 reversePartitions = 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|