Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
ErrorResponse is the response for an error.
func BadRequest ¶
func BadRequest(msg string) ErrorResponse
BadRequest creates a new error response representing a bad request (HTTP 400)
func InternalServerError ¶
func InternalServerError(msg string) ErrorResponse
InternalServerError creates a new error response representing an internal server error (HTTP 500)
func Unauthorized ¶
func Unauthorized(msg string) ErrorResponse
Unauthorized creates a new error response representing an unauthorized request (HTTP 401)
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
Error is required by error interface.
func (ErrorResponse) StatusCode ¶
func (e ErrorResponse) StatusCode() int
StatusCode returns the HTTP status code for the error.
Click to show internal directories.
Click to hide internal directories.