16 lines
575 B
Go
16 lines
575 B
Go
package domain
|
|
|
|
import "errors"
|
|
|
|
// Sentinel errors the application layer compares against with
|
|
// errors.Is — the same three the monolith's internal/db package
|
|
// exposed (db.ErrNotFound, db.ErrEmailTaken, db.ErrInvalidToken), now
|
|
// owned by the domain layer instead of a database package, since
|
|
// "email already taken" and "code invalid or expired" are business
|
|
// rules, not SQL facts.
|
|
var (
|
|
ErrNotFound = errors.New("iam: not found")
|
|
ErrEmailTaken = errors.New("iam: email already registered")
|
|
ErrInvalidToken = errors.New("iam: invalid or expired token")
|
|
)
|