MCPcopy
hub / github.com/crowdsecurity/crowdsec / applyAlertFilter

Function applyAlertFilter

pkg/database/alertfilter.go:262–269  ·  view source on GitHub ↗
(alerts *ent.AlertQuery, filter map[string][]string)

Source from the content-addressed store, hash-verified

260}
261
262func applyAlertFilter(alerts *ent.AlertQuery, filter map[string][]string) (*ent.AlertQuery, error) {
263 preds, err := alertPredicatesFromFilter(filter)
264 if err != nil {
265 return nil, err
266 }
267
268 return alerts.Where(preds...), nil
269}

Callers 2

QueryAlertWithFilterMethod · 0.85

Calls 2

WhereMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…