- Add go.mod (module tanabata/backend, Go 1.21) with uuid dependency - Implement internal/domain: File, Tag, TagRule, Category, Pool, PoolFile, User, Session, Permission, ObjectType, AuditEntry + all pagination types - Add domain error sentinels (ErrNotFound, ErrForbidden, etc.) - Add context helpers WithUser/UserFromContext for JWT propagation - Fix migration: remove redundant DEFAULT on exif jsonb column Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
406 B
Go
14 lines
406 B
Go
package domain
|
|
|
|
import "errors"
|
|
|
|
// Sentinel domain errors. Handlers map these to HTTP status codes.
|
|
var (
|
|
ErrNotFound = errors.New("not found")
|
|
ErrForbidden = errors.New("forbidden")
|
|
ErrUnauthorized = errors.New("unauthorized")
|
|
ErrConflict = errors.New("conflict")
|
|
ErrValidation = errors.New("validation error")
|
|
ErrUnsupportedMIME = errors.New("unsupported MIME type")
|
|
)
|