forked from quay/goval-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rpminfo.go
102 lines (90 loc) · 3.22 KB
/
rpminfo.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
package oval
import (
"encoding/xml"
)
// RPMInfoTest : >tests>rpminfo_test
type RPMInfoTest struct {
XMLName xml.Name `xml:"rpminfo_test"`
ID string `xml:"id,attr"`
Comment string `xml:"comment,attr"`
Check string `xml:"check,attr"`
Version int `xml:"version,attr"`
testRef
}
var _ Test = (*RPMInfoTest)(nil)
// RPMVerifyFileTest : >tests>rpmverifyfile_test
type RPMVerifyFileTest struct {
XMLName xml.Name `xml:"rpmverifyfile_test"`
ID string `xml:"id,attr"`
Comment string `xml:"comment,attr"`
Check string `xml:"check,attr"`
Version int `xml:"version,attr"`
testRef
}
var _ Test = (*RPMVerifyFileTest)(nil)
// RPMInfoObject : >objects>RPMInfo_object
type RPMInfoObject struct {
XMLName xml.Name `xml:"rpminfo_object"`
ID string `xml:"id,attr"`
Version int `xml:"version,attr"`
Name string `xml:"name"`
}
type RPMVerifyFileObject struct {
XMLName xml.Name `xml:"rpmverifyfile_object"`
ID string `xml:"id,attr"`
Version int `xml:"version,attr"`
Behaviors VerifyFileBehaviors `xml:"behaviors"`
Name VerifyFileOp `xml:"name"`
Epoch VerifyFileOp `xml:"epoch"`
Release VerifyFileOp `xml:"release"`
RPMVersion VerifyFileOp `xml:"version"`
Arch VerifyFileOp `xml:"arch"`
Filepath string `xml:"filepath"`
}
type VerifyFileBehaviors struct {
XMLName xml.Name `xml:"behaviors"`
NoConfigFiles bool `xml:"noconfigfiles"`
NoGhostFiles bool `xml:"noghostfiles"`
NoGroup bool `xml:"nogroup"`
NoLinkTo bool `xml:"nolinkto"`
NoMD5 bool `xml:"nomd5"`
NoMode bool `xml:"nomode"`
NoMTime bool `xml:"nomtime"`
NoRDev bool `xml:"nordev"`
NoSize bool `xml:"nosize"`
NoUser bool `xml:"nouser"`
}
type VerifyFileOp struct {
XMLName xml.Name
Op string `xml:"operation,attr"`
}
// RPMInfoState : >states>rpminfo_state
type RPMInfoState struct {
XMLName xml.Name `xml:"rpminfo_state"`
ID string `xml:"id,attr"`
Version int `xml:"version,attr"`
Arch *Arch `xml:"arch"`
Epoch *Epoch `xml:"epoch"`
Release *Release `xml:"release"`
RPMVersion *Version `xml:"version"`
EVR *EVR `xml:"evr"`
SignatureKeyID *RPMSignatureKeyID `xml:"signature_keyid"`
}
// RPMVerifyFileState: >states>rpmverifyfile_state
type RPMVerifyFileState struct {
XMLName xml.Name `xml:"rpmverifyfile_state"`
ID string `xml:"id,attr"`
Version int `xml:"version,attr"`
Name *Name `xml:"name"`
Arch *Arch `xml:"arch"`
Epoch *Epoch `xml:"epoch"`
Release *Release `xml:"release"`
RPMVersion *Version `xml:"version"`
EVR *EVR `xml:"evr"`
SignatureKeyID *RPMSignatureKeyID `xml:"signature_keyid"`
}
type RPMSignatureKeyID struct {
XMLName xml.Name `xml:"signature_keyid"`
Operation Operation `xml:"operation,attr"`
Body string `xml:",chardata"`
}