Versions in this module Expand all Collapse all v0 v0.0.2 Jul 15, 2023 Changes in this version + type BodyFormat string + const BodyFormatJSON + const BodyFormatNone + const BodyFormatStream + const BodyFormatString + type CleanerT interface + Cleanup func(func()) + type Endpoint struct + BodyFormat BodyFormat + BodyType string + Headers bool + Method string + Path string + PathParameters []string + QueryParams bool + ResponseFormat ResponseFormat + ResponseType string + type MockAPI struct + func NewMockAPI(t TestingT) *MockAPI + func (m *MockAPI) AssertExpectations(t TestingT) + func (m *MockAPI) Close() + func (m *MockAPI) DefaultHandler(response func(http.ResponseWriter, *http.Request)) *MockAPICall + func (m *MockAPI) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (m *MockAPI) SetFilteredHeaders(headers []string) + func (m *MockAPI) SetFilteredQueryParams(params []string) + func (m *MockAPI) URL() string + func (m *MockAPI) WithJSONReply(req *MockRequest, status int, reply interface{}) *MockAPICall + func (m *MockAPI) WithJSONReplyAlter(req *MockRequest, status int, reply interface{}) (ret *MockAPICall) + func (m *MockAPI) WithNoResponseBody(req *MockRequest, status int) *MockAPICall + func (m *MockAPI) WithRequest(req *MockRequest, resp MockResponse) *MockAPICall + func (m *MockAPI) WithStreamingReply(req *MockRequest, status int, reply io.Reader) *MockAPICall + func (m *MockAPI) WithTextReply(req *MockRequest, status int, reply string) *MockAPICall + type MockAPICall struct + func (m *MockAPICall) Maybe() *MockAPICall + func (m *MockAPICall) Once() *MockAPICall + func (m *MockAPICall) Times(i int) *MockAPICall + func (m *MockAPICall) Twice() *MockAPICall + func (m *MockAPICall) WaitUntil(w <-chan time.Time) *MockAPICall + type MockRequest struct + func NewMockRequest(method, path string) *MockRequest + func (r *MockRequest) WithBody(body interface{}) *MockRequest + func (r *MockRequest) WithHeaders(headers map[string]string) *MockRequest + func (r *MockRequest) WithQueryParams(params map[string]string) *MockRequest + type MockResponse func(http.ResponseWriter, *http.Request) + type ResponseFormat string + const ResponseFormatFunc + const ResponseFormatJSON + const ResponseFormatStream + const ResponseFormatString + type TestingT interface