Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidToken = NewError(http.StatusUnauthorized, "auth.token.is_not_valid") ErrTokenRevoked = NewError(http.StatusUnauthorized, "auth.token.revoked") ErrAccessDenied = NewError(http.StatusForbidden, "auth.access_denied") ErrUnhealthy = NewError(http.StatusInternalServerError, "system.unhealthy") )
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.