-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcode.go
More file actions
180 lines (164 loc) · 3.24 KB
/
code.go
File metadata and controls
180 lines (164 loc) · 3.24 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
package code
// user
const (
UserIsBanned = iota + 100000
UserNotFound
UserNotPermission
UserNotFollow
UserNotFollowSelf
UserExistFollow
_ // was UserEmailNotVerified — removed, placeholder to preserve iota values
UserNotLogin
UserWaitVerify
UserIsDeactivated // 100009 用户已注销
UserNotDeactivating // 100010 用户未在注销冷却期
)
// script
const (
ScriptNameIsEmpty = iota + 101000
ScriptDescIsEmpty
ScriptVersionIsEmpty
ScriptParseFailed
ScriptNotFound
ScriptIsDelete
ScriptVersionExist
ScriptCreateFailed
ScriptUpdateFailed
ScriptNotAllowUrl
ScriptIsArchive
ScriptScoreDeleted
ScriptScoreNotFound
ScriptChangePreReleaseNotLatest
ScriptMustHaveVersion
WebhookSecretError
WebhookRepositoryNotFound
ScriptDeleteReleaseNotLatest
ScriptCategoryNotFound
ScriptNameTooLong
ScriptDescTooLong
ScriptTagsTooMany
ScriptNameInvalid
ScriptDescInvalid
)
// issue
const (
IssueLabelNotExist = iota + 102000
IssueNotFound
IssueIsDelete
IssueNoPermission
IssueCommentNotFound
IssueLabelNotChange
)
// resource
const (
ResourceImageTooLarge = iota + 103000
ResourceNotImage
ResourceNotFound
)
// statistics
const (
StatisticsLimitExceeded = iota + 104000
StatisticsResultLimit
StatisticsInfoUninitialized
StatisticsWhitelistInvalid
StatisticsWhitelistNotFound
)
// access
const (
AccessAlreadyExist = iota + 10500
AccessNotFound
)
// group
const (
GroupNotFound = iota + 106000
GroupMemberNotFound
GroupMemberExist
)
// access invite
const (
AccessInviteNotFound = iota + 107000
AccessInviteIsAudit
AccessInviteNotAudit
AccessInviteNotPending
AccessInviteExist
AccessInviteExpired
AccessInviteUsed
AccessInviteInvalid
AccessInviteUserError
)
// script favorite
const (
ScriptFavoriteFolderNotFound = iota + 108000
ScriptFavoriteMustUserID
ScriptFavoriteFolderLimitExceeded
ScriptFavoriteExist
ScriptFavoriteNotFound
ScriptFavoriteLimitExceeded
ScriptFavoriteFolderCannotEdit
)
// notification
const (
NotificationNotFound = iota + 109000
NotificationPermissionDenied
)
// chat
const (
ChatSessionNotFound = iota + 110000
ChatNoPermission
ChatSessionLimitExceeded
ChatMessageLimitExceeded
ChatRateLimitExceeded
ChatAIConfigError
)
// auth
const (
AuthEmailExists = iota + 111000
AuthUsernameExists
AuthInvalidCredentials
AuthTokenExpired
AuthTokenInvalid
AuthEmailNotVerified
AuthOAuthAppNotFound
AuthOAuthInvalidRedirect
AuthOAuthCodeInvalid
AuthCaptchaFailed
AuthInvalidUsername
AuthInvalidEmail
AuthForbiddenEmail
AuthWrongOldPassword
AuthNoChange
AuthUserProtected
AuthRegisterCodeInvalid
AuthRegisterCodeExpired
AuthRegisterCodeSent
AuthRegisterSuccess
AuthPasswordResetSuccess
AuthPasswordResetEmailSent
AuthInvalidPassword
AuthOIDCProviderNotFound
AuthOIDCStateFailed
AuthOIDCCallbackFailed
AuthOIDCBindTokenInvalid
AuthOIDCAlreadyBound
AuthOIDCBindNotFound
AuthTermsNotAgreed
)
// webauthn
const (
AuthWebAuthnChallengeFailed = iota + 113000
AuthWebAuthnCredentialNotFound
AuthWebAuthnVerificationFailed
AuthWebAuthnSessionExpired
AuthWebAuthnNoCredentials
AuthWebAuthnUserNotFound
AuthWebAuthnCredentialLimitExceeded
)
// report
const (
ReportNotFound = iota + 112000
ReportIsDelete
ReportAlreadyResolved
ReportCommentNotFound
ReportReasonInvalid
ReportSelfReport
)