Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUserNotFound = DomainError{Code: "USER_NOT_FOUND", Message: "User not found"} ErrInvalidEmail = DomainError{Code: "INVALID_EMAIL", Message: "Invalid email format", Field: "email"} ErrDuplicateEmail = DomainError{Code: "DUPLICATE_EMAIL", Message: "Email already exists", Field: "email"} ErrInvalidName = DomainError{Code: "INVALID_NAME", Message: "Name cannot be empty", Field: "name"} ErrInvalidUserID = DomainError{Code: "INVALID_USER_ID", Message: "Invalid user ID format", Field: "id"} ErrUserAlreadyExists = DomainError{Code: "USER_ALREADY_EXISTS", Message: "User already exists"} )
User domain errors
View Source
var ( ErrRepositoryConnection = DomainError{Code: "REPOSITORY_CONNECTION", Message: "Repository connection failed"} ErrRepositoryOperation = DomainError{Code: "REPOSITORY_OPERATION", Message: "Repository operation failed"} )
Repository errors
Functions ¶
This section is empty.
Types ¶
type DomainError ¶
DomainError represents a domain-specific error with code, message, and optional field
func (DomainError) Error ¶
func (e DomainError) Error() string
Click to show internal directories.
Click to hide internal directories.