-
Notifications
You must be signed in to change notification settings - Fork 485
/
response.go
118 lines (106 loc) · 3.65 KB
/
response.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package models
type Job struct {
FullName string `gorm:"primaryKey;type:varchar(255)"`
Path string `gorm:"primaryKey;type:varchar(511)"`
Name string `json:"name"`
Color string `json:"color"`
Class string `json:"_class"`
Base string `json:"base"`
URL string `json:"url"`
Description string `json:"description"`
UpstreamProjects []Project `json:"upstreamProjects"`
Jobs *[]Job `json:"jobs" gorm:"-"`
*PrimaryView `json:"primaryView"`
}
type Project struct {
Class string `json:"_class"`
Name string `json:"name"`
}
type Views struct {
URL string `json:"url"`
Name string `json:"name"`
Class string `json:"_class"`
}
type OverallLoad struct {
}
type PrimaryView struct {
URL string `json:"url"`
Name string `json:"name"`
Class string `json:"_class"`
}
type UnlabeledLoad struct {
Class string `json:"_class"`
}
type AssignedLabels struct {
Name string `json:"name"`
}
type ApiBuildResponse struct {
Class string `json:"_class"`
Number int64 `json:"number"`
Result string `json:"result"`
Building bool `json:"building"`
Actions []Action `json:"actions"`
Duration float64 `json:"duration"`
Timestamp int64 `json:"timestamp"`
DisplayName string `json:"fullDisplayName"`
EstimatedDuration float64 `json:"estimatedDuration"`
ChangeSet ChangeSet `json:"changeSet"`
}
type LastBuiltRevision struct {
SHA1 string `json:"SHA1"`
Branches []Branch `json:"branch"`
}
type Action struct {
Class string `json:"_class,omitempty"`
LastBuiltRevision LastBuiltRevision `json:"lastBuiltRevision,omitempty"`
MercurialRevisionNumber string `json:"mercurialRevisionNumber"`
RemoteUrls []string `json:"remoteUrls"`
Causes []Cause `json:"causes"`
}
type ChangeSet struct {
Class string `json:"_class"`
Kind string `json:"kind"`
Revisions []Revision `json:"revision"`
}
type Branch struct {
Name string `json:"name"`
}
type Revision struct {
Module string
Revision int
}
type Stage struct {
Links struct {
Self struct {
Href string `json:"href"`
} `json:"self"`
} `json:"_links"`
ID string `json:"id"`
Name string `json:"name"`
ExecNode string `json:"execNode"`
Status string `json:"status"`
StartTimeMillis int64 `json:"startTimeMillis"`
DurationMillis int `json:"durationMillis"`
PauseDurationMillis int `json:"pauseDurationMillis"`
}
type Cause struct {
Class string `json:"_class"`
ShortDescription string `json:"shortDescription"`
UpstreamBuild int `json:"upstreamBuild"`
UpstreamProject string `json:"upstreamProject"`
UpstreamURL string `json:"upstreamUrl"`
}