-
Notifications
You must be signed in to change notification settings - Fork 89
/
listview.go
47 lines (40 loc) · 1.28 KB
/
listview.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
package gojenkins
import "encoding/xml"
type ListView struct {
XMLName xml.Name `xml:"hudson.model.ListView"`
Name string `xml:"name"`
FilterExecutors bool `xml:"filterExecutors"`
FilterQueue bool `xml:"filterQueue"`
Columns Columns `xml:"columns"`
}
func NewListView(name string) ListView {
columns := Columns{Column: []Column{StatusColumn{}, WeatherColumn{}, JobColumn{}, LastSuccessColumn{}, LastFailureColumn{}, LastDurationColumn{}, BuildButtonColumn{}}}
return ListView{Name: name, FilterExecutors: false, FilterQueue: false, Columns: columns}
}
type Column interface {
}
type Columns struct {
XMLName xml.Name `xml:"columns"`
Column []Column
}
type StatusColumn struct {
XMLName xml.Name `xml:"hudson.views.StatusColumn"`
}
type WeatherColumn struct {
XMLName xml.Name `xml:"hudson.views.WeatherColumn"`
}
type JobColumn struct {
XMLName xml.Name `xml:"hudson.views.JobColumn"`
}
type LastSuccessColumn struct {
XMLName xml.Name `xml:"hudson.views.LastSuccessColumn"`
}
type LastFailureColumn struct {
XMLName xml.Name `xml:"hudson.views.LastFailureColumn"`
}
type LastDurationColumn struct {
XMLName xml.Name `xml:"hudson.views.LastDurationColumn"`
}
type BuildButtonColumn struct {
XMLName xml.Name `xml:"hudson.views.BuildButtonColumn"`
}