feat: user service
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// Package ports defines the storage-agnostic boundaries used by the user
|
||||
// service.
|
||||
package ports
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrNotFound reports that a requested source-of-truth record does not
|
||||
// exist in the dependency behind the port.
|
||||
ErrNotFound = errors.New("ports: record not found")
|
||||
|
||||
// ErrConflict reports that a create or update cannot be applied because the
|
||||
// dependency state conflicts with the requested mutation.
|
||||
ErrConflict = errors.New("ports: conflict")
|
||||
|
||||
// ErrInvalidPageToken reports that a supplied pagination token cannot be
|
||||
// decoded or does not match the expected filter set.
|
||||
ErrInvalidPageToken = errors.New("ports: invalid page token")
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrRaceNameConflict reports that a mutation specifically failed because a
|
||||
// race-name lookup or canonical reservation is already owned by another
|
||||
// user. The sentinel still matches ErrConflict via errors.Is so callers can
|
||||
// preserve the stable public conflict semantics while collecting more
|
||||
// precise observability.
|
||||
ErrRaceNameConflict = fmt.Errorf("%w: race name conflict", ErrConflict)
|
||||
)
|
||||
Reference in New Issue
Block a user