-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest.go
87 lines (85 loc) · 2.99 KB
/
request.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
package obs
type Person struct {
Name string `xml:"name,attr"`
Role string `xml:"role,attr"` //optional
}
type Grouped struct {
Id string `xml:"id,attr"`
}
type Acceptinfo struct {
Rev string `xml:"rev,attr"`
Srcmd5 string `xml:"srcmd5,attr"`
Osrcmd5 string `xml:"osrcmd5,attr"`
Oproject string `xml:"oproject,attr"` //optional
Opackage string `xml:"opackage,attr"` //optional
Xsrcmd5 string `xml:"xsrcmd5,attr"` //optional
Oxsrcmd5 string `xml:"oxsrcmd5,attr"` //optional
}
type Options struct {
Sourceupdate string `xml:"sourceupdate"` //optional
Updatelink string `xml:"updatelink"` //optional
Makeoriginolder string `xml:"makeoriginolder"` //optional
}
type Group struct {
Name string `xml:"name,attr"`
Role string `xml:"role,attr"` //optional
}
type Target struct {
Project string `xml:"project,attr"`
Package string `xml:"package,attr"` //optional
Releaseproject string `xml:"releaseproject,attr"` //optional
Repository string `xml:"repository,attr"` //optional
}
type Source struct {
Project string `xml:"project,attr"`
Package string `xml:"package,attr"` //optional
Rev string `xml:"rev,attr"` //optional
}
type Action struct {
Type string `xml:"type,attr"`
Source Source `xml:"source"` //optional
Target Target `xml:"target"` //optional
Person Person `xml:"person"` //optional
Group Group `xml:"group"` //optional
Grouped []Grouped `xml:"grouped"` //optional-oneOrMore
Options Options `xml:"options"` //optional
Acceptinfo Acceptinfo `xml:"acceptinfo"` //optional
}
type State struct {
Name string `xml:"name,attr"`
Who string `xml:"who,attr"`
When string `xml:"when,attr"`
Comment string `xml:"comment"`
}
type Review struct {
State string `xml:"state,attr"`
By_user string `xml:"by_user,attr"`
By_group string `xml:"by_group,attr"`
By_project string `xml:"by_project,attr"`
By_package string `xml:"by_package,attr"`
Who string `xml:"who,attr"`
When string `xml:"when,attr"`
Comment string `xml:"comment"`
}
type History struct {
Who string `xml:"who,attr"`
When string `xml:"when,attr"`
Description string `xml:"description"`
Comment string `xml:"comment"` //optional
}
type ReleaseRequest struct {
Id string `xml:"id,attr"` //optional
Creator string `xml:"creator,attr"` //optional
Actions []Action `xml:"action"` //oneOrMore
State State `xml:"state"` //optional
Description string `xml:"description"` //optional
Priority string `xml:"priority"` //optional ref:obs-ratings
Reviews []Review `xml:"review"` //zeroOrMore
Histories []History `xml:"history"` //zeroOrMore
Title string `xml:"title"` //optional
Accept_at string `xml:"accept_at"` //optional
}
type Collection struct {
Matches string `xml:"matches,attr"`
ReleaseRequests []ReleaseRequest `xml:"request"`
}