Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
func ErrorHandler(w http.ResponseWriter, err HTTPError)
ErrorHandler is a helper function to write HTTPError to http.ResponseWriter
Types ¶
type HTTPError ¶
HTTPError represents a generic HTTP error
func BadRequest ¶
BadRequest creates a new 400 Bad Request error
func InternalServerError ¶
InternalServerError creates a new 500 Internal Server Error
func TooManyRequests ¶
TooManyRequests creates a new 429 Too Many Requests error
func Unauthorized ¶
Unauthorized creates a new 401 Unauthorized error
Click to show internal directories.
Click to hide internal directories.