Selaa lähdekoodia

feat(cdn): 增加日志关键词筛选功能

- 在 CDN 日志请求结构中添加 Keyword 字段
- 在发送 CDN 日志请求时加入 keyword 参数
- 同时更新 WAF 日志请求处理,添加 Keyword 参数
fusu 2 viikkoa sitten
vanhempi
sitoutus
55b713c831

+ 1 - 0
api/v1/cdn/log.go

@@ -12,6 +12,7 @@ type Request struct {
 	HourTo        string `json:"hourTo" form:"hourTo"`
 	Reverse       bool   `json:"reverse" form:"reverse" default:"false"`
 	RequestId     string `json:"requestId" form:"requestId"`
+	Keyword       string `json:"keyword" form:"keyword"`
 }
 
 

+ 1 - 0
api/v1/cdnLog.go

@@ -14,4 +14,5 @@ type GetCdnLog struct {
 	HourTo        string `json:"hourTo" form:"hourTo"`
 	Reverse       bool   `json:"reverse" form:"reverse" default:"false"`
 	RequestId     string `json:"requestId" form:"requestId"`
+	Keyword       string `json:"keyword" form:"keyword"`
 }

+ 1 - 0
internal/service/api/flexCdn/cdn.go

@@ -1197,6 +1197,7 @@ func (s *cdnService) GetAccessLog(ctx context.Context, req cdn.Request) (cdn.Dat
 		"hourTo":   req.HourTo,
 		"reverse" : req.Reverse,
 		"requestId": req.RequestId,
+		"keyword" : req.Keyword,
 	}
 	apiUrl := s.Url + "HTTPAccessLogService/listHTTPAccessLogs"
 	resBody, err := s.sendDataWithTokenRetry(ctx, formData, apiUrl)

+ 1 - 0
internal/service/api/waf/cdnlog.go

@@ -57,6 +57,7 @@ func (s *cdnLogService) GetAccessLog(ctx *gin.Context,req v1.GetCdnLog) (cdnStru
 		HourTo: req.HourTo,
 		Reverse: req.Reverse,
 		RequestId: req.RequestId,
+		Keyword: req.Keyword,
 	})
 
 	if err != nil {