| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package buildbot | 5 package buildbot |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "compress/gzip" | 9 "compress/gzip" |
| 10 "encoding/json" | 10 "encoding/json" |
| 11 "fmt" | 11 "fmt" |
| 12 "io/ioutil" | 12 "io/ioutil" |
| 13 "strconv" | 13 "strconv" |
| 14 | 14 |
| 15 "github.com/luci/gae/service/datastore" | 15 "github.com/luci/gae/service/datastore" |
| 16 "github.com/luci/luci-go/milo/api/resp" | 16 "github.com/luci/luci-go/milo/api/resp" |
| 17 » "github.com/luci/luci-go/milo/appengine/common/model" | 17 » "github.com/luci/luci-go/milo/common/model" |
| 18 ) | 18 ) |
| 19 | 19 |
| 20 // This file contains all of the structs that define buildbot json endpoints. | 20 // This file contains all of the structs that define buildbot json endpoints. |
| 21 // This is primarily used for unmarshalling buildbot master and build json. | 21 // This is primarily used for unmarshalling buildbot master and build json. |
| 22 // json.UnmarshalJSON can directly unmarshal buildbot jsons into these structs. | 22 // json.UnmarshalJSON can directly unmarshal buildbot jsons into these structs. |
| 23 // Many of the structs were initially built using https://mholt.github.io/json-t
o-go/ | 23 // Many of the structs were initially built using https://mholt.github.io/json-t
o-go/ |
| 24 | 24 |
| 25 // buildbotStep represents a single step in a buildbot build. | 25 // buildbotStep represents a single step in a buildbot build. |
| 26 type buildbotStep struct { | 26 type buildbotStep struct { |
| 27 // We actually don't care about ETA. This is represented as a string if | 27 // We actually don't care about ETA. This is represented as a string if |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 PendingBuilds int `json:"pending_builds"` | 430 PendingBuilds int `json:"pending_builds"` |
| 431 State string `json:"state"` | 431 State string `json:"state"` |
| 432 TotalSlaves int `json:"total_slaves"` | 432 TotalSlaves int `json:"total_slaves"` |
| 433 } `json:"builders"` | 433 } `json:"builders"` |
| 434 ServerUptime float64 `json:"server_uptime"` | 434 ServerUptime float64 `json:"server_uptime"` |
| 435 } `json:"varz"` | 435 } `json:"varz"` |
| 436 | 436 |
| 437 // This is injected by the pubsub publisher on the buildbot side. | 437 // This is injected by the pubsub publisher on the buildbot side. |
| 438 Name string `json:"name"` | 438 Name string `json:"name"` |
| 439 } | 439 } |
| OLD | NEW |