OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Package buildextract contains structs useful in deserializing json data from | 5 // Package buildextract contains structs useful in deserializing json data from |
6 // CBE, e.g. https://chrome-build-extract.appspot.com/get_master/chromium | 6 // CBE, e.g. https://chrome-build-extract.appspot.com/get_master/chromium |
7 | 7 |
8 package messages | 8 package messages |
9 | 9 |
10 // BuildExtract is AKA "master_data" from builder_alerts.py. | 10 // BuildExtract is AKA "master_data" from builder_alerts.py. |
11 type BuildExtract struct { | 11 type BuildExtract struct { |
12 » AcceptingBuilds AcceptingBuilds `json:"accepting_builds"` | 12 » AcceptingBuilds AcceptingBuilds `json:"accepting_builds"` |
13 » Builders map[string]Builders `json:"builders"` | 13 » Builders map[string]Builders `json:"builders"` |
14 » Buildstate Buildstate `json:"buildstate"` | 14 » Buildstate Buildstate `json:"buildstate"` |
15 » //» ChangeSources» map[float64]ChangeSources `json:"change_sources"
` | |
16 Changes map[string]Changes `json:"changes"` | 15 Changes map[string]Changes `json:"changes"` |
17 Clock Clock `json:"clock"` | 16 Clock Clock `json:"clock"` |
18 Created string `json:"created"` | 17 Created string `json:"created"` |
19 CreatedTimestamp EpochTime `json:"created_timestamp"` | 18 CreatedTimestamp EpochTime `json:"created_timestamp"` |
20 Metrics map[string]interface{} `json:"metrics"` | 19 Metrics map[string]interface{} `json:"metrics"` |
21 Project Project `json:"project"` | 20 Project Project `json:"project"` |
22 Slaves map[string]Slaves `json:"slaves"` | 21 Slaves map[string]Slaves `json:"slaves"` |
23 } | 22 } |
24 | 23 |
| 24 // Builder represents a buildbot builder's state. |
| 25 type Builder struct { |
| 26 Builds []Builds `json:"builds"` |
| 27 Cursor string `json:"cursor"` |
| 28 } |
| 29 |
| 30 // Builds represents a buildbot build. |
| 31 type Builds struct { |
| 32 Blame []string `json:"blame"` |
| 33 BuilderName string `json:"builderName"` |
| 34 CreatedTimestamp EpochTime `json:"created_timestamp"` |
| 35 CurrentStep `json:"currentStep"` |
| 36 Eta EpochTime `json:"eta"` |
| 37 Logs [][]string `json:"logs"` |
| 38 Number int64 `json:"number"` |
| 39 Properties [][]interface{} `json:"properties"` |
| 40 Reason string `json:"reason"` |
| 41 Results int64 `json:"results"` |
| 42 Slave string `json:"slave"` |
| 43 SourceStamp SourceStamp `json:"sourceStamp"` |
| 44 Steps []Steps `json:"steps"` |
| 45 Text []string `json:"text"` |
| 46 Times []EpochTime `json:"times"` |
| 47 } |
| 48 |
25 // Slaves is an automatically generated type. | 49 // Slaves is an automatically generated type. |
26 type Slaves struct { | 50 type Slaves struct { |
27 // AccessUri map[string]interface{} `json:"access_uri"` | 51 // AccessUri map[string]interface{} `json:"access_uri"` |
28 // Admin map[string]interface{} `json:"admin"` | 52 // Admin map[string]interface{} `json:"admin"` |
29 Builders map[string][]float64 `json:"builders"` | 53 Builders map[string][]float64 `json:"builders"` |
30 Connected bool `json:"connected"` | 54 Connected bool `json:"connected"` |
31 Host string `json:"host"` | 55 Host string `json:"host"` |
32 Name string `json:"name"` | 56 Name string `json:"name"` |
33 » RunningBuilds []RunningBuilds `json:"runningBuilds"` | 57 » RunningBuilds []Builds `json:"runningBuilds"` |
34 Version string `json:"version"` | 58 Version string `json:"version"` |
35 } | 59 } |
36 | 60 |
37 // Builders is an automatically generated type. | 61 // Builders is an automatically generated type. |
38 type Builders struct { | 62 type Builders struct { |
39 » Basedir string `json:"basedir"` | 63 » Basedir string `json:"basedir"` |
40 » BuildState URLs `json:"buildState"` | 64 » BuildState URLs `json:"buildState"` |
41 » BuilderName string `json:"builderName"` | 65 » BuilderName string `json:"builderName"` |
42 » CachedBuilds []float64 `json:"cachedBuilds"` | 66 » CachedBuilds []int64 `json:"cachedBuilds"` |
43 » Category string `json:"category"` | 67 » Category string `json:"category"` |
44 » CurrentBuilds []float64 `json:"currentBuilds"` | 68 » CurrentBuilds []int64 `json:"currentBuilds"` |
45 » PendingBuilds float64 `json:"pendingBuilds"` | 69 » PendingBuilds float64 `json:"pendingBuilds"` |
46 » Slaves []string `json:"slaves"` | 70 » Slaves []string `json:"slaves"` |
47 » State string `json:"state"` | 71 » State string `json:"state"` |
48 } | 72 } |
49 | 73 |
50 // Project is an automatically generated type. | 74 // Project is an automatically generated type. |
51 type Project struct { | 75 type Project struct { |
52 BuildbotURL string `json:"buildbotURL"` | 76 BuildbotURL string `json:"buildbotURL"` |
53 Title string `json:"title"` | 77 Title string `json:"title"` |
54 TitleURL string `json:"titleURL"` | 78 TitleURL string `json:"titleURL"` |
55 } | 79 } |
56 | 80 |
57 // CurrentStep is an automatically generated type. | 81 // CurrentStep is an automatically generated type. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 type Clock struct { | 141 type Clock struct { |
118 Current Current `json:"current"` | 142 Current Current `json:"current"` |
119 ServerStarted Current `json:"server_started"` | 143 ServerStarted Current `json:"server_started"` |
120 ServerUptime EpochTime `json:"server_uptime"` | 144 ServerUptime EpochTime `json:"server_uptime"` |
121 } | 145 } |
122 | 146 |
123 // URLs is an automatically generated type. | 147 // URLs is an automatically generated type. |
124 type URLs struct { | 148 type URLs struct { |
125 } | 149 } |
126 | 150 |
127 // RunningBuilds is an automatically generated type. | |
128 type RunningBuilds struct { | |
129 Blame []string `json:"blame"` | |
130 BuilderName string `json:"builderName"` | |
131 CurrentStep CurrentStep `json:"currentStep"` | |
132 Eta EpochTime `json:"eta"` | |
133 Logs [][]interface{} `json:"logs"` | |
134 Number float64 `json:"number"` | |
135 Properties [][]interface{} `json:"properties"` | |
136 Reason string `json:"reason"` | |
137 Results []interface{} `json:"results"` | |
138 Slave string `json:"slave"` | |
139 SourceStamp SourceStamp `json:"sourceStamp"` | |
140 Steps []CurrentStep `json:"steps"` | |
141 Text []string `json:"text"` | |
142 Times []float64 `json:"times"` | |
143 } | |
144 | |
145 // Steps is an automatically generated type. | 151 // Steps is an automatically generated type. |
146 type Steps struct { | 152 type Steps struct { |
147 Eta EpochTime `json:"eta"` | 153 Eta EpochTime `json:"eta"` |
148 Expectations [][]interface{} `json:"expectations"` | 154 Expectations [][]interface{} `json:"expectations"` |
149 Hidden bool `json:"hidden"` | 155 Hidden bool `json:"hidden"` |
150 IsFinished bool `json:"isFinished"` | 156 IsFinished bool `json:"isFinished"` |
151 IsStarted bool `json:"isStarted"` | 157 IsStarted bool `json:"isStarted"` |
152 Logs [][]interface{} `json:"logs"` | 158 Logs [][]interface{} `json:"logs"` |
153 Name string `json:"name"` | 159 Name string `json:"name"` |
154 » Results []float64 `json:"results"` | 160 » // Results is a homogenous array. Use runtime introspection to |
155 » Statistics URLs `json:"statistics"` | 161 » // determine element types. |
156 » StepNumber float64 `json:"step_number"` | 162 » Results []interface{} `json:"results"` |
157 » Text []string `json:"text"` | 163 » Statistics URLs `json:"statistics"` |
158 » Times []float64 `json:"times"` | 164 » StepNumber float64 `json:"step_number"` |
159 » URLs URLs `json:"urls"` | 165 » Text []string `json:"text"` |
| 166 » Times []float64 `json:"times"` |
| 167 » URLs URLs `json:"urls"` |
160 } | 168 } |
161 | 169 |
162 // Files is an automatically generated type. | 170 // Files is an automatically generated type. |
163 type Files struct { | 171 type Files struct { |
164 Name string `json:"name"` | 172 Name string `json:"name"` |
165 URL map[string]interface{} `json:"url"` | 173 URL map[string]interface{} `json:"url"` |
166 } | 174 } |
167 | 175 |
168 // SourceStamp is an automatically generated type. | 176 // SourceStamp is an automatically generated type. |
169 type SourceStamp struct { | 177 type SourceStamp struct { |
170 Branch string `json:"branch"` | 178 Branch string `json:"branch"` |
171 Changes []Changes `json:"changes"` | 179 Changes []Changes `json:"changes"` |
172 HasPatch bool `json:"hasPatch"` | 180 HasPatch bool `json:"hasPatch"` |
173 Project string `json:"project"` | 181 Project string `json:"project"` |
174 Repository string `json:"repository"` | 182 Repository string `json:"repository"` |
175 Revision string `json:"revision"` | 183 Revision string `json:"revision"` |
176 } | 184 } |
OLD | NEW |