Documentation ¶
Overview ¶
Package zqe provides a mechanism to create or wrap errors with information that will aid in reporting them to users and returning them to api callers.
Index ¶
- func E(args ...interface{}) error
- func ErrConflict(args ...interface{}) error
- func ErrExists(args ...interface{}) error
- func ErrForbidden(args ...interface{}) error
- func ErrInvalid(args ...interface{}) error
- func ErrNoCredentials(args ...interface{}) error
- func ErrNotFound(args ...interface{}) error
- func ErrOther(args ...interface{}) error
- func IsConflict(err error) bool
- func IsExists(err error) bool
- func IsForbidden(err error) bool
- func IsInvalid(err error) bool
- func IsKind(err error, k Kind) bool
- func IsNoCredentials(err error) bool
- func IsNotFound(err error) bool
- func IsOther(err error) bool
- func RecoverError(r interface{}) error
- type Error
- type Kind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func E ¶
func E(args ...interface{}) error
Function E generates an error from any mix of:
- a Kind
- an existing error
- a string and optional formatting verbs, like fmt.Errorf (including support for the `%w` verb).
The string & format verbs must be last in the arguments, if present.
func ErrConflict ¶
func ErrConflict(args ...interface{}) error
func ErrForbidden ¶
func ErrForbidden(args ...interface{}) error
func ErrInvalid ¶
func ErrInvalid(args ...interface{}) error
func ErrNoCredentials ¶
func ErrNoCredentials(args ...interface{}) error
func ErrNotFound ¶
func ErrNotFound(args ...interface{}) error
func IsConflict ¶
func IsForbidden ¶
func IsKind ¶
IsKind returns true if the provided error can be unwrapped as a *Error and if *Error.Kind matches the provided Kind
func IsNoCredentials ¶
func IsNotFound ¶
func RecoverError ¶
func RecoverError(r interface{}) error
Types ¶
type Error ¶
Click to show internal directories.
Click to hide internal directories.