Documentation ¶
Index ¶
- Constants
- func IsDuplicateValue(err error) bool
- func IsMultipleChoices(err error) bool
- func IsNotFound(err error) bool
- func IsNotImplemented(err error) bool
- func IsTimeout(err error) bool
- func IsUnauthorised(err error) bool
- type Code
- type Error
- func NewDuplicateValuef(cause error, context interface{}, format string, args ...interface{}) Error
- func NewMultipleChoicesf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewNotFoundf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewNotImplementedf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewTimeoutf(cause error, context interface{}, format string, args ...interface{}) Error
- func NewUnauthorisedf(cause error, context interface{}, format string, args ...interface{}) Error
- func Newf(cause error, format string, args ...interface{}) Error
Constants ¶
View Source
const ( // Public available error types. // These errors are provided because they are specifically required by business logic in the callers. UnspecifiedError = Code("Unspecified") NotFoundError = Code("NotFound") DuplicateValueError = Code("DuplicateValue") TimeoutError = Code("Timeout") NotImplementedError = Code("NotImplemented") MultipleChoicesError = Code("MultipleChoices") )
Variables ¶
This section is empty.
Functions ¶
func IsDuplicateValue ¶
func IsMultipleChoices ¶
func IsNotFound ¶
func IsNotImplemented ¶
func IsUnauthorised ¶
Types ¶
type Error ¶
Error instances store an optional error cause.
func NewDuplicateValuef ¶
NewDuplicateValuef creates a new DuplicateValue Error instance with the specified cause.
func NewMultipleChoicesf ¶
func NewNotFoundf ¶
NewNotFoundf creates a new NotFound Error instance with the specified cause.
func NewNotImplementedf ¶
NewNotImplementedf creates a new NotImplemented Error instance with the specified cause.
func NewTimeoutf ¶
NewTimeoutf creates a new Timeout Error instance with the specified cause.
func NewUnauthorisedf ¶
NewUnauthorisedf creates a new Unauthorised Error instance with the specified cause.
Click to show internal directories.
Click to hide internal directories.