|
@@ -36,24 +36,24 @@ var apiFieldMappings = map[string]map[string]FieldPathConfig{
|
|
|
"Comment": {Paths: []string{"comment", "data.comment", "desc"}},
|
|
|
"Port": {Paths: []string{"port", "data.port"}},
|
|
|
"RuleID": {Paths: []string{"ruleId", "data.ruleId", "ids", "data.ids"}, FieldType: "array_int"},
|
|
|
- "AddrBackendList": {Paths: []string{"addrBackendList", "data.addrBackendList"}, FieldType: "array_string"},
|
|
|
+ "AddrBackendList": {Paths: []string{"backendList", "data.backendList"}, FieldType: "array_string"},
|
|
|
},
|
|
|
"udp": { // UDP 和 TCP 结构类似
|
|
|
"Comment": {Paths: []string{"comment", "data.comment", "desc"}},
|
|
|
"Port": {Paths: []string{"port", "data.port"}},
|
|
|
"RuleID": {Paths: []string{"ruleId", "data.ruleId", "ids", "data.ids"}, FieldType: "array_int"},
|
|
|
- "AddrBackendList": {Paths: []string{"addrBackendList", "data.addrBackendList"}, FieldType: "array_string"},
|
|
|
+ "AddrBackendList": {Paths: []string{"backendList", "data.backendList"}, FieldType: "array_string"},
|
|
|
},
|
|
|
- "globalLimit": {
|
|
|
+ "实例": {
|
|
|
"Comment": {Paths: []string{"comment", "data.comment", "desc"}},
|
|
|
"RuleID": {Paths: []string{"ruleId", "data.ruleId", "ids", "data.ids"}, FieldType: "array_int"},
|
|
|
},
|
|
|
- "allowAndDeny": {
|
|
|
- "AllowAndDenyIps": {Paths: []string{"ip", "ips"}, FieldType: "array_string"},
|
|
|
+ "黑白名单": {
|
|
|
+ "AllowAndDenyIps": {Paths: []string{"ip", "ips", "data.ip", "data.ips"}, FieldType: "array_string"},
|
|
|
"RuleID": {Paths: []string{"ruleId", "data.ruleId", "ids", "data.ids"}, FieldType: "array_int"},
|
|
|
},
|
|
|
- "ccIpList": {
|
|
|
- "AllowAndDenyIps": {Paths: []string{"ip", "ips","newIp"}}, // 精确指定 ccIpList 只查找 "ip"
|
|
|
+ "CC": {
|
|
|
+ "AllowAndDenyIps": {Paths: []string{"data.newIp","data.ips", "ip", "ips","newIp", "data.ip" }},
|
|
|
"RuleID": {Paths: []string{"ruleId", "data.ruleId", "ids", "data.ids"}, FieldType: "array_int"},
|
|
|
},
|
|
|
// "分配网关组" 的日志通常不包含用户层面的业务数据,所以这里不定义
|