Documentation ¶
Overview ¶
Package errors defines the domain errors used in the application.
Index ¶
Constants ¶
View Source
const ( // InputEmpty error indicates empty input params InputEmpty = "InputEmpty" // NotFound error indicates a missing / not found record NotFound = "NotFound" // ValidationError indicates an error in input validation ValidationError = "ValidationError" // ResourceAlreadyExists indicates a duplicate / already existing record ResourceAlreadyExists = "ResourceAlreadyExists" // RepositoryError indicates a repository (e.g database) error RepositoryError = "RepositoryError" // UnknownError indicates an error that the app cannot find the cause for UnknownError = "UnknownError" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppError ¶
AppError defines an application (domain) error
func NewAppError ¶
NewAppError initializes a new domain error using an error and its type.
func NewAppErrorWithType ¶
NewAppErrorWithType initializes a new default error for a given type.
Click to show internal directories.
Click to hide internal directories.