Documentation ¶
Index ¶
- func As(err error, target any) bool
- func GRPCErr(err error, msg string) error
- func Is(err, target error) bool
- func IsErrorType(err error, errType ErrorType) bool
- func MultiToError(e error) error
- func Wrap(entity, msg string, err error) error
- func WrapIfErr(entity, msg string, err error) error
- type DomainError
- func AddErrContext(err error, entity, msg string) *DomainError
- func AlreadyExists(entity, msg string) *DomainError
- func InternalError(entity, msg string, err error) *DomainError
- func InvalidArgument(entity, msg string) *DomainError
- func InvalidStateTransition(entity, msg string) *DomainError
- func NewError(errType ErrorType, entity, msg string) *DomainError
- func NotFound(entity, msg string) *DomainError
- type ErrorType
- type MultiError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrorType ¶
func MultiToError ¶
Types ¶
type DomainError ¶
func AddErrContext ¶
func AddErrContext(err error, entity, msg string) *DomainError
func AlreadyExists ¶
func AlreadyExists(entity, msg string) *DomainError
func InternalError ¶
func InternalError(entity, msg string, err error) *DomainError
func InvalidArgument ¶
func InvalidArgument(entity, msg string) *DomainError
func InvalidStateTransition ¶
func InvalidStateTransition(entity, msg string) *DomainError
func NewError ¶
func NewError(errType ErrorType, entity, msg string) *DomainError
func NotFound ¶
func NotFound(entity, msg string) *DomainError
func (*DomainError) DebugString ¶
func (e *DomainError) DebugString() string
func (*DomainError) Error ¶
func (e *DomainError) Error() string
func (*DomainError) Is ¶
func (*DomainError) Is(tgt error) bool
func (*DomainError) Unwrap ¶
func (e *DomainError) Unwrap() error
type MultiError ¶
type MultiError struct { Errors []error // contains filtered or unexported fields }
func NewMultiError ¶
func NewMultiError(msg string) *MultiError
func (*MultiError) Append ¶
func (m *MultiError) Append(err error)
func (*MultiError) Error ¶
func (m *MultiError) Error() string
func (*MultiError) ToErr ¶
func (m *MultiError) ToErr() error
Click to show internal directories.
Click to hide internal directories.