log.go 1.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
package model

type WafDetectionMessage struct {
	WafDetectionMessageBasic
	AttackedLog []WafDetectionAttackedLog `json:"attacked_log"`
	CreatedAt   int64                     `json:"created_at"`
}

type WafDetectionMessageBasic struct {
	ClusterKey string `json:"cluster_key"`
	Namespace  string `json:"namespace"`
	ResKind    string `json:"res_kind"`
	ResName    string `json:"res_name"`
	ServiceID  int64  `json:"service_id"`
	AppName    string `json:"app_name"`
}

type WafDetectionAttackedLog struct {
	ID             string `json:"id"`
	RuleID         int64  `json:"rule_id"`
	RuleName       string `json:"rule_name"`
	Action         string `json:"action"`
	AttackIP       string `json:"attack_ip"`
	AttackLoad     string `json:"attack_load"`
	AttackTime     int64  `json:"attack_time"`
	AttackType     string `json:"attack_type"`
	AttackedApp    string `json:"attacked_app"`
	AttackedURL    string `json:"attacked_url"`
	ReqPkg         string `json:"req_pkg"`
	RspPkg         string `json:"rsp_pkg,omitempty"`
	RspContentType string `json:"rsp_content_type,omitempty"`
}

type WafDetection struct {
	WafDetectionMessageBasic
	WafDetectionAttackedLog
	CreatedAt int64 `json:"created_at"`
}