Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = &sentinelAPIError{status: http.StatusNotFound, message: "Resource not found", wrappedError: nil} ErrInternal = &sentinelAPIError{status: http.StatusInternalServerError, message: "Unexpected error found", wrappedError: nil} ErrBadRequest = &sentinelAPIError{status: http.StatusBadRequest, message: "Invalid data", wrappedError: nil} )
Functions ¶
func HandlerWithErrors ¶
func HandlerWithErrors(fn RootHandler) http.HandlerFunc
Types ¶
type APIError ¶
type RootHandler ¶
type RootHandler func(w http.ResponseWriter, r *http.Request) error
Click to show internal directories.
Click to hide internal directories.