IP检查也支持灰名单

This commit is contained in:
GoEdgeLab
2024-05-05 20:20:43 +08:00
parent 2da73788ec
commit 22fdd278ed
7 changed files with 12 additions and 5 deletions

View File

@@ -66,6 +66,7 @@ func (this *TestAction) RunPost(params struct {
"expiredTime": timeutil.FormatTime("Y-m-d H:i:s", resp.IpItem.ExpiredAt),
"type": resp.IpItem.Type,
"eventLevelName": firewallconfigs.FindFirewallEventLevelName(resp.IpItem.EventLevel),
"listType": resp.IpItem.ListType,
}
}

View File

@@ -79,6 +79,7 @@ func (this *TestAction) RunPost(params struct {
"expiredTime": timeutil.FormatTime("Y-m-d H:i:s", resp.IpItem.ExpiredAt),
"type": resp.IpItem.Type,
"eventLevelName": firewallconfigs.FindFirewallEventLevelName(resp.IpItem.EventLevel),
"listType": resp.IpItem.ListType,
}
}

View File

@@ -47,7 +47,7 @@ func (this *TestAction) RunPost(params struct {
return
}
resultMap := maps.Map{
var resultMap = maps.Map{
"isDone": true,
"isFound": resp.IsFound,
"isOk": resp.IsOk,
@@ -67,6 +67,7 @@ func (this *TestAction) RunPost(params struct {
"expiredTime": timeutil.FormatTime("Y-m-d H:i:s", resp.IpItem.ExpiredAt),
"type": resp.IpItem.Type,
"eventLevelName": firewallconfigs.FindFirewallEventLevelName(resp.IpItem.EventLevel),
"listType": resp.IpItem.ListType,
}
}

View File

@@ -53,7 +53,7 @@ func (this *TestAction) RunPost(params struct {
return
}
resultMap := maps.Map{
var resultMap = maps.Map{
"isDone": true,
"isFound": resp.IsFound,
"isOk": resp.IsOk,
@@ -79,6 +79,7 @@ func (this *TestAction) RunPost(params struct {
"expiredTime": timeutil.FormatTime("Y-m-d H:i:s", resp.IpItem.ExpiredAt),
"type": resp.IpItem.Type,
"eventLevelName": firewallconfigs.FindFirewallEventLevelName(resp.IpItem.EventLevel),
"listType": resp.IpItem.ListType,
}
}