Documentation
¶
Overview ¶
Package repoerrors holds the semantic error types every repository implementation produces. Backend packages (sqldb, future NoSQL backends) construct these so use cases can match on them with errors.As without coupling to a specific backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseError ¶
type DatabaseError struct {
Console consoleerrors.InternalError
}
func (DatabaseError) Error ¶
func (e DatabaseError) Error() string
func (DatabaseError) Wrap ¶
func (e DatabaseError) Wrap(call, function string, err error) error
Wrap records call/function/err on e.Console (mutated in place via pointer receiver on InternalError.Wrap) and returns e by value. The discarded return is intentional: only the side effect on e.Console is needed.
type NotFoundError ¶
type NotFoundError struct {
Console consoleerrors.InternalError
}
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
func (NotFoundError) Wrap ¶
func (e NotFoundError) Wrap(call, function string, err error) error
Wrap records call/function/err on e.Console (mutated in place via pointer receiver on InternalError.Wrap) and returns e by value. The discarded return is intentional: only the side effect on e.Console is needed.
func (NotFoundError) WrapWithMessage ¶
func (e NotFoundError) WrapWithMessage(call, function, message string) error
type NotUniqueError ¶
type NotUniqueError struct {
Console consoleerrors.InternalError
}
func (NotUniqueError) Error ¶
func (e NotUniqueError) Error() string
func (NotUniqueError) Wrap ¶
func (e NotUniqueError) Wrap(details string) error