Documentation ¶
Overview ¶
Package errdmn provides custom error types for the domain layer. These error types help in distinguishing between different error scenarios such as validation errors, conflicts, unexpected server errors, and not found errors.
Index ¶
Constants ¶
View Source
const ( Validation = "Validation" // Validation error type Conflict = "Conflict" // Conflict error type Unexpected = "ServerError" // Unexpected server error type NotFound = "NotFound" // Resource not found error type )
Constants representing different error types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Message string // The detailed error message // contains filtered or unexported fields }
Error represents a custom domain error with a specific type and message.
func NewConflict ¶
NewConflict creates a new conflict error with the given message.
func NewNotFound ¶
NewNotFound creates a new not found error with the given message.
func NewUnexpected ¶
NewUnexpected creates a new unexpected server error with the given message.
func NewValidation ¶
NewValidation creates a new validation error with the given message.
Click to show internal directories.
Click to hide internal directories.