-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreasoncode_string.go
91 lines (85 loc) · 3.44 KB
/
reasoncode_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
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
// Code generated by "stringer -type ReasonCode"; DO NOT EDIT.
package mq
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Success-0]
_ = x[NormalDisconnect-0]
_ = x[GrantedQoS0-0]
_ = x[GrantedQoS1-1]
_ = x[GrantedQoS2-2]
_ = x[DisconnectWithWill-4]
_ = x[NoMatchingSubscribers-16]
_ = x[NoSubscriptionExisted-17]
_ = x[ContinueAuth-24]
_ = x[ReAuthenticate-25]
_ = x[UnspecifiedError-128]
_ = x[MalformedPacket-129]
_ = x[ProtocolError-130]
_ = x[ImplementationSpecificError-131]
_ = x[UnsupportedProtocolVersion-132]
_ = x[ClientIdentifierNotValid-133]
_ = x[BadUserNameOrPassword-134]
_ = x[NotAuthorized-135]
_ = x[ServerUnavailable-136]
_ = x[ServerBusy-137]
_ = x[Banned-138]
_ = x[ServerShuttingDown-139]
_ = x[BadAuthenticationMethod-140]
_ = x[KeepAliveTimeout-141]
_ = x[SessionTakenOver-142]
_ = x[TopicFilterInvalid-143]
_ = x[TopicNameInvalid-144]
_ = x[PacketIdentifierInUse-145]
_ = x[PacketIdentifierNotFound-146]
_ = x[ReceiveMaximumExceeded-147]
_ = x[TopicAliasInvalid-148]
_ = x[PacketTooLarge-149]
_ = x[MessageRateToHigh-150]
_ = x[QuotaExceeded-151]
_ = x[AdministrativeAction-152]
_ = x[PayloadFormatInvalid-153]
_ = x[RetainNotSupported-154]
_ = x[QoSNotSupported-155]
_ = x[UseAnotherServer-156]
_ = x[ServerMoved-157]
_ = x[SharedSubscriptionsNotSupported-158]
_ = x[ConnectionRateExceeded-159]
_ = x[MaximumConnectTime-160]
_ = x[SubscriptionIdentifiersNotSupported-161]
_ = x[WildcardSubscriptionsNotSupported-162]
}
const (
_ReasonCode_name_0 = "SuccessGrantedQoS1GrantedQoS2"
_ReasonCode_name_1 = "DisconnectWithWill"
_ReasonCode_name_2 = "NoMatchingSubscribersNoSubscriptionExisted"
_ReasonCode_name_3 = "ContinueAuthReAuthenticate"
_ReasonCode_name_4 = "UnspecifiedErrorMalformedPacketProtocolErrorImplementationSpecificErrorUnsupportedProtocolVersionClientIdentifierNotValidBadUserNameOrPasswordNotAuthorizedServerUnavailableServerBusyBannedServerShuttingDownBadAuthenticationMethodKeepAliveTimeoutSessionTakenOverTopicFilterInvalidTopicNameInvalidPacketIdentifierInUsePacketIdentifierNotFoundReceiveMaximumExceededTopicAliasInvalidPacketTooLargeMessageRateToHighQuotaExceededAdministrativeActionPayloadFormatInvalidRetainNotSupportedQoSNotSupportedUseAnotherServerServerMovedSharedSubscriptionsNotSupportedConnectionRateExceededMaximumConnectTimeSubscriptionIdentifiersNotSupportedWildcardSubscriptionsNotSupported"
)
var (
_ReasonCode_index_0 = [...]uint8{0, 7, 18, 29}
_ReasonCode_index_2 = [...]uint8{0, 21, 42}
_ReasonCode_index_3 = [...]uint8{0, 12, 26}
_ReasonCode_index_4 = [...]uint16{0, 16, 31, 44, 71, 97, 121, 142, 155, 172, 182, 188, 206, 229, 245, 261, 279, 295, 316, 340, 362, 379, 393, 410, 423, 443, 463, 481, 496, 512, 523, 554, 576, 594, 629, 662}
)
func (i ReasonCode) String() string {
switch {
case i <= 2:
return _ReasonCode_name_0[_ReasonCode_index_0[i]:_ReasonCode_index_0[i+1]]
case i == 4:
return _ReasonCode_name_1
case 16 <= i && i <= 17:
i -= 16
return _ReasonCode_name_2[_ReasonCode_index_2[i]:_ReasonCode_index_2[i+1]]
case 24 <= i && i <= 25:
i -= 24
return _ReasonCode_name_3[_ReasonCode_index_3[i]:_ReasonCode_index_3[i+1]]
case 128 <= i && i <= 162:
i -= 128
return _ReasonCode_name_4[_ReasonCode_index_4[i]:_ReasonCode_index_4[i+1]]
default:
return "ReasonCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}