Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: milo/appengine/buildbot/structs.go

Issue 2944633003: [milo] Add BuildSummary and common models. (Closed)
Patch Set: add comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/appengine/buildbot/master.go ('k') | milo/appengine/buildbucket/buckets.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/buildbot/structs.go
diff --git a/milo/appengine/buildbot/structs.go b/milo/appengine/buildbot/structs.go
index e87058e013105dd6b36752051beb7c10253e403a..d3f7667a6a5f36c4094c9af1972950643eab0b2d 100644
--- a/milo/appengine/buildbot/structs.go
+++ b/milo/appengine/buildbot/structs.go
@@ -14,6 +14,7 @@ import (
"github.com/luci/gae/service/datastore"
"github.com/luci/luci-go/milo/api/resp"
+ "github.com/luci/luci-go/milo/appengine/common/model"
)
// This file contains all of the structs that define buildbot json endpoints.
@@ -65,10 +66,7 @@ type buildbotLinkAlias struct {
}
func (a *buildbotLinkAlias) toLink() *resp.Link {
- return &resp.Link{
- Label: a.Text,
- URL: a.URL,
- }
+ return resp.NewLink(a.Text, a.URL)
}
type buildbotProperty struct {
@@ -146,10 +144,10 @@ type buildbotBuild struct {
OSVersion string `json:"osVersion"`
}
-func (b *buildbotBuild) toStatus() resp.Status {
- var result resp.Status
+func (b *buildbotBuild) toStatus() model.Status {
+ var result model.Status
if b.Currentstep != nil {
- result = resp.Running
+ result = model.Running
} else {
result = result2Status(b.Results)
}
« no previous file with comments | « milo/appengine/buildbot/master.go ('k') | milo/appengine/buildbucket/buckets.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698