matcher

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MATCHER_TYPE_KEY         = "$$matcher_type$$"
	MATCHER_PARAMS_KEY       = "$$matcher_params$$"
	SHORTHAND_MATCHER_PREFIX = "$$shorthand_matcher$$"
)

Variables

View Source
var (
	ErrTypeMismatch = errors.New("type_mismatch")
	ErrInterfaceNil = errors.New("interface_nil")
)
View Source
var (
	ErrNotAMatcher          error = errors.New("not_a_matcher")
	ErrMalformedMatcherType error = errors.New("malformed_matcher_type")
)

Functions

This section is empty.

Types

type Matcher

type Matcher interface {
	Match(interface{}, string) (bool, []string, []string)
	String() string
}

func AndMatcherWithOptions

func AndMatcherWithOptions(params interface{}) Matcher

func AnyMatcher

func AnyMatcher() Matcher

func ArrayMatcher

func ArrayMatcher(i []interface{}) Matcher

func ArrayMatcherWithOptions

func ArrayMatcherWithOptions(i interface{}) Matcher

func BoolMatcher

func BoolMatcher(value bool) Matcher

func FloatMatcherWithOptions

func FloatMatcherWithOptions(value interface{}) Matcher

func GetMatcher

func GetMatcher(i interface{}) Matcher

func IntMatcherWithOptions

func IntMatcherWithOptions(params interface{}) Matcher

func JSONMatcher

func JSONMatcher(json map[string]interface{}) Matcher

func JSONMatcherWithOptions

func JSONMatcherWithOptions(i interface{}) Matcher

func LenMatcherWithOptions

func LenMatcherWithOptions(params interface{}) Matcher

func NilMatcher

func NilMatcher() Matcher

func OrMatcherWithOptions

func OrMatcherWithOptions(params interface{}) Matcher

func RangeMatcherWithOptions

func RangeMatcherWithOptions(value interface{}) Matcher

func RegexMatcherWithOptions

func RegexMatcherWithOptions(options interface{}) Matcher

func StringMatcher

func StringMatcher(value string) Matcher

func StringMatcherWithOptions

func StringMatcherWithOptions(options interface{}) Matcher

func TypeArrayMatcherWithOptions

func TypeArrayMatcherWithOptions(value interface{}) Matcher

func TypeFloatMatcherWithOptions

func TypeFloatMatcherWithOptions(value interface{}) Matcher

func TypeIntMatcherWithOptions

func TypeIntMatcherWithOptions(value interface{}) Matcher

func TypeObjectMatcherWithOptions

func TypeObjectMatcherWithOptions(value interface{}) Matcher

func TypeStringMatcherWithOptions

func TypeStringMatcherWithOptions(value interface{}) Matcher

Jump to

Keyboard shortcuts

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