-
Notifications
You must be signed in to change notification settings - Fork 5
/
models.go
227 lines (135 loc) · 5.3 KB
/
models.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
// Code generated by https://github.com/gocomply/xsd2go; DO NOT EDIT.
// Models for http://oval.mitre.org/XMLSchema/oval-results-5
package oval_res
import (
"encoding/xml"
"github.com/gocomply/scap/pkg/scap/models/oval"
"github.com/gocomply/scap/pkg/scap/models/oval_def"
"github.com/gocomply/scap/pkg/scap/models/oval_sc"
"github.com/gocomply/scap/pkg/scap/models/xml_dsig"
)
// Element
type OvalResults struct {
XMLName xml.Name `xml:oval_results`
Generator oval.GeneratorType `xml:"generator"`
Directives DefaultDirectivesType `xml:"directives"`
ClassDirectives []ClassDirectivesType `xml:"class_directives"`
OvalDefinitions *oval_def.OvalDefinitions `xml:"oval_definitions"`
Results ResultsType `xml:"results"`
Signature *xml_dsig.Signature `xml:"Signature"`
}
// XSD ComplexType declarations
type DirectivesType struct {
DefinitionTrue DirectiveType `xml:"definition_true"`
DefinitionFalse DirectiveType `xml:"definition_false"`
DefinitionUnknown DirectiveType `xml:"definition_unknown"`
DefinitionError DirectiveType `xml:"definition_error"`
DefinitionNotEvaluated DirectiveType `xml:"definition_not_evaluated"`
DefinitionNotApplicable DirectiveType `xml:"definition_not_applicable"`
InnerXml string `xml:",innerxml"`
}
type DefaultDirectivesType struct {
IncludeSourceDefinitions string `xml:"include_source_definitions,attr,omitempty"`
DefinitionTrue DirectiveType `xml:"definition_true"`
DefinitionFalse DirectiveType `xml:"definition_false"`
DefinitionUnknown DirectiveType `xml:"definition_unknown"`
DefinitionError DirectiveType `xml:"definition_error"`
DefinitionNotEvaluated DirectiveType `xml:"definition_not_evaluated"`
DefinitionNotApplicable DirectiveType `xml:"definition_not_applicable"`
InnerXml string `xml:",innerxml"`
}
type ClassDirectivesType struct {
Class string `xml:"class,attr"`
DefinitionTrue DirectiveType `xml:"definition_true"`
DefinitionFalse DirectiveType `xml:"definition_false"`
DefinitionUnknown DirectiveType `xml:"definition_unknown"`
DefinitionError DirectiveType `xml:"definition_error"`
DefinitionNotEvaluated DirectiveType `xml:"definition_not_evaluated"`
DefinitionNotApplicable DirectiveType `xml:"definition_not_applicable"`
InnerXml string `xml:",innerxml"`
}
type DirectiveType struct {
Reported string `xml:"reported,attr"`
Content string `xml:"content,attr,omitempty"`
InnerXml string `xml:",innerxml"`
}
type ResultsType struct {
System []SystemType `xml:"system"`
InnerXml string `xml:",innerxml"`
}
type SystemType struct {
Definitions *DefinitionsType `xml:"definitions"`
Tests *TestsType `xml:"tests"`
OvalSystemCharacteristics oval_sc.OvalSystemCharacteristics `xml:"oval_system_characteristics"`
InnerXml string `xml:",innerxml"`
}
type DefinitionsType struct {
Definition []DefinitionType `xml:"definition"`
InnerXml string `xml:",innerxml"`
}
type DefinitionType struct {
DefinitionId string `xml:"definition_id,attr"`
Version string `xml:"version,attr"`
VariableInstance string `xml:"variable_instance,attr,omitempty"`
Class string `xml:"class,attr,omitempty"`
Result string `xml:"result,attr"`
Message []oval.MessageType `xml:"message"`
Criteria *CriteriaType `xml:"criteria"`
InnerXml string `xml:",innerxml"`
}
type CriteriaType struct {
ApplicabilityCheck string `xml:"applicability_check,attr,omitempty"`
Operator string `xml:"operator,attr"`
Negate string `xml:"negate,attr,omitempty"`
Result string `xml:"result,attr"`
Criteria []CriteriaType `xml:"criteria"`
Criterion []CriterionType `xml:"criterion"`
ExtendDefinition []ExtendDefinitionType `xml:"extend_definition"`
InnerXml string `xml:",innerxml"`
}
type CriterionType struct {
ApplicabilityCheck string `xml:"applicability_check,attr,omitempty"`
TestRef string `xml:"test_ref,attr"`
Version string `xml:"version,attr"`
VariableInstance string `xml:"variable_instance,attr,omitempty"`
Negate string `xml:"negate,attr,omitempty"`
Result string `xml:"result,attr"`
InnerXml string `xml:",innerxml"`
}
type ExtendDefinitionType struct {
ApplicabilityCheck string `xml:"applicability_check,attr,omitempty"`
DefinitionRef string `xml:"definition_ref,attr"`
Version string `xml:"version,attr"`
VariableInstance string `xml:"variable_instance,attr,omitempty"`
Negate string `xml:"negate,attr,omitempty"`
Result string `xml:"result,attr"`
InnerXml string `xml:",innerxml"`
}
type TestsType struct {
Test []TestType `xml:"test"`
InnerXml string `xml:",innerxml"`
}
type TestType struct {
TestId string `xml:"test_id,attr"`
Version string `xml:"version,attr"`
VariableInstance string `xml:"variable_instance,attr,omitempty"`
CheckExistence string `xml:"check_existence,attr,omitempty"`
Check string `xml:"check,attr"`
StateOperator string `xml:"state_operator,attr,omitempty"`
Result string `xml:"result,attr"`
Message []oval.MessageType `xml:"message"`
TestedItem []TestedItemType `xml:"tested_item"`
TestedVariable []TestedVariableType `xml:"tested_variable"`
InnerXml string `xml:",innerxml"`
}
type TestedItemType struct {
ItemId string `xml:"item_id,attr"`
Result string `xml:"result,attr"`
Message []oval.MessageType `xml:"message"`
InnerXml string `xml:",innerxml"`
}
type TestedVariableType struct {
VariableId string `xml:"variable_id,attr"`
Text string `xml:",chardata"`
InnerXml string `xml:",innerxml"`
}