Documentation ¶
Index ¶
- type APIChecker
- type HandlerBuilder
- type HandlerMounter
- type Option
- func CheckRedirect(policy func(req *http.Request, via []*http.Request) error) Option
- func ClientTimeout(d time.Duration) Option
- func Decoder(dec decoder) Option
- func Encoder(enc encoder) Option
- func ErrorHandler(eh errorHandler) Option
- func Formatter(fm formatter) Option
- func Muxer(mux goahttp.Muxer) Option
- func NoRedirect() Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIChecker ¶
type APIChecker struct { Mux goahttp.Muxer Middleware []middleware Decoder decoder Encoder encoder ErrorHandler errorHandler Formatter formatter ClientOptions []httpcheck.Option }
APIChecker represents the API checker.
func (*APIChecker) Mount ¶
func (c *APIChecker) Mount(builder HandlerBuilder, mounter HandlerMounter, endpoint goa.Endpoint, middlewares ...middleware)
Mount mounts the endpoint handler.
func (APIChecker) Test ¶
Test returns a http checker that tests the endpoint. see. https://github.com/ikawaha/httpcheck/
type HandlerBuilder ¶
type HandlerBuilder func(goa.Endpoint, goahttp.Muxer, decoder, encoder, errorHandler, formatter) http.Handler
HandlerBuilder represents the goa http handler builder.
type HandlerMounter ¶
HandlerMounter represents the goa http handler mounter.
type Option ¶
type Option func(c *APIChecker)
Option represents options for API checker.
func CheckRedirect ¶ added in v0.2.3
CheckRedirect sets the policy of redirection to the HTTP client.
func ClientTimeout ¶ added in v0.2.3
ClientTimeout sets the client timeout.
func NoRedirect ¶ added in v0.2.3
func NoRedirect() Option
NoRedirect is the alias of the following:
CheckRedirect(func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse })
Client returns ErrUseLastResponse, the next request is not sent and the most recent response is returned with its body unclosed.
Click to show internal directories.
Click to hide internal directories.