This commit is contained in:
ryan
2026-06-18 16:59:02 +08:00
parent e3bfd9ca6d
commit dfc480c73a
33 changed files with 3362 additions and 133 deletions
@@ -29,6 +29,11 @@ type activeConfigSnapshot struct {
WAF snapshotWAFSection `json:"waf"`
}
// WAFIPGroupsForAgent builds agent-facing WAF IP group payloads for the given ids.
func WAFIPGroupsForAgent(ctx context.Context, ids []uint) ([]WAFIPGroup, error) {
return buildAgentWAFIPGroups(ctx, ids)
}
// ChangedWAFIPGroupsForAgent returns WAF IP groups whose checksums differ from the agent state.
func ChangedWAFIPGroupsForAgent(ctx context.Context, ids []uint, checksums map[string]string) ([]WAFIPGroup, error) {
targetIDs := uniqueUintIDs(ids)