-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenum.go
82 lines (67 loc) · 2.18 KB
/
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
package ipso
// InstanceType constants.
const (
InstanceTypeSingle InstanceType = "Single"
InstanceTypeMultiple InstanceType = "Multiple"
)
// InstanceType represents the type of data.
type InstanceType string
// String for InstanceType.
func (e InstanceType) String() string {
return string(e)
}
// MandatoryType constants.
const (
MandatoryTypeOptional MandatoryType = "Optional"
MandatoryTypeMandatory MandatoryType = "Mandatory"
)
// MandatoryType represents the type of data.
type MandatoryType string
// String for MandatoryType.
func (e MandatoryType) String() string {
return string(e)
}
// OperationType constants.
const (
OperationTypeRead OperationType = "R"
OperationTypeWrite OperationType = "W"
OperationTypeReadWrite OperationType = "RW"
OperationTypeExecute OperationType = "E"
)
// OperationType represents the type of data.
type OperationType string
// String for OperationType.
func (e OperationType) String() string {
return string(e)
}
// ResourceType constants according to OMA-TS-LightweightM2M_Core-V1_2-20201110-A Appendix C. Data types (Normative).
const (
ResourceTypeString ResourceType = "String"
ResourceTypeInteger ResourceType = "Integer"
ResourceTypeUnsignedInteger ResourceType = "Unsigned Integer"
ResourceTypeFloat ResourceType = "Float"
ResourceTypeBoolean ResourceType = "Boolean"
ResourceTypeOpaque ResourceType = "Opaque"
ResourceTypeTime ResourceType = "Time"
ResourceTypeObjLink ResourceType = "Objlnk"
ResourceTypeCoreLink ResourceType = "Corelnk"
ResourceTypeNone ResourceType = "none"
)
// ResourceType represents the type of data.
type ResourceType string
// String for ResourceType.
func (e ResourceType) String() string {
return string(e)
}
// DifferenceType constants.
const (
DifferenceTypeUnknown DifferenceType = "Unknown reason"
DifferenceTypeNewObject DifferenceType = "New object added"
DifferenceTypeObjectRemoved DifferenceType = "Object was removed"
)
// DifferenceType represents the objects difference explanation.
type DifferenceType string
// String for ResourceType.
func (e DifferenceType) String() string {
return string(e)
}