matcher

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Any types.Matcher = any{}

Functions

func BuildMatcher

func BuildMatcher(root *compiler.Root) (types.Matcher, error)

func Compile

func Compile(str string) (types.Matcher, error)

func Field

func Field(fieldName string, pattern string) (*field, error)

func MatcherFromFn

func MatcherFromFn(fn *compiler.FnExpr) (types.Matcher, error)

func Not

func Not(matcher types.Matcher) types.Matcher

Types

type And

type And []types.Matcher

func (And) MatchMessage

func (m And) MatchMessage(message types.Message) bool

type Or

type Or []types.Matcher

func (Or) MatchMessage

func (m Or) MatchMessage(message types.Message) bool

type Prefix

type Prefix string

func (Prefix) MatchMessage

func (m Prefix) MatchMessage(message types.Message) bool

type Regexp

type Regexp struct {
	// contains filtered or unexported fields
}

func NewRegexp

func NewRegexp(pattern string) (*Regexp, error)

func (*Regexp) MatchMessage

func (m *Regexp) MatchMessage(message types.Message) bool

type String

type String string

func (String) MatchMessage

func (m String) MatchMessage(message types.Message) bool

type Substring

type Substring string

func (Substring) MatchMessage

func (m Substring) MatchMessage(message types.Message) bool

type Suffix

type Suffix string

func (Suffix) MatchMessage

func (m Suffix) MatchMessage(message types.Message) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL