Documentation ¶
Overview ¶
Package filterset provides an interface for matching strings against a set of string filters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MatchType MatchType `mapstructure:"match_type"` RegexpConfig *regexp.Config `mapstructure:"regexp"` }
Config configures the matching behavior of a FilterSet.
type FilterSet ¶
type FilterSet interface { // Matches returns true if the given string matches at least one // of the filters encapsulated by the FilterSet. Matches(string) bool }
FilterSet is an interface for matching strings against a set of filters.
type MatchType ¶
type MatchType string
MatchType describes the type of pattern matching a FilterSet uses to filter strings.
const ( // Regexp is the FilterType for filtering by regexp string matches. Regexp MatchType = "regexp" // Strict is the FilterType for filtering by exact string matches. Strict MatchType = "strict" // MatchTypeFieldName is the mapstructure field name for MatchType field. MatchTypeFieldName = "match_type" )
Directories ¶
Path | Synopsis |
---|---|
Package regexp provides an implementation to match strings against a set of regexp string filters.
|
Package regexp provides an implementation to match strings against a set of regexp string filters. |
Package strict provides an implementation to match strings against a set of exact match string filters.
|
Package strict provides an implementation to match strings against a set of exact match string filters. |
Click to show internal directories.
Click to hide internal directories.