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

Unified Diff: service/info/interface.go

Issue 1243323002: Refactor a bit. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fix golint Created 5 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 | « service/info/context.go ('k') | service/info/types.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/info/interface.go
diff --git a/service/info/interface.go b/service/info/interface.go
new file mode 100644
index 0000000000000000000000000000000000000000..dcbb345a7a6c632341ee207178ea1bdc812739d8
--- /dev/null
+++ b/service/info/interface.go
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package info
+
+import (
+ "time"
+
+ "golang.org/x/net/context"
+)
+
+// Interface is the interface for all of the package methods which normally
+// would be in the 'appengine' package.
+type Interface interface {
+ AppID() string
+ Datacenter() string
+ DefaultVersionHostname() string
+ InstanceID() string
+ IsDevAppServer() bool
+ IsOverQuota(err error) bool
+ IsTimeoutError(err error) bool
+ ModuleHostname(module, version, instance string) (string, error)
+ ModuleName() string
+ RequestID() string
+ ServerSoftware() string
+ ServiceAccount() (string, error)
+ VersionID() string
+
+ Namespace(namespace string) (context.Context, error)
+
+ AccessToken(scopes ...string) (token string, expiry time.Time, err error)
+ PublicCertificates() ([]Certificate, error)
+ SignBytes(bytes []byte) (keyName string, signature []byte, err error)
+}
« no previous file with comments | « service/info/context.go ('k') | service/info/types.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698