forked from yosida95/golang-jenkins
-
Notifications
You must be signed in to change notification settings - Fork 3
/
queue.go
49 lines (42 loc) · 1.4 KB
/
queue.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
package gojenkins
type Queue struct {
Items []Item `json:"items"`
}
type Item struct {
Actions []Action `json:"actions"`
Blocked bool `json:"blocked"`
Buildable bool `json:"buildable"`
Id int `json:"id"`
InQueueSince int64 `json:"inQueueSince"`
Params string `json:"params"`
Stuck bool `json:"stuck"`
Task Task `json:"task"`
URL string `json:"url"`
Why string `json:"why"`
BuildableStartMilliseconds int64 `json:"buildableStartMilliseconds"`
Pending bool `json:"pending"`
}
type Action struct {
Causes []Cause `json:"causes"`
Parameter []Parameter `json:"parameters"`
ParameterDefinitions []ParameterDefinition `json:"parameterDefinitions"`
}
type Cause struct {
ShortDescription string `json:"shortDescription"`
UserId string `json:"userId"`
UserName string `json:"userName"`
UpstreamCause
}
type ParameterDefinition struct {
Name string `json:"name"`
}
// Parameter for a build
type Parameter struct {
Name string `json:"name"`
Value interface{} `json:"value"`
}
type Task struct {
Name string `json:"name"`
Url string `json:"url"`
Color string `json:"color"`
}