Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Default ¶
type Default struct {
// contains filtered or unexported fields
}
Default is used to write the response into an http.ResponseWriter and log the error.
func (*Default) WriteJSONError ¶
WriteJSONError write the given error into the ResponseWriter.
type MockWriter ¶
MockWriter is an autogenerated mock type for the Writer type
func NewMockWriter ¶
func NewMockWriter(t interface { mock.TestingT Cleanup(func()) }) *MockWriter
NewMockWriter creates a new instance of MockWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockWriter) WriteJSON ¶
func (_m *MockWriter) WriteJSON(w http.ResponseWriter, r *http.Request, statusCode int, res interface{})
WriteJSON provides a mock function with given fields: w, r, statusCode, res
func (*MockWriter) WriteJSONError ¶
func (_m *MockWriter) WriteJSONError(w http.ResponseWriter, r *http.Request, err error)
WriteJSONError provides a mock function with given fields: w, r, err
Click to show internal directories.
Click to hide internal directories.