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

Unified Diff: milo/buildsource/id.go

Issue 2977863002: [milo] Refactor all html knowledge out of backends. (Closed)
Patch Set: now with case insensitivity 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/buildsource/builder.go ('k') | milo/buildsource/rawpresentation/build.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/buildsource/id.go
diff --git a/milo/buildsource/id.go b/milo/buildsource/id.go
new file mode 100644
index 0000000000000000000000000000000000000000..3b79766c05a5265141e4e461fa31ebe892c2f2bb
--- /dev/null
+++ b/milo/buildsource/id.go
@@ -0,0 +1,26 @@
+// 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 buildsource
+
+import (
+ "golang.org/x/net/context"
+
+ "github.com/luci/luci-go/milo/api/resp"
+)
+
+// ID represents a universal 'build' ID. Each subpackage of buildsource
+// implements an ID (as the type BuildID, e.g. swarming.BuildID), which has
+// buildsource-specific fields, but always implements this ID interface.
+//
+// The frontend constructs an ID from the appropriate buildsource, then calls
+// its .Get() method to get the generic MiloBuild representation.
+type ID interface {
+ Get(c context.Context) (*resp.MiloBuild, error)
+
+ // GetLog is only implemented by swarming; this is for serving the deprecated
+ // swarming/task/<id>/steps/<logname>
+ // API. Once that's removed, this should be removed as well.
+ GetLog(c context.Context, logname string) (text string, closed bool, err error)
+}
« no previous file with comments | « milo/buildsource/builder.go ('k') | milo/buildsource/rawpresentation/build.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698