-
Notifications
You must be signed in to change notification settings - Fork 0
/
code.go
99 lines (95 loc) · 2.75 KB
/
code.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package errutil
const (
codeBase = 1000
)
const (
Unknown = codeBase + iota
yxBadRoute
yxNotFound
yxWrongType
yxUserNameExists
yxAuthFailed
yxIllegalParameter
yxNotRSAPublicKey
yxNotRSAPrivateKey
yxIllegalLoginType
yxWrongPassword
yxUserNameNotFound
yxInitFailed
yxServerInternal
yxDbOperation
yxCacheOperation
yxPermissionDenied
yxNotImplemented
yxUserNotFound
yxTokenNotFound
yxInvalidToken
yxIllegalName
yxTokenMismatchUser
yxInvalidPlatform
yxUnsupportSignType
yxOrderNotFound
yxInvalidParameter
yxRequestFailed
yxIllegalOrderType
yxCoinNotEnough
yxFrequencyLimited
yxVerifyFailed
yxSignFailed
yxTradeExisted
yxProviderNotFound
yxThirdAccountNotFound
yxWrongThirdLoginType
yxDirNotExists
yxPayTestDisable
yxPropertyNotFound
yxUuidNotFound
yxProductionNotFound
yxRequestPrePayIDFailed
YXDeskNotFound
)
var errs = map[error]int{
ErrBadRoute: yxBadRoute,
ErrNotFound: yxNotFound,
ErrWrongType: yxWrongType,
ErrUserNameExists: yxUserNameExists,
ErrIllegalParameter: yxIllegalParameter,
ErrNotRSAPublicKey: yxNotRSAPublicKey,
ErrNotRSAPrivateKey: yxNotRSAPrivateKey,
ErrAuthFailed: yxAuthFailed,
ErrIllegalLoginType: yxIllegalLoginType,
ErrWrongPassword: yxWrongPassword,
ErrUserNameNotFound: yxUserNameNotFound,
ErrInitFailed: yxInitFailed,
ErrServerInternal: yxServerInternal,
ErrDBOperation: yxDbOperation,
ErrCacheOperation: yxCacheOperation,
ErrPermissionDenied: yxPermissionDenied,
ErrNotImplemented: yxNotImplemented,
ErrUserNotFound: yxUserNotFound,
ErrTokenNotFound: yxTokenNotFound,
ErrInvalidToken: yxInvalidToken,
ErrIllegalName: yxIllegalName,
ErrTokenMismatchUser: yxTokenMismatchUser,
ErrInvalidPayPlatform: yxInvalidPlatform,
ErrUnsupportSignType: yxUnsupportSignType,
ErrOrderNotFound: yxOrderNotFound,
ErrInvalidParameter: yxInvalidParameter,
ErrRequestFailed: yxRequestFailed,
ErrIllegalOrderType: yxIllegalOrderType,
ErrCoinNotEnough: yxCoinNotEnough,
ErrFrequencyLimited: yxFrequencyLimited,
ErrVerifyFailed: yxVerifyFailed,
ErrSignFailed: yxSignFailed,
ErrTradeExisted: yxTradeExisted,
ErrProviderNotFound: yxProviderNotFound,
ErrThirdAccountNotFound: yxThirdAccountNotFound,
ErrWrongThirdLoginType: yxWrongThirdLoginType,
ErrDirNotExists: yxDirNotExists,
ErrPayTestDisable: yxPayTestDisable,
ErrPropertyNotFound: yxPropertyNotFound,
ErrUUIDNotFound: yxUuidNotFound,
ErrProductionNotFound: yxProductionNotFound,
ErrRequestPrePayIDFailed: yxRequestPrePayIDFailed,
ErrDeskNotFound: YXDeskNotFound,
}