Documentation
¶
Index ¶
- Variables
- func As(err error, target any) bool
- func In(err error, target ...any) bool
- func Is(err error, target any) bool
- func IsUserFriendly(err error) bool
- func Join(errs ...error) error
- func Raw(err error) error
- type Error
- func From(err error) Error
- func New(kind Kind, message string, args ...interface{}) Error
- func NewAlreadyExistsError(message string, args ...interface{}) Error
- func NewAuthenticationError(message string, args ...interface{}) Error
- func NewAuthorizationError(message string, args ...interface{}) Error
- func NewBadRequestError(message string, args ...interface{}) Error
- func NewInconsistentError(message string, args ...interface{}) Error
- func NewInfrastructureError(message string, args ...interface{}) Error
- func NewLimitExceededError(message string, args ...interface{}) Error
- func NewNotFoundError(message string, args ...interface{}) Error
- func NewPersistenceError(message string, args ...interface{}) Error
- func NewThirdPartiesError(message string, args ...interface{}) Error
- func NewTimeoutError(message string, args ...interface{}) Error
- func NewValidationError(message string, args ...interface{}) Error
- type Factory
- func NewAlreadyExistsFactory(template string) Factory
- func NewAuthenticationFactory(template string) Factory
- func NewAuthorizationFactory(template string) Factory
- func NewBadRequestFactory(template string) Factory
- func NewFactory(kind Kind, template string) Factory
- func NewInconsistentFactory(template string) Factory
- func NewInfrastructureFactory(template string) Factory
- func NewLimitExceededFactory(template string) Factory
- func NewNotFoundFactory(template string) Factory
- func NewPersistenceFactory(template string) Factory
- func NewThirdPartiesFactory(template string) Factory
- func NewTimeoutFactory(template string) Factory
- func NewValidationFactory(template string) Factory
- type Kind
- type Label
- type LabelList
- type Stacker
Constants ¶
This section is empty.
Variables ¶
var DefaultUserFriendlyError = "something went wrong"
Functions ¶
func IsUserFriendly ¶
Types ¶
type Error ¶
type Error interface {
Annotate(message string, args ...interface{}) Error
Wrap(error) Error
Unwrap() error
Labels() LabelList
WithLabels(...Label) Error
Details() map[string]string
WithDetails(map[string]string) Error
error
}
func NewAlreadyExistsError ¶
NewAlreadyExistsError returns an AlreadyExists error.
func NewAuthenticationError ¶
NewAuthenticationError returns an Authentication error.
func NewAuthorizationError ¶
NewAuthorizationError returns an Authorization error.
func NewBadRequestError ¶
NewBadRequestError returns an BadRequest error.
func NewInconsistentError ¶
NewInconsistentError returns an Inconsistent error.
func NewInfrastructureError ¶
NewInfrastructureError returns an Infrastructure error.
func NewLimitExceededError ¶
NewLimitExceededError returns an LimitExceeded error.
func NewNotFoundError ¶
NewNotFoundError returns an NotFound error.
func NewPersistenceError ¶
NewPersistenceError returns an Persistence error.
func NewThirdPartiesError ¶
NewThirdPartiesError returns an ThirdParties error.
func NewTimeoutError ¶
NewTimeoutError returns an Timeout error.
func NewValidationError ¶
NewValidationError returns an Validation error.
type Factory ¶
func NewAlreadyExistsFactory ¶
NewAlreadyExistsFactory returns an error factory that creates AlreadyExists user-friendly errors.
func NewAuthenticationFactory ¶
NewAuthenticationFactory returns an error factory that creates Authentication user-friendly errors.
func NewAuthorizationFactory ¶
NewAuthorizationFactory returns an error factory that creates Authorization user-friendly errors.
func NewBadRequestFactory ¶
NewBadRequestFactory returns an error factory that creates BadRequest user-friendly errors.
func NewFactory ¶
func NewInconsistentFactory ¶
NewInconsistentFactory returns an error factory that creates Inconsistent user-friendly errors.
func NewInfrastructureFactory ¶
NewInfrastructureFactory returns an error factory that creates Infrastructure user-friendly errors.
func NewLimitExceededFactory ¶
NewLimitExceededFactory returns an error factory that creates LimitExceeded user-friendly errors.
func NewNotFoundFactory ¶
NewNotFoundFactory returns an error factory that creates NotFound user-friendly errors.
func NewPersistenceFactory ¶
NewPersistenceFactory returns an error factory that creates Persistence user-friendly errors.
func NewThirdPartiesFactory ¶
NewThirdPartiesFactory returns an error factory that creates ThirdParties user-friendly errors.
func NewTimeoutFactory ¶
NewTimeoutFactory returns an error factory that creates Timeout user-friendly errors.
func NewValidationFactory ¶
NewValidationFactory returns an error factory that creates Validation user-friendly errors.