Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Criterion ¶
type Criterion func(*Matcher)
Criterion is an argument that adds criteria to a transport request and context matcher.
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher is a gomock Matcher that validates transport requests with given criteria.
func NewMatcher ¶
NewMatcher returns a pair of matchers corresponding to the arguments of GetHandler(Context, Request), for verifying that GetHandler is called with parameters that satisfy given constraints. Passing options like WithService("foo") adds constraints to the matcher.
func (*Matcher) Matches ¶
Matches returns whether a transport request matches the configured criteria for the matcher.
func (*Matcher) WithCaller ¶
WithCaller adds a constraint that the request caller must match.
func (*Matcher) WithProcedure ¶
WithProcedure adds a constraint that the request procedure must match.
func (*Matcher) WithService ¶
WithService adds a constraint that the request callee must match.