forked from sleepinggenius2/gosmi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
smi.go
94 lines (80 loc) · 1.55 KB
/
smi.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
package types
import (
"time"
)
type SmiModule struct {
Name SmiIdentifier
Path string
Organization string
ContactInfo string
Description string
Reference string
Language Language
Conformance bool
}
type SmiRevision struct {
Date time.Time
Description string
}
type SmiImport struct {
Module SmiIdentifier
Name SmiIdentifier
}
type SmiValue struct {
BaseType BaseType
Len uint
Value interface{}
}
type SmiType struct {
Name SmiIdentifier
BaseType BaseType
Decl Decl
Format string
Value SmiValue
Units string
Status Status
Description string
Reference string
}
type SmiNamedNumber struct {
Name SmiIdentifier
Value SmiValue
}
type SmiRange struct {
MinValue SmiValue
MaxValue SmiValue
}
type SmiNode struct {
Name SmiIdentifier
OidLen int
Oid Oid
Decl Decl
Access Access
Status Status
Format string
Value SmiValue
Units string
Description string
Reference string
IndexKind IndexKind
Implied bool
Create bool
NodeKind NodeKind
}
type SmiElement struct{}
type SmiOption struct {
Description string
}
type SmiRefinement struct {
Access Access
Description string
}
type SmiMacro struct {
Name SmiIdentifier
Decl Decl
Status Status
Description string
Reference string
}
// void (SmiErrorHandler) (char *path, int line, int severity, char *msg, char *tag)
type SmiErrorHandler func(path string, line int, severity int, msg string, tag string)