aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/google.golang.org/appengine/internal/identity_classic.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/appengine/internal/identity_classic.go')
-rw-r--r--vendor/google.golang.org/appengine/internal/identity_classic.go61
1 files changed, 61 insertions, 0 deletions
diff --git a/vendor/google.golang.org/appengine/internal/identity_classic.go b/vendor/google.golang.org/appengine/internal/identity_classic.go
new file mode 100644
index 0000000..4e979f4
--- /dev/null
+++ b/vendor/google.golang.org/appengine/internal/identity_classic.go
@@ -0,0 +1,61 @@
1// Copyright 2015 Google Inc. All rights reserved.
2// Use of this source code is governed by the Apache 2.0
3// license that can be found in the LICENSE file.
4
5// +build appengine
6
7package internal
8
9import (
10 "appengine"
11
12 netcontext "golang.org/x/net/context"
13)
14
15func init() {
16 appengineStandard = true
17}
18
19func DefaultVersionHostname(ctx netcontext.Context) string {
20 c := fromContext(ctx)
21 if c == nil {
22 panic(errNotAppEngineContext)
23 }
24 return appengine.DefaultVersionHostname(c)
25}
26
27func Datacenter(_ netcontext.Context) string { return appengine.Datacenter() }
28func ServerSoftware() string { return appengine.ServerSoftware() }
29func InstanceID() string { return appengine.InstanceID() }
30func IsDevAppServer() bool { return appengine.IsDevAppServer() }
31
32func RequestID(ctx netcontext.Context) string {
33 c := fromContext(ctx)
34 if c == nil {
35 panic(errNotAppEngineContext)
36 }
37 return appengine.RequestID(c)
38}
39
40func ModuleName(ctx netcontext.Context) string {
41 c := fromContext(ctx)
42 if c == nil {
43 panic(errNotAppEngineContext)
44 }
45 return appengine.ModuleName(c)
46}
47func VersionID(ctx netcontext.Context) string {
48 c := fromContext(ctx)
49 if c == nil {
50 panic(errNotAppEngineContext)
51 }
52 return appengine.VersionID(c)
53}
54
55func fullyQualifiedAppID(ctx netcontext.Context) string {
56 c := fromContext(ctx)
57 if c == nil {
58 panic(errNotAppEngineContext)
59 }
60 return c.FullyQualifiedAppID()
61}