-
Notifications
You must be signed in to change notification settings - Fork 0
/
mitre.go
98 lines (80 loc) · 2.91 KB
/
mitre.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
package mitre
type Accept struct {
Value string `xml:",chardata"`
Count string `xml:"count,attr"`
}
type Comment struct {
Value string `xml:",chardata"`
Voter string `xml:"voter,attr"`
}
type CommentsType struct {
Comment []Comment `xml:"http://cve.mitre.org/cve/downloads/1.0 comment,omitempty"`
}
type Cve struct {
Item []ItemType `xml:"http://cve.mitre.org/cve/downloads/1.0 item"`
SchemaVersion string `xml:"schemaVersion,attr,omitempty"`
}
type ItemType struct {
Status StatusEnumType `xml:"http://cve.mitre.org/cve/downloads/1.0 status"`
Phase SpecificPhaseType `xml:"http://cve.mitre.org/cve/downloads/1.0 phase,omitempty"`
Desc string `xml:"http://cve.mitre.org/cve/downloads/1.0 desc"`
Refs RefsType `xml:"http://cve.mitre.org/cve/downloads/1.0 refs"`
Votes VotesType `xml:"http://cve.mitre.org/cve/downloads/1.0 votes,omitempty"`
Comments CommentsType `xml:"http://cve.mitre.org/cve/downloads/1.0 comments,omitempty"`
Type TypeEnumType `xml:"type,attr"`
Name string `xml:"name,attr"`
Seq string `xml:"seq,attr"`
}
type Modify struct {
Value string `xml:",chardata"`
Count string `xml:"count,attr"`
}
type Noop struct {
Value string `xml:",chardata"`
Count string `xml:"count,attr"`
}
type Recast struct {
Value string `xml:",chardata"`
Count string `xml:"count,attr"`
}
// Holds individual hyperlink element
type RefType struct {
Value string `xml:",chardata"`
Source string `xml:"source,attr"`
Url string `xml:"url,attr,omitempty"`
}
// holds all hyperlink elements
type RefsType struct {
Ref []RefType `xml:"http://cve.mitre.org/cve/downloads/1.0 ref,omitempty"`
}
type Reject struct {
Value string `xml:",chardata"`
Count string `xml:"count,attr"`
}
type Reviewing struct {
Value string `xml:",chardata"`
Count string `xml:"count,attr"`
}
type Revote struct {
Value string `xml:",chardata"`
Count string `xml:"count,attr"`
}
// May be one of Proposed, Interim, Modified, Assigned
type SimplePhaseEnumType string
type SpecificPhaseType struct {
SimplePhaseEnumType SimplePhaseEnumType `xml:",chardata"`
Date string `xml:"date,attr,omitempty"`
}
// May be one of Entry, Candidate
type StatusEnumType string
// May be one of CAN, CVE
type TypeEnumType string
type VotesType struct {
Accept Accept `xml:"http://cve.mitre.org/cve/downloads/1.0 accept,omitempty"`
Modify Modify `xml:"http://cve.mitre.org/cve/downloads/1.0 modify,omitempty"`
Noop Noop `xml:"http://cve.mitre.org/cve/downloads/1.0 noop,omitempty"`
Recast Recast `xml:"http://cve.mitre.org/cve/downloads/1.0 recast,omitempty"`
Reject Reject `xml:"http://cve.mitre.org/cve/downloads/1.0 reject,omitempty"`
Reviewing Reviewing `xml:"http://cve.mitre.org/cve/downloads/1.0 reviewing,omitempty"`
Revote Revote `xml:"http://cve.mitre.org/cve/downloads/1.0 revote,omitempty"`
}