domain

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package domain defines the core user domain entities and types.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUserNotFound indicates the requested user does not exist.
	ErrUserNotFound = errors.Wrap(errors.ErrNotFound, "user not found")

	// ErrUserAlreadyExists indicates a user with the same email already exists.
	ErrUserAlreadyExists = errors.Wrap(errors.ErrConflict, "user already exists")

	// ErrInvalidEmail indicates the email format is invalid.
	ErrInvalidEmail = errors.Wrap(errors.ErrInvalidInput, "invalid email format")

	// ErrInvalidPassword indicates the password doesn't meet requirements.
	ErrInvalidPassword = errors.Wrap(errors.ErrInvalidInput, "invalid password")

	// ErrNameRequired indicates the name field is required.
	ErrNameRequired = errors.Wrap(errors.ErrInvalidInput, "name is required")

	// ErrEmailRequired indicates the email field is required.
	ErrEmailRequired = errors.Wrap(errors.ErrInvalidInput, "email is required")

	// ErrPasswordRequired indicates the password field is required.
	ErrPasswordRequired = errors.Wrap(errors.ErrInvalidInput, "password is required")
)

Domain-specific errors for user operations.

Functions

This section is empty.

Types

type User

type User struct {
	ID        uuid.UUID
	Name      string
	Email     string
	Password  string
	CreatedAt time.Time
	UpdatedAt time.Time
}

User represents a user in the system

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL