64bfe80806
Implementation to make all tests pass: Value Objects: - HabitType: BOOLEAN, COUNTER, VALUE with validation - Frequency: DAILY, WEEKLY, MONTHLY with validation Entities: - User: email, password hash, timezone with defaults - Habit: tracking habits with type, frequency, carry-over - HabitEntry: recording habit completions with soft delete Repositories (interfaces): - UserRepository: CRUD operations for users - HabitRepository: CRUD operations for habits - HabitEntryRepository: CRUD operations for entries Shared: - Common error definitions for domain layer All domain tests now pass.
12 lines
322 B
Go
12 lines
322 B
Go
package errors
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
ErrNotFound = errors.New("resource not found")
|
|
ErrAlreadyExists = errors.New("resource already exists")
|
|
ErrInvalidInput = errors.New("invalid input")
|
|
ErrUnauthorized = errors.New("unauthorized")
|
|
ErrInvalidCredentials = errors.New("invalid credentials")
|
|
)
|