feat: backend service

This commit is contained in:
Ilia Denisov
2026-05-06 10:14:55 +03:00
committed by GitHub
parent 3e2622757e
commit f446c6a2ac
1486 changed files with 49720 additions and 266401 deletions
+27
View File
@@ -0,0 +1,27 @@
package user
import "errors"
// ErrAccountNotFound is returned by lookups against `backend.accounts`
// when the row is missing or has been soft-deleted. Handlers map it to
// HTTP 404.
var ErrAccountNotFound = errors.New("user: account not found")
// ErrInvalidInput marks a request as syntactically valid but
// semantically rejected (empty display name when the field was
// supplied, blank time zone, etc.). Handlers map it to HTTP 400.
var ErrInvalidInput = errors.New("user: invalid input")
// ErrInvalidTier is returned by ApplyEntitlement when the supplied tier
// does not belong to the closed MVP set documented in
// `backend/README.md`. Handlers map it to HTTP 400.
var ErrInvalidTier = errors.New("user: invalid tier")
// ErrInvalidSanctionCode marks an ApplySanction request whose
// sanction_code is not in the closed MVP set ({permanent_block}).
var ErrInvalidSanctionCode = errors.New("user: invalid sanction code")
// ErrInvalidActor is returned when an admin-side mutation arrives
// without a non-empty actor.type. The user-side mutations populate
// actor.type internally and never produce this error.
var ErrInvalidActor = errors.New("user: invalid actor")