Documentation
¶
Index ¶
- Constants
- func IsBadRequest(err error) bool
- func IsInternalError(err error) bool
- func IsInvalidArgument(err error) bool
- func IsInvalidCredentials(err error) bool
- func IsInvalidHeader(err error) bool
- func IsInvalidVersion(err error) bool
- func IsMissingParameter(err error) bool
- func IsNotAuthorized(err error) bool
- func IsRequestMoved(err error) bool
- func IsRequestThrottled(err error) bool
- func IsRequestTooLarge(err error) bool
- func IsResourceNotFound(err error) bool
- func IsUnknownError(err error) bool
- type Code
- type Error
- func NewBadRequestf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewInternalErrorf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewInvalidArgumentf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewInvalidCredentialsf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewInvalidHeaderf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewInvalidVersionf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewMissingParameterf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewNotAuthorizedf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewRequestMovedf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewRequestThrottledf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewRequestTooLargef(cause error, context interface{}, format string, args ...interface{}) Error
- func NewResourceNotFoundf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewUnknownErrorf(cause error, context interface{}, format string, args ...interface{}) Error
- func Newf(cause error, format string, args ...interface{}) Error
Constants ¶
const ( // Public available error types. // These errors are provided because they are specifically required by business logic in the callers. BadRequestError = Code("BadRequest") InternalErrorError = Code("InternalError") InvalidArgumentError = Code("InvalidArgument") InvalidCredentialsError = Code("InvalidCredentials") InvalidHeaderError = Code("InvalidHeader") InvalidVersionError = Code("InvalidVersion") MissingParameterError = Code("MissinParameter") NotAuthorizedError = Code("NotAuthorized") RequestThrottledError = Code("RequestThrottled") RequestTooLargeError = Code("RequestTooLarge") RequestMovedError = Code("RequestMoved") ResourceNotFoundError = Code("ResourceNotFound") UnknownErrorError = Code("UnknownError") )
Variables ¶
This section is empty.
Functions ¶
func IsBadRequest ¶
func IsInternalError ¶
func IsInvalidArgument ¶
func IsInvalidCredentials ¶
func IsInvalidHeader ¶
func IsInvalidVersion ¶
func IsMissingParameter ¶
func IsNotAuthorized ¶
func IsRequestMoved ¶
func IsRequestThrottled ¶
func IsRequestTooLarge ¶
func IsResourceNotFound ¶
func IsUnknownError ¶
Types ¶
type Error ¶
Error instances store an optional error cause.
func NewBadRequestf ¶
New creates a new BadRequest Error instance with the specified cause.
func NewInternalErrorf ¶
New creates a new InternalError Error instance with the specified cause.
func NewInvalidArgumentf ¶
func NewInvalidArgumentf(cause error, context interface{}, format string, args ...interface{}) Error
New creates a new InvalidArgument Error instance with the specified cause.
func NewInvalidCredentialsf ¶
func NewInvalidCredentialsf(cause error, context interface{}, format string, args ...interface{}) Error
New creates a new InvalidCredentials Error instance with the specified cause.
func NewInvalidHeaderf ¶
New creates a new InvalidHeader Error instance with the specified cause.
func NewInvalidVersionf ¶
New creates a new InvalidVersion Error instance with the specified cause.
func NewMissingParameterf ¶
func NewMissingParameterf(cause error, context interface{}, format string, args ...interface{}) Error
New creates a new MissingParameter Error instance with the specified cause.
func NewNotAuthorizedf ¶
New creates a new NotAuthorized Error instance with the specified cause.
func NewRequestMovedf ¶
New creates a new RequestMoved Error instance with the specified cause.
func NewRequestThrottledf ¶
func NewRequestThrottledf(cause error, context interface{}, format string, args ...interface{}) Error
New creates a new RequestThrottled Error instance with the specified cause.
func NewRequestTooLargef ¶
func NewRequestTooLargef(cause error, context interface{}, format string, args ...interface{}) Error
New creates a new RequestTooLarge Error instance with the specified cause.
func NewResourceNotFoundf ¶
func NewResourceNotFoundf(cause error, context interface{}, format string, args ...interface{}) Error
New creates a new ResourceNotFound Error instance with the specified cause.
func NewUnknownErrorf ¶
New creates a new UnknownError Error instance with the specified cause.