Documentation ¶
Overview ¶
Package matcher provides functionalities for matching header and body.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Exact = matcher.Exact
Exact matches two objects by their exact values.
View Source
var IsNotEmpty = matcher.IsNotEmpty
IsNotEmpty checks whether the value is not empty.
View Source
var JSON = matcher.JSON
JSON matches two json strings with <ignore-diff> support.
View Source
var Match = matcher.Match
Match returns a matcher according to its type.
View Source
var Regex = matcher.Regex
Regex matches two strings by using regex.
View Source
var RegexPattern = matcher.RegexPattern
RegexPattern matches two strings by using regex.
Functions ¶
This section is empty.
Types ¶
type BodyMatcher ¶
type BodyMatcher struct {
// contains filtered or unexported fields
}
BodyMatcher matches a body of a request.
func (BodyMatcher) Expected ¶
func (m BodyMatcher) Expected() string
Expected returns the expectation.
func (*BodyMatcher) Match ¶
func (m *BodyMatcher) Match(in any) (bool, error)
Match satisfies matcher.Matcher interface.
func (*BodyMatcher) Matcher ¶
func (m *BodyMatcher) Matcher() matcher.Matcher
Matcher returns the underlay matcher.
type FnMatcher ¶
type FnMatcher struct {
// contains filtered or unexported fields
}
FnMatcher is a matcher that call itself.
type HeaderMatcher ¶
HeaderMatcher matches the header values.
Click to show internal directories.
Click to hide internal directories.