 Chromium Code Reviews
 Chromium Code Reviews Issue 2944633003:
  [milo] Add BuildSummary and common models.  (Closed)
    
  
    Issue 2944633003:
  [milo] Add BuildSummary and common models.  (Closed) 
  | Index: milo/appengine/common/model/summary.go | 
| diff --git a/milo/appengine/common/model/summary.go b/milo/appengine/common/model/summary.go | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..a44fbc76f0fc5d58b95a3449d98d286238365a55 | 
| --- /dev/null | 
| +++ b/milo/appengine/common/model/summary.go | 
| @@ -0,0 +1,23 @@ | 
| +// Copyright 2017 The LUCI Authors. All rights reserved. | 
| +// Use of this source code is governed under the Apache License, Version 2.0 | 
| +// that can be found in the LICENSE file. | 
| + | 
| +package model | 
| + | 
| +import "time" | 
| + | 
| +// Summary summarizes a thing (step, build, group of builds, whatever). | 
| +type Summary struct { | 
| + // Status indicates the 'goodness' of the thing. This usually translates | 
| 
Ryan Tseng
2017/06/17 00:44:28
On top of "goodness" It also describes where in th
 
iannucci
2017/06/17 01:30:04
Done.
 | 
| + // directly to a status color. | 
| + Status Status | 
| + | 
| + // Start indicates when this thing started doing its action. | 
| + Start time.Time | 
| 
Ryan Tseng
2017/06/17 00:44:28
Make this a pointer, nil to indicate still pending
 
iannucci
2017/06/17 01:30:04
Won't work in datastore. 0 value of time.Time is p
 | 
| + | 
| + // End indicates when this thing completed doing its action. | 
| + End time.Time | 
| 
Ryan Tseng
2017/06/17 00:44:28
Make this a pointer, to indicate no end time / sti
 | 
| + | 
| + // Text is a possibly-multi-line summary of what happened. | 
| + Text []string | 
| +} |