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

Unified Diff: filters/count/gi.go

Issue 1247283003: Improve docs (Closed) Base URL: https://github.com/luci/gae.git@reduce_size
Patch Set: fix comments 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 | « filters/count/count_test.go ('k') | filters/count/mc.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filters/count/gi.go
diff --git a/filters/count/gi.go b/filters/count/gi.go
deleted file mode 100644
index da651eeb145f1a5a768de7073e221c6d4669f9e5..0000000000000000000000000000000000000000
--- a/filters/count/gi.go
+++ /dev/null
@@ -1,137 +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 count
-
-import (
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/luci/gae/service/info"
-)
-
-// InfoCounter is the counter object for the GlobalInfo service.
-type InfoCounter struct {
- AppID Entry
- Datacenter Entry
- DefaultVersionHostname Entry
- InstanceID Entry
- IsDevAppServer Entry
- IsOverQuota Entry
- IsTimeoutError Entry
- ModuleHostname Entry
- ModuleName Entry
- RequestID Entry
- ServerSoftware Entry
- ServiceAccount Entry
- VersionID Entry
- Namespace Entry
- AccessToken Entry
- PublicCertificates Entry
- SignBytes Entry
-}
-
-type infoCounter struct {
- c *InfoCounter
-
- gi info.Interface
-}
-
-var _ info.Interface = (*infoCounter)(nil)
-
-func (g *infoCounter) AppID() string {
- g.c.AppID.up()
- return g.gi.AppID()
-}
-
-func (g *infoCounter) Datacenter() string {
- g.c.Datacenter.up()
- return g.gi.Datacenter()
-}
-
-func (g *infoCounter) DefaultVersionHostname() string {
- g.c.DefaultVersionHostname.up()
- return g.gi.DefaultVersionHostname()
-}
-
-func (g *infoCounter) InstanceID() string {
- g.c.InstanceID.up()
- return g.gi.InstanceID()
-}
-
-func (g *infoCounter) IsDevAppServer() bool {
- g.c.IsDevAppServer.up()
- return g.gi.IsDevAppServer()
-}
-
-func (g *infoCounter) IsOverQuota(err error) bool {
- g.c.IsOverQuota.up()
- return g.gi.IsOverQuota(err)
-}
-
-func (g *infoCounter) IsTimeoutError(err error) bool {
- g.c.IsTimeoutError.up()
- return g.gi.IsTimeoutError(err)
-}
-
-func (g *infoCounter) ModuleHostname(module, version, instance string) (string, error) {
- ret, err := g.gi.ModuleHostname(module, version, instance)
- return ret, g.c.ModuleHostname.up(err)
-}
-
-func (g *infoCounter) ModuleName() string {
- g.c.ModuleName.up()
- return g.gi.ModuleName()
-}
-
-func (g *infoCounter) RequestID() string {
- g.c.RequestID.up()
- return g.gi.RequestID()
-}
-
-func (g *infoCounter) ServerSoftware() string {
- g.c.ServerSoftware.up()
- return g.gi.ServerSoftware()
-}
-
-func (g *infoCounter) ServiceAccount() (string, error) {
- ret, err := g.gi.ServiceAccount()
- return ret, g.c.ServiceAccount.up(err)
-}
-
-func (g *infoCounter) VersionID() string {
- g.c.VersionID.up()
- return g.gi.VersionID()
-}
-
-func (g *infoCounter) Namespace(namespace string) (context.Context, error) {
- ret, err := g.gi.Namespace(namespace)
- return ret, g.c.Namespace.up(err)
-}
-
-func (g *infoCounter) AccessToken(scopes ...string) (token string, expiry time.Time, err error) {
- token, expiry, err = g.gi.AccessToken(scopes...)
- g.c.AccessToken.up(err)
- return
-}
-
-func (g *infoCounter) PublicCertificates() ([]info.Certificate, error) {
- ret, err := g.gi.PublicCertificates()
- return ret, g.c.PublicCertificates.up(err)
-}
-
-func (g *infoCounter) SignBytes(bytes []byte) (keyName string, signature []byte, err error) {
- keyName, signature, err = g.gi.SignBytes(bytes)
- g.c.SignBytes.up(err)
- return
-}
-
-// FilterGI installs a counter GlobalInfo filter in the context.
-func FilterGI(c context.Context) (context.Context, *InfoCounter) {
- state := &InfoCounter{}
- return info.AddFilters(c, func(ic context.Context, gi info.Interface) info.Interface {
- return &infoCounter{state, gi}
- }), state
-}
« no previous file with comments | « filters/count/count_test.go ('k') | filters/count/mc.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698