Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { StatusCode int ResponseData interface{} }
Handler is a custom http handler useful in testing. Usage:
s := httptest.NewServer(handler{statusCode: http.StatusOK, responseData: someStruct})
Then:
s.URL
must be configured in the client.
type StubEchoServer ¶
type StubEchoServer struct {
BoundAddress string
}
func (StubEchoServer) Add ¶
func (s StubEchoServer) Add(method, path string, handler echo.HandlerFunc, middleware ...echo.MiddlewareFunc) *echo.Route
func (*StubEchoServer) Start ¶
func (s *StubEchoServer) Start(address string) error
Click to show internal directories.
Click to hide internal directories.