matchers

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 13 Imported by: 5

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 JsonPartial = "jsonpartial"
View Source
var JsonPath = "jsonpath"
View Source
var Matchers = map[string]MatcherFunc{

	"": ExactMatch,

	Exact:        ExactMatch,
	Glob:         GlobMatch,
	Json:         JsonMatch,
	JsonPath:     JsonPathMatch,
	JsonPartial:  JsonPartialMatch,
	Regex:        RegexMatch,
	Xml:          XmlMatch,
	Xpath:        XpathMatch,
	XmlTemplated: XmlTemplatedMatch,
}
View Source
var Regex = "regex"
View Source
var Xml = "xml"
View Source
var XmlTemplated = "xmltemplated"
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 JsonPartialMatch added in v1.0.0

func JsonPartialMatch(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 XmlTemplatedMatch added in v1.2.0

func XmlTemplatedMatch(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