Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidOrder returned, when order parameter is not ASC or DESC. ErrInvalidOrder = NewError(http.StatusBadRequest, "params.order.is_not_valid") // ErrInvalidLimit returned, when limit parameter can not be parsed into uint64. ErrInvalidLimit = NewError(http.StatusBadRequest, "params.limit.is_not_valid") )
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error represents a handler error. It provides methods for a HTTP status code and embeds the built-in error interface.
type Handler ¶
type Handler func(w http.ResponseWriter, r *http.Request) error
The Handler helps to handle errors in one place.
type StatusError ¶
StatusError represents error with http status code.
func (StatusError) Error ¶
func (se StatusError) Error() string
Error allows StatusError to satisfy the error interface.
Click to show internal directories.
Click to hide internal directories.