/
servererror_string.go
60 lines (55 loc) · 2.12 KB
/
servererror_string.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
// generated by stringer -type=ServerError; DO NOT EDIT
package vk
import "fmt"
const (
_ServerError_name_0 = "ErrBadResponseCodeErrZeroErrUnknownErrApplicationDisabledErrUnknownMethodErrInvalidSignatureErrAuthFailedErrTooManyRequestsErrInsufficientPermissionsErrInvalidRequestErrTooManyOneTypeRequestsErrInternalServerErrorErrAppInTestModeErrCaptchaNeededErrNotAllowedErrHttpsOnlyErrNeedValidationErrStandaloneOnlyErrStandaloneOpenAPIOnlyErrMethodDisabledErrNeedConfirmation"
_ServerError_name_1 = "ErrOneOfParametersInvalidErrInvalidAPIID"
_ServerError_name_2 = "ErrInvalidAUserID"
_ServerError_name_3 = "ErrInvalidTimestamp"
_ServerError_name_4 = "ErrAlbumAccessProhibited"
_ServerError_name_5 = "ErrGroupAccessProhibited"
_ServerError_name_6 = "ErrAlbumOverflow"
_ServerError_name_7 = "ErrMoneyTransferNotAllowed"
_ServerError_name_8 = "ErrInsufficientPermissionsAd"
_ServerError_name_9 = "ErrInternalServerErrorAd"
)
var (
_ServerError_index_0 = [...]uint16{0, 18, 25, 35, 57, 73, 92, 105, 123, 149, 166, 191, 213, 229, 245, 258, 270, 287, 304, 328, 345, 364}
_ServerError_index_1 = [...]uint8{0, 25, 40}
_ServerError_index_2 = [...]uint8{0, 17}
_ServerError_index_3 = [...]uint8{0, 19}
_ServerError_index_4 = [...]uint8{0, 24}
_ServerError_index_5 = [...]uint8{0, 24}
_ServerError_index_6 = [...]uint8{0, 16}
_ServerError_index_7 = [...]uint8{0, 26}
_ServerError_index_8 = [...]uint8{0, 28}
_ServerError_index_9 = [...]uint8{0, 24}
)
func (i ServerError) String() string {
switch {
case -1 <= i && i <= 19:
i -= -1
return _ServerError_name_0[_ServerError_index_0[i]:_ServerError_index_0[i+1]]
case 100 <= i && i <= 101:
i -= 100
return _ServerError_name_1[_ServerError_index_1[i]:_ServerError_index_1[i+1]]
case i == 113:
return _ServerError_name_2
case i == 150:
return _ServerError_name_3
case i == 200:
return _ServerError_name_4
case i == 203:
return _ServerError_name_5
case i == 300:
return _ServerError_name_6
case i == 500:
return _ServerError_name_7
case i == 600:
return _ServerError_name_8
case i == 603:
return _ServerError_name_9
default:
return fmt.Sprintf("ServerError(%d)", i)
}
}