Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyToken = NewRestError(401, "EmptyToken")
View Source
var ErrExpired = NewRestError(401, "Expired")
View Source
var ErrInvalidToken = NewRestError(401, "InvalidToken")
View Source
var ErrMapTokenClaims = NewRestError(500, "FailedMapTokenClaims")
View Source
var ErrNotFound = NewRestError(404, "NotFound")
Functions ¶
Types ¶
type RestError ¶
type RestError struct { Code int `json:"code"` Message string `json:"message"` OriginalError error `json:"-"` }
RestError represents a Rest HTTP Error that can be returned from a controller
func BadRequest ¶
func BadRequestf ¶
func NewRestError ¶
func (RestError) IsHyperError ¶
type UnexpectStatusCodeError ¶
func UnexpectedStatusCode ¶
func UnexpectedStatusCode(status int, err error) UnexpectStatusCodeError
func (UnexpectStatusCodeError) Error ¶
func (e UnexpectStatusCodeError) Error() string
Click to show internal directories.
Click to hide internal directories.