Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type All ¶
type All []Filter
All matchers match like a conjunctive normal form.
Each filter is evaluated using filter.Any, if all filters match, the filter set matches.
type Any ¶
type Any []Filter
Any matcher matches like a disjunctive normal form.
Each filter is evaluated using filter.All, if any filter matches, the filter set matches.
type Filter ¶
type Filter struct { Host string `json:",omitempty"` Service string `json:",omitempty"` Users []string `json:",omitempty"` Author string `json:",omitempty"` Text string `json:",omitempty"` NotificationType event.NotificationType `json:"notification_type,omitempty"` }
Filter usable as filter.
type Matcher ¶
type Matcher interface { // Match the event according to the rules of the filter set. // Returns true on match, false otherwise. Match(n event.Notification) bool }
Matcher implements rules for matching sets of filters.
Click to show internal directories.
Click to hide internal directories.