Documentation ¶
Index ¶
- func FromStatusCode(statusCode int, err error) error
- func GetStatusCode(err error) int
- func IsConflict(err error) bool
- func IsForbidden(err error) bool
- func IsInvalidParameter(err error) bool
- func IsNotFound(err error) bool
- func IsNotImplemented(err error) bool
- func IsUnauthorized(err error) bool
- func IsUnknown(err error) bool
- type Error
- func Conflict(err interface{}, args ...interface{}) Error
- func Forbidden(err interface{}, args ...interface{}) Error
- func InvalidParameter(err interface{}, args ...interface{}) Error
- func NotFound(err interface{}, args ...interface{}) Error
- func NotImplemented(err interface{}, args ...interface{}) Error
- func Unauthorized(err interface{}, args ...interface{}) Error
- func Unknown(err interface{}, args ...interface{}) Error
- type ErrorType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromStatusCode ¶
FromStatusCode creates an errdef error, based on the provided HTTP status-code
func GetStatusCode ¶
GetStatusCode retrieves status code from error message
func IsConflict ¶
IsConflict returns true if the passed in error is an errConflict
func IsForbidden ¶
IsForbidden returns true if the passed in error is an errForbidden
func IsInvalidParameter ¶
IsInvalidParameter returns true if the passed in error is an errInvalidParameter
func IsNotFound ¶
IsNotFound returns true if the passed in error is an errNotFound
func IsNotImplemented ¶
IsNotImplemented returns true if the passed in error is an errNotImplemented
func IsUnauthorized ¶
IsUnauthorized returns true if the passed in error is an errUnauthorized
Types ¶
type Error ¶
Error is a generic error type
func Conflict ¶
func Conflict(err interface{}, args ...interface{}) Error
Conflict signals that the requested action cannot be performed in current system state
func Forbidden ¶
func Forbidden(err interface{}, args ...interface{}) Error
Forbidden signals that the requested action cannot be performed under any circumstances
func InvalidParameter ¶
func InvalidParameter(err interface{}, args ...interface{}) Error
InvalidParameter signals that the user input is invalid
func NotFound ¶
func NotFound(err interface{}, args ...interface{}) Error
NotFound signals that the requested object doesn't exist
func NotImplemented ¶
func NotImplemented(err interface{}, args ...interface{}) Error
NotImplemented signals that the requested action/feature is not implemented on the system as configured
func Unauthorized ¶
func Unauthorized(err interface{}, args ...interface{}) Error
Unauthorized is used to signify that the user is not authorized to perform a specific action