Based on QuantumNous/new-api v1.0.0-rc.36 (shallow history squashed). - CNY quota display mode: RMB-denominated top-up and crediting across Epay/Waffo channels - New CheckinButton in both authenticated and public headers (Turnstile supported) - New /subscribe page with public plan snapshot, Alipay/balance payment, auto group upgrade/reset - New /docs 12-section beginner guide with anchor navigation - New home PromoBanner linking to /docs; i18n synced (en/zh/zh-TW/fr/ja/ru/vi) - README: document custom features, live demo https://ai.88531.cn
31 lines
780 B
Go
31 lines
780 B
Go
package model
|
|
|
|
import "errors"
|
|
|
|
// Common errors
|
|
var (
|
|
ErrDatabase = errors.New("database error")
|
|
)
|
|
|
|
// User auth errors
|
|
var (
|
|
ErrInvalidCredentials = errors.New("invalid credentials")
|
|
ErrUserEmptyCredentials = errors.New("empty credentials")
|
|
ErrEmailAlreadyTaken = errors.New("email already taken")
|
|
ErrEmailNotFound = errors.New("email not found")
|
|
ErrEmailAmbiguous = errors.New("email matches multiple users")
|
|
)
|
|
|
|
// Token auth errors
|
|
var (
|
|
ErrTokenNotProvided = errors.New("token not provided")
|
|
ErrTokenInvalid = errors.New("token invalid")
|
|
)
|
|
|
|
// Redemption errors
|
|
var ErrRedeemFailed = errors.New("redeem.failed")
|
|
|
|
// 2FA errors
|
|
var ErrTwoFANotEnabled = errors.New("2fa not enabled")
|
|
var ErrTwoFAAlreadyEnabled = errors.New("2fa already enabled")
|