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

Unified Diff: go/src/infra/gae/libs/gae/prod/globalinfo.go

Issue 1230303003: Revert "Refactor current GAE abstraction library to be free of the SDK*" (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: 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 | « go/src/infra/gae/libs/gae/prod/doc.go ('k') | go/src/infra/gae/libs/gae/prod/memcache.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/gae/libs/gae/prod/globalinfo.go
diff --git a/go/src/infra/gae/libs/gae/prod/globalinfo.go b/go/src/infra/gae/libs/gae/prod/globalinfo.go
deleted file mode 100644
index a315e1a9daa0bf810221f2d0f78c7f80dd025172..0000000000000000000000000000000000000000
--- a/go/src/infra/gae/libs/gae/prod/globalinfo.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// 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 prod
-
-import (
- "time"
-
- "golang.org/x/net/context"
-
- "infra/gae/libs/gae"
-
- "google.golang.org/appengine"
-)
-
-// useGI adds a gae.GlobalInfo implementation to context, accessible
-// by gae.GetGI(c)
-func useGI(c context.Context) context.Context {
- return gae.SetGIFactory(c, func(ci context.Context) gae.GlobalInfo {
- return giImpl{ci}
- })
-}
-
-type giImpl struct{ context.Context }
-
-func (g giImpl) AccessToken(scopes ...string) (token string, expiry time.Time, err error) {
- return appengine.AccessToken(g, scopes...)
-}
-func (g giImpl) AppID() string {
- return appengine.AppID(g)
-}
-func (g giImpl) Datacenter() string {
- return appengine.Datacenter(g)
-}
-func (g giImpl) DefaultVersionHostname() string {
- return appengine.DefaultVersionHostname(g)
-}
-func (g giImpl) InstanceID() string {
- return appengine.InstanceID()
-}
-func (g giImpl) IsDevAppServer() bool {
- return appengine.IsDevAppServer()
-}
-func (g giImpl) IsOverQuota(err error) bool {
- return appengine.IsOverQuota(err)
-}
-func (g giImpl) IsTimeoutError(err error) bool {
- return appengine.IsTimeoutError(err)
-}
-func (g giImpl) ModuleHostname(module, version, instance string) (string, error) {
- return appengine.ModuleHostname(g, module, version, instance)
-}
-func (g giImpl) ModuleName() (name string) {
- return appengine.ModuleName(g)
-}
-func (g giImpl) Namespace(namespace string) (context.Context, error) {
- return appengine.Namespace(g, namespace)
-}
-func (g giImpl) PublicCertificates() ([]gae.GICertificate, error) {
- certs, err := appengine.PublicCertificates(g)
- if err != nil {
- return nil, err
- }
- ret := make([]gae.GICertificate, len(certs))
- for i, c := range certs {
- ret[i] = (gae.GICertificate)(c)
- }
- return ret, nil
-}
-func (g giImpl) RequestID() string {
- return appengine.RequestID(g)
-}
-func (g giImpl) ServerSoftware() string {
- return appengine.ServerSoftware()
-}
-func (g giImpl) ServiceAccount() (string, error) {
- return appengine.ServiceAccount(g)
-}
-func (g giImpl) SignBytes(bytes []byte) (keyName string, signature []byte, err error) {
- return appengine.SignBytes(g, bytes)
-}
-func (g giImpl) VersionID() string {
- return appengine.VersionID(g)
-}
« no previous file with comments | « go/src/infra/gae/libs/gae/prod/doc.go ('k') | go/src/infra/gae/libs/gae/prod/memcache.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698