Versions in this module Expand all Collapse all v0 v0.12.1 May 30, 2023 Changes in this version + func ErrUnexpectedCall(reason string) error + type Context struct + Request *http.Request + func (c *Context) Callers() map[string]struct{} + type JSON struct + Obj interface{} + func (j JSON) Payload() ([]byte, error) + type MockRoundTripper struct + Responses []*Response + func NewMock() *MockRoundTripper + func (mc *MockRoundTripper) AssertEmpty(t *testing.T) + func (mc *MockRoundTripper) Expect(status int, body interface{}) *Response + func (mc *MockRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) + type Raw []byte + func (r Raw) Payload() ([]byte, error) + type Response struct + Body ResponsePayload + Cond func(*Context) bool + Mock *MockRoundTripper + Status int + func (r *Response) Headers(h http.Header) *Response + func (r *Response) On(f func(*Context) bool) *Response + func (r *Response) OnFunc(callerFunc interface{}) *Response + func (r *Response) OnIdentifier(ident string) *Response + func (r *Response) Sticky() *Response + type ResponsePayload interface + Payload func() ([]byte, error)