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

Side by Side Diff: milo/api/resp/console.go

Issue 2946443003: Milo: (Breaking proto change) Update console definition (Closed)
Patch Set: ImportFix Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « milo/api/config/project.pb.go ('k') | milo/buildsource/buildbot/console_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 resp 5 package resp
6 6
7 import "github.com/luci/luci-go/milo/common/model" 7 import "github.com/luci/luci-go/milo/common/model"
8 8
9 // This file contains the structures for defining a Console view. 9 // This file contains the structures for defining a Console view.
10 // Console: The main entry point and the overall struct for a console page. 10 // Console: The main entry point and the overall struct for a console page.
11 // BuilderRef: Used both as an input to request a builder and headers for the co nsole. 11 // BuilderRef: Used both as an input to request a builder and headers for the co nsole.
12 // CommitBuild: A row in the console. References a commit with a list of build summaries. 12 // CommitBuild: A row in the console. References a commit with a list of build summaries.
13 // ConsoleBuild: A cell in the console. Contains all information required to ren der the cell. 13 // ConsoleBuild: A cell in the console. Contains all information required to ren der the cell.
14 14
15 // Console represents a console view. Commit contains the full matrix of 15 // Console represents a console view. Commit contains the full matrix of
16 // Commits x Builder, and BuilderRef contains information on how to render 16 // Commits x Builder, and BuilderRef contains information on how to render
17 // the header. The two structs are expected to be consistent. IE len(Console.[ ]BuilderRef) 17 // the header. The two structs are expected to be consistent. IE len(Console.[ ]BuilderRef)
18 // Should equal len(commit.Build) for all commit in Console.Commit. 18 // Should equal len(commit.Build) for all commit in Console.Commit.
19 type Console struct { 19 type Console struct {
20 Name string 20 Name string
21 21
22 Commit []CommitBuild 22 Commit []CommitBuild
23 23
24 BuilderRef []BuilderRef 24 BuilderRef []BuilderRef
25 } 25 }
26 26
27 // BuilderRef is an unambiguous reference to a builder, along with metadata on h ow 27 // BuilderRef is an unambiguous reference to a builder, along with metadata on h ow
28 // to lay it out for rendering. 28 // to lay it out for rendering.
29 type BuilderRef struct { 29 type BuilderRef struct {
30 » // Module is the name of the module this builder belongs to. This could be "buildbot", 30 » // Name is the canonical reference to a specific builder.
31 » // "buildbucket", or "dm".
32 » Module string
33 » // Name is the canonical reference to a specific builder in a specific m odule.
34 Name string 31 Name string
35 // Category is a pipe "|" deliminated list of short strings used to cata gorize 32 // Category is a pipe "|" deliminated list of short strings used to cata gorize
36 // and organize builders. Adjacent builders with common categories will be 33 // and organize builders. Adjacent builders with common categories will be
37 // merged on the header. 34 // merged on the header.
38 Category []string 35 Category []string
39 // ShortName is a string of length 1-3 used to label the builder. 36 // ShortName is a string of length 1-3 used to label the builder.
40 ShortName string 37 ShortName string
41 } 38 }
42 39
43 // CommitBuild is a row in the console. References a commit with a list of buil d summaries. 40 // CommitBuild is a row in the console. References a commit with a list of buil d summaries.
44 type CommitBuild struct { 41 type CommitBuild struct {
45 Commit 42 Commit
46 Build []*ConsoleBuild 43 Build []*ConsoleBuild
47 } 44 }
48 45
49 // ConsoleBuild is a cell in the console. Contains all information required to r ender the cell. 46 // ConsoleBuild is a cell in the console. Contains all information required to r ender the cell.
50 type ConsoleBuild struct { 47 type ConsoleBuild struct {
51 // Link to the build. Alt-text goes on the Label of the link 48 // Link to the build. Alt-text goes on the Label of the link
52 Link *Link 49 Link *Link
53 50
54 // Status of the build. 51 // Status of the build.
55 Status model.Status 52 Status model.Status
56 } 53 }
OLDNEW
« no previous file with comments | « milo/api/config/project.pb.go ('k') | milo/buildsource/buildbot/console_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698