code.go 1020 B

123456789101112131415161718192021222324252627282930313233343536
  1. package ierr
  2. type Code int
  3. var (
  4. NotAllowed Code = 403
  5. BadRequest Code = 400
  6. TokenExpire Code = 40001
  7. // 通用错误
  8. InvalidId Code = 30001 // 无效的id
  9. InvalidState Code = 300002 // 无效的状态
  10. // 用户相关
  11. InvalidUserId Code = 30001 // 无效的用户id
  12. ParamErr Code = 41001 //参数错误
  13. PasswordErr Code = 41002
  14. ReceiveRequestFileFail Code = 41003
  15. CreateDataFail Code = 50001 // 创建数据失败
  16. DeleteDataFail Code = 50002 // 删除数据失败
  17. UpdateDataFail Code = 50003 // 更新数据失败
  18. QueryDataFail Code = 50004 // 查询数据失败
  19. CommitTxFail Code = 50005 // 提交事务失败
  20. CountDataFail Code = 50006 // 统计数据失败
  21. GenerateTokenFailed Code = 50006 //生成token失败
  22. PhoneNotExists Code = 40004 //该手机号码不存在
  23. PasswordError Code = 40005 //密码错误
  24. PhoneHasOtherRole Code = 40007 //这个手机已经有别的角色
  25. // 文件相关
  26. InvalidFilename Code = 80001 // 无效的文件名
  27. )