Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FilterMap = map[string]*Filter{ "all": NewFilter("all", allHandler, FilterActionInclude), "any": NewFilter("any", anyHandler, FilterActionInclude), "ext": NewFilter("ext", extensionHandler, FilterActionInclude), "none": NewFilter("none", noneHandler, FilterActionExclude), "has": NewFilter("has", hasHandler, FilterActionInclude), }
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct { Name string Handler FilterHandler Action FilterAction Args []string Definition string }
func NewFilter ¶
func NewFilter(name string, handler FilterHandler, action FilterAction, args ...string) *Filter
type FilterAction ¶
type FilterAction byte
const ( FilterActionInclude FilterAction = iota FilterActionExclude FilterAction = iota )
type Parser ¶
type Parser struct { }
func (*Parser) ParseDefinition ¶
ParseDefinition parses a string definition of a filter, like "always(abc,def)" or "never(.deb)" and returns a Filter struct with the appropriate values set.
func (*Parser) ParseDefinitions ¶
Click to show internal directories.
Click to hide internal directories.