Files
novatask/internal/pkg/errs/reason.go
2024-12-27 18:06:13 +08:00

29 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package errs
type Reason int
const (
// ======= 系统错误10000~19999 =======
ErrUnknownReason Reason = 10000 // 未知错误
ErrSucceed Reason = 10200 // 成功
ErrUnauthorized Reason = 10401 // 未授权
ErrOverload Reason = 10403 // 请求超载
// ======= 服务器内部错误1000~9999 =======
ErrInternalServer Reason = 1000 // 未知的服务器内部错误
ErrDatabaseOperate Reason = 1001 // 数据库错误
ErrRedisOperate Reason = 1002 // redis错误
ErrEncodePassword Reason = 1003 // 密码加密错误
ErrGenerateUUid Reason = 1004 // 生成uuid错误
ErrGenerateToken Reason = 1005 // 生成token错误
// ======= 业务层错误20000~29999 =======
ErrUnknownLogicError Reason = 20000 // 未知的业务错误
ErrTaskNotFound Reason = 20001 // 任务不存在
ErrTaskAlreadyReward Reason = 20002 // 任务已领取
ErrTaskNotFinished Reason = 20003 // 任务未完成
ErrNotBindWallet Reason = 20004 // 未绑定钱包
ErrTaskOpenDateNotSet Reason = 20005 // 任务开放时间未设置
ErrTaskConfNotSet Reason = 20006 // 任务配置未设置
)