error.go 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. package constants
  2. const ERR_OK = 0
  3. const ERR_REQUEST_CONENT = 1
  4. const ERR_PARAM = 2
  5. const ERR_SIG = 3
  6. const ERR_SYS = 4
  7. const ERR_PAY_NOTEXISTS = 5
  8. const ERR_PAY_FAILURE = 6
  9. const ERR_SIGIN_ALREADY = 7
  10. const ERR_SIGIN_TREASURE_NOTENOUGH = 8
  11. const ERR_OUT_GAME_TIME = 9
  12. const ERR_OUT_GAME_TIME_LEN = 10
  13. const ERR_NO_BIND_IDCARD = 11
  14. const ERR_EXISTS = 12
  15. const ERR_NOTEXISTS = 13
  16. const ERR_INVITE_PRIZE_ALREADY = 22
  17. const ERR_INVITE_CONDITION = 23
  18. const ERR_PLAY_STAGE_ERROR = 24
  19. const ERR_REQUEST_IP_FORBID = 25
  20. const ERR_SHARE_LIMIT = 26
  21. const ERR_PLAY_RESULT_INVITE_CD = 31
  22. const ERR_PLAY_RESULT_INVITE_DECRYPT = 32
  23. const ERR_ONLINEPRIZE_GETED = 34
  24. const ERR_ONLINEPRIZE_PARAM = 35
  25. const ERR_LOTTERY_MAX_TIMES = 36
  26. const ERR_GAME_EXCHANGE_HAS = 101
  27. const ERR_GAME_THEME_HASNT = 102
  28. const ERR_GAME_THEME_ELEMENT_HASNT = 103
  29. const ERR_GAME_THEME_NOTEXISTS = 104
  30. const ERR_GAME_THEME_GETTED = 105
  31. const ERR_GAME_ELEMENT_NOTEXISTS = 106
  32. const ERR_GAME_ELEMENT_MATERIAL_NOTENOUGH = 107
  33. const ERR_GAME_THEME_MATERIAL_NOTENOUGH = 108
  34. const ERR_GAME_SHARE_ITEM_ERROR = 109
  35. const ERR_GAME_SHARE_ITEM_GETTED = 110
  36. // var (
  37. // ErrBindingNotFound = errors.New("binding for this user was not found in etcd")
  38. // ErrBrokenPipe = errors.New("broken low-level pipe")
  39. // ErrBufferExceed = errors.New("session send buffer exceed")
  40. // ErrChangeDictionaryWhileRunning = errors.New("you shouldn't change the dictionary while the app is already running")
  41. // ErrChangeRouteWhileRunning = errors.New("you shouldn't change routes while app is already running")
  42. // ErrCloseClosedGroup = errors.New("close closed group")
  43. // ErrCloseClosedSession = errors.New("close closed session")
  44. // ErrClosedGroup = errors.New("group closed")
  45. // ErrEmptyUID = errors.New("empty uid")
  46. // ErrEtcdGrantLeaseTimeout = errors.New("timed out waiting for etcd lease grant")
  47. // ErrEtcdLeaseNotFound = errors.New("etcd lease not found in group")
  48. // ErrFrontSessionCantPushToFront = errors.New("frontend session can't push to front")
  49. // ErrFrontendTypeNotSpecified = errors.New("for using SendPushToUsers from a backend server you have to specify a valid frontendType")
  50. // ErrGroupAlreadyExists = errors.New("group already exists")
  51. // ErrGroupNotFound = errors.New("group not found")
  52. // ErrIllegalUID = errors.New("illegal uid")
  53. // ErrInvalidCertificates = errors.New("certificates must be exactly two")
  54. // ErrInvalidSpanCarrier = errors.New("tracing: invalid span carrier")
  55. // ErrKickingUsers = errors.New("failed to kick users, check array with failed uids")
  56. // ErrMemberAlreadyExists = errors.New("member already exists in group")
  57. // ErrMemberNotFound = errors.New("member not found in the group")
  58. // ErrMemoryTTLNotFound = errors.New("memory group TTL not found")
  59. // ErrMetricNotKnown = errors.New("the provided metric does not exist")
  60. // ErrNatsMessagesBufferSizeZero = errors.New("pitaya.buffer.cluster.rpc.server.nats.messages cant be zero")
  61. // ErrNatsNoRequestTimeout = errors.New("pitaya.cluster.rpc.client.nats.requesttimeout cant be empty")
  62. // ErrNatsPushBufferSizeZero = errors.New("pitaya.buffer.cluster.rpc.server.nats.push cant be zero")
  63. // ErrNilCondition = errors.New("pitaya/timer: nil condition")
  64. // ErrNoBindingStorageModule = errors.New("for sending remote pushes or using unique session module while using grpc you need to pass it a BindingStorage")
  65. // ErrNoConnectionToServer = errors.New("rpc client has no connection to the chosen server")
  66. // ErrNoContextFound = errors.New("no context found")
  67. // ErrNoNatsConnectionString = errors.New("you have to provide a nats url")
  68. // ErrNoServerTypeChosenForRPC = errors.New("no server type chosen for sending RPC, send a full route in the format server.service.component")
  69. // ErrNoServerWithID = errors.New("can't find any server with the provided ID")
  70. // ErrNoServersAvailableOfType = errors.New("no servers available of this type")
  71. // ErrNoUIDBind = errors.New("you have to bind an UID to the session to do that")
  72. // ErrNonsenseRPC = errors.New("you are making a rpc that may be processed locally, either specify a different server type or specify a server id")
  73. // ErrNotImplemented = errors.New("method not implemented")
  74. // ErrNotifyOnRequest = errors.New("tried to notify a request route")
  75. // ErrOnCloseBackend = errors.New("onclose callbacks are not allowed on backend servers")
  76. // ErrProtodescriptor = errors.New("failed to get protobuf message descriptor")
  77. // ErrPushingToUsers = errors.New("failed to push message to users, check array with failed uids")
  78. // ErrRPCClientNotInitialized = errors.New("RPC client is not running")
  79. // ErrRPCJobAlreadyRegistered = errors.New("rpc job was already registered")
  80. // ErrRPCLocal = errors.New("RPC must be to a different server type")
  81. // ErrRPCServerNotInitialized = errors.New("RPC server is not running")
  82. // ErrReplyShouldBeNotNull = errors.New("reply must not be null")
  83. // ErrReplyShouldBePtr = errors.New("reply must be a pointer")
  84. // ErrRequestOnNotify = errors.New("tried to request a notify route")
  85. // ErrRouterNotInitialized = errors.New("router is not initialized")
  86. // ErrServerNotFound = errors.New("server not found")
  87. // ErrServiceDiscoveryNotInitialized = errors.New("service discovery client is not initialized")
  88. // ErrSessionAlreadyBound = errors.New("session is already bound to an uid")
  89. // ErrSessionDuplication = errors.New("session exists in the current group")
  90. // ErrSessionNotFound = errors.New("session not found")
  91. // ErrSessionOnNotify = errors.New("current session working on notify mode")
  92. // ErrTimeoutTerminatingBinaryModule = errors.New("timeout waiting to binary module to die")
  93. // ErrWrongValueType = errors.New("protobuf: convert on wrong type value")
  94. // ErrRateLimitExceeded = errors.New("rate limit exceeded")
  95. // ErrReceivedMsgSmallerThanExpected = errors.New("received less data than expected, EOF?")
  96. // ErrReceivedMsgBiggerThanExpected = errors.New("received more data than expected")
  97. // ErrConnectionClosed = errors.New("client connection closed")
  98. // )