Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEchoHandler ¶
NewEchoHandler returns an http.Handler that echos the json encoded value of the supplied value.
func NewHeaderEchoHandler ¶
NewHeaderEchoHandler returns an http.Handler that returns the json encoded value of the request headers as its response body.
func NewRetryHandler ¶
NewRetryHandler returns an http.Handler that returns an http.StatusTooManyRequests until retries in reached in which case it returns an http.StatusOK with a body containing the json encoded value of retries.
Types ¶
type PaginatedHandler ¶
type PaginatedHandler struct { Last int // contains filtered or unexported fields }
PaginatedHandler is an example http.Handler that returns a Paginated response, that is accepts a parameter called 'current' which is the page to returned. Last should be initialized the number of available pages.
func (*PaginatedHandler) ServeHTTP ¶
func (ph *PaginatedHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.