Documentation ¶
Index ¶
- func FromAtomix(err error) error
- func FromGRPC(err error) error
- func FromStatus(status *status.Status) error
- func IsAlreadyExists(err error) bool
- func IsCanceled(err error) bool
- func IsConflict(err error) bool
- func IsForbidden(err error) bool
- func IsInternal(err error) bool
- func IsInvalid(err error) bool
- func IsNotFound(err error) bool
- func IsNotSupported(err error) bool
- func IsTimeout(err error) bool
- func IsType(err error, t Type) bool
- func IsUnauthorized(err error) bool
- func IsUnavailable(err error) bool
- func IsUnknown(err error) bool
- func New(t Type, msg string, args ...interface{}) error
- func NewAlreadyExists(msg string, args ...interface{}) error
- func NewCanceled(msg string, args ...interface{}) error
- func NewConflict(msg string, args ...interface{}) error
- func NewForbidden(msg string, args ...interface{}) error
- func NewInternal(msg string, args ...interface{}) error
- func NewInvalid(msg string, args ...interface{}) error
- func NewNotFound(msg string, args ...interface{}) error
- func NewNotSupported(msg string, args ...interface{}) error
- func NewTimeout(msg string, args ...interface{}) error
- func NewUnauthorized(msg string, args ...interface{}) error
- func NewUnavailable(msg string, args ...interface{}) error
- func NewUnknown(msg string, args ...interface{}) error
- func Status(err error) *status.Status
- type Type
- type TypedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromAtomix ¶ added in v0.6.25
FromAtomix creates a typed error from an Atomix error
func FromStatus ¶
FromStatus creates a typed error from a gRPC status
func IsAlreadyExists ¶
IsAlreadyExists checks whether the given error is a AlreadyExists error
func IsCanceled ¶
IsCanceled checks whether the given error is an Canceled error
func IsConflict ¶
IsConflict checks whether the given error is a Conflict error
func IsForbidden ¶
IsForbidden checks whether the given error is a Forbidden error
func IsInternal ¶
IsInternal checks whether the given error is an Internal error
func IsNotFound ¶
IsNotFound checks whether the given error is a NotFound error
func IsNotSupported ¶
IsNotSupported checks whether the given error is a NotSupported error
func IsUnauthorized ¶
IsUnauthorized checks whether the given error is a Unauthorized error
func IsUnavailable ¶
IsUnavailable checks whether the given error is an Unavailable error
func NewAlreadyExists ¶
NewAlreadyExists returns a new AlreadyExists error
func NewCanceled ¶
NewCanceled returns a new Canceled error
func NewConflict ¶
NewConflict returns a new Conflict error
func NewForbidden ¶
NewForbidden returns a new Forbidden error
func NewInternal ¶
NewInternal returns a new Internal error
func NewInvalid ¶
NewInvalid returns a new Invalid error
func NewNotFound ¶
NewNotFound returns a new NotFound error
func NewNotSupported ¶
NewNotSupported returns a new NotSupported error
func NewTimeout ¶
NewTimeout returns a new Timeout error
func NewUnauthorized ¶
NewUnauthorized returns a new Unauthorized error
func NewUnavailable ¶
NewUnavailable returns a new Unavailable error
func NewUnknown ¶
NewUnknown returns a new Unknown error
Types ¶
type Type ¶
type Type int
Type is an error type
const ( // Unknown is an unknown error type Unknown Type = iota // Canceled indicates a request context was canceled Canceled // NotFound indicates a resource was not found NotFound // AlreadyExists indicates a resource already exists AlreadyExists Unauthorized // Forbidden indicates the operation requested to be performed on a resource is forbidden Forbidden // Conflict indicates a conflict occurred during concurrent modifications to a resource Conflict // Invalid indicates a message or request is invalid Invalid Unavailable // NotSupported indicates a method is not supported NotSupported // Timeout indicates a request timed out Timeout // Internal indicates an unexpected internal error occurred Internal )
type TypedError ¶
type TypedError struct { // Type is the error type Type Type // Message is the error message Message string }
TypedError is an typed error
func (*TypedError) Error ¶
func (e *TypedError) Error() string