-
Notifications
You must be signed in to change notification settings - Fork 3
/
cdr_param_enum.go
155 lines (133 loc) · 3.82 KB
/
cdr_param_enum.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
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
// Code generated by go-enum
// DO NOT EDIT!
package qlcchain
import (
"fmt"
"strings"
)
const (
// DLRStatusDelivered is a DLRStatus of type Delivered
DLRStatusDelivered DLRStatus = iota
// DLRStatusRejected is a DLRStatus of type Rejected
DLRStatusRejected
// DLRStatusUnknown is a DLRStatus of type Unknown
DLRStatusUnknown
// DLRStatusUndelivered is a DLRStatus of type Undelivered
DLRStatusUndelivered
// DLRStatusEmpty is a DLRStatus of type Empty
DLRStatusEmpty
)
const _DLRStatusName = "DeliveredRejectedUnknownUndeliveredEmpty"
var _DLRStatusNames = []string{
_DLRStatusName[0:9],
_DLRStatusName[9:17],
_DLRStatusName[17:24],
_DLRStatusName[24:35],
_DLRStatusName[35:40],
}
// DLRStatusNames returns a list of possible string values of DLRStatus.
func DLRStatusNames() []string {
tmp := make([]string, len(_DLRStatusNames))
copy(tmp, _DLRStatusNames)
return tmp
}
var _DLRStatusMap = map[DLRStatus]string{
0: _DLRStatusName[0:9],
1: _DLRStatusName[9:17],
2: _DLRStatusName[17:24],
3: _DLRStatusName[24:35],
4: _DLRStatusName[35:40],
}
// String implements the Stringer interface.
func (x DLRStatus) String() string {
if str, ok := _DLRStatusMap[x]; ok {
return str
}
return fmt.Sprintf("DLRStatus(%d)", x)
}
var _DLRStatusValue = map[string]DLRStatus{
_DLRStatusName[0:9]: 0,
_DLRStatusName[9:17]: 1,
_DLRStatusName[17:24]: 2,
_DLRStatusName[24:35]: 3,
_DLRStatusName[35:40]: 4,
}
// ParseDLRStatus attempts to convert a string to a DLRStatus
func ParseDLRStatus(name string) (DLRStatus, error) {
if x, ok := _DLRStatusValue[name]; ok {
return x, nil
}
return DLRStatus(0), fmt.Errorf("%s is not a valid DLRStatus, try [%s]", name, strings.Join(_DLRStatusNames, ", "))
}
// MarshalText implements the text marshaller method
func (x DLRStatus) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
// UnmarshalText implements the text unmarshaller method
func (x *DLRStatus) UnmarshalText(text []byte) error {
name := string(text)
tmp, err := ParseDLRStatus(name)
if err != nil {
return err
}
*x = tmp
return nil
}
const (
// SendingStatusSent is a SendingStatus of type Sent
SendingStatusSent SendingStatus = iota
// SendingStatusError is a SendingStatus of type Error
SendingStatusError
// SendingStatusEmpty is a SendingStatus of type Empty
SendingStatusEmpty
)
const _SendingStatusName = "SentErrorEmpty"
var _SendingStatusNames = []string{
_SendingStatusName[0:4],
_SendingStatusName[4:9],
_SendingStatusName[9:14],
}
// SendingStatusNames returns a list of possible string values of SendingStatus.
func SendingStatusNames() []string {
tmp := make([]string, len(_SendingStatusNames))
copy(tmp, _SendingStatusNames)
return tmp
}
var _SendingStatusMap = map[SendingStatus]string{
0: _SendingStatusName[0:4],
1: _SendingStatusName[4:9],
2: _SendingStatusName[9:14],
}
// String implements the Stringer interface.
func (x SendingStatus) String() string {
if str, ok := _SendingStatusMap[x]; ok {
return str
}
return fmt.Sprintf("SendingStatus(%d)", x)
}
var _SendingStatusValue = map[string]SendingStatus{
_SendingStatusName[0:4]: 0,
_SendingStatusName[4:9]: 1,
_SendingStatusName[9:14]: 2,
}
// ParseSendingStatus attempts to convert a string to a SendingStatus
func ParseSendingStatus(name string) (SendingStatus, error) {
if x, ok := _SendingStatusValue[name]; ok {
return x, nil
}
return SendingStatus(0), fmt.Errorf("%s is not a valid SendingStatus, try [%s]", name, strings.Join(_SendingStatusNames, ", "))
}
// MarshalText implements the text marshaller method
func (x SendingStatus) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
// UnmarshalText implements the text unmarshaller method
func (x *SendingStatus) UnmarshalText(text []byte) error {
name := string(text)
tmp, err := ParseSendingStatus(name)
if err != nil {
return err
}
*x = tmp
return nil
}