matchers

package
v0.17.7 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Exact = "exact"
View Source
var Glob = "glob"
View Source
var Json = "json"
View Source
var JsonPath = "jsonpath"
View Source
var Matchers = map[string]MatcherFunc{

	"": ExactMatch,

	Exact:    ExactMatch,
	Glob:     GlobMatch,
	Json:     JsonMatch,
	JsonPath: JsonPathMatch,
	Regex:    RegexMatch,
	Xml:      XmlMatch,
	Xpath:    XpathMatch,
}
View Source
var Regex = "regex"
View Source
var Xml = "xml"
View Source
var Xpath = "xpath"

Functions

func ExactMatch

func ExactMatch(match interface{}, toMatch string) bool

func GlobMatch

func GlobMatch(match interface{}, toMatch string) bool

func JsonMatch

func JsonMatch(match interface{}, toMatch string) bool

func JsonPathExecution added in v0.17.3

func JsonPathExecution(matchString, toMatch string) (string, error)

func JsonPathMatch

func JsonPathMatch(match interface{}, toMatch string) bool

func RegexMatch

func RegexMatch(match interface{}, toMatch string) bool

func XmlMatch

func XmlMatch(match interface{}, toMatch string) bool

func XpathExecution added in v0.17.3

func XpathExecution(matchString, toMatch string) (tree.NodeSet, error)

func XpathMatch

func XpathMatch(match interface{}, toMatch string) bool

Types

type MatcherFunc

type MatcherFunc func(data interface{}, toMatch string) bool

Jump to

Keyboard shortcuts

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