You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

errMsg.go 771 B

123456789101112131415161718192021222324252627282930
  1. package xerr
  2. var message map[uint32]string
  3. func init() {
  4. message = make(map[uint32]string)
  5. message[OK] = "SUCCESS"
  6. message[SERVER_COMMON_ERROR] = "服务器开小差啦,稍后再来试一试"
  7. message[REUQEST_PARAM_ERROR] = "参数错误"
  8. message[TOKEN_EXPIRE_ERROR] = "token失效,请重新登陆"
  9. message[TOKEN_GENERATE_ERROR] = "生成token失败"
  10. message[DB_ERROR] = "数据库繁忙,请稍后再试"
  11. message[DB_UPDATE_AFFECTED_ZERO_ERROR] = "更新数据影响行数为0"
  12. }
  13. func MapErrMsg(errcode uint32) string {
  14. if msg, ok := message[errcode]; ok {
  15. return msg
  16. } else {
  17. return "服务器开小差啦,稍后再来试一试"
  18. }
  19. }
  20. func IsCodeErr(errcode uint32) bool {
  21. if _, ok := message[errcode]; ok {
  22. return true
  23. } else {
  24. return false
  25. }
  26. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.