Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 StatusError ¶
api.StatusError represents an error with an associated HTTP status code.
func MakeBadRequestError ¶
func MakeBadRequestError(err error) StatusError
func MakeStatusError ¶
func MakeStatusError(code int, err error) StatusError
Mainly so we don't get a bunch of errors for not using field names in StatusError{}
func MakeUnauthorisedError ¶
func MakeUnauthorisedError(err error) StatusError
func (StatusError) Error ¶
func (se StatusError) Error() string
Allows api.StatusError to satisfy the error interface.
func (StatusError) Status ¶
func (se StatusError) Status() int
Status - Returns our HTTP status code.
Click to show internal directories.
Click to hide internal directories.