Documentation ¶
Overview ¶
Package internal provides support for package appengine.
Programs should not use this package directly. Its API is not stable. Use packages appengine and appengine/* instead.
Index ¶
- Variables
- func AppID(c netcontext.Context) string
- func BackgroundContext() netcontext.Context
- func Call(ctx netcontext.Context, service, method string, in, out proto.Message) error
- func ContextForTesting(req *http.Request) netcontext.Context
- func Datacenter(ctx netcontext.Context) string
- func DefaultVersionHostname(ctx netcontext.Context) string
- func FullyQualifiedAppID(ctx netcontext.Context) string
- func IncomingHeaders(ctx netcontext.Context) http.Header
- func InstanceID() string
- func IsDevAppServer() bool
- func Logf(ctx netcontext.Context, level int64, format string, args ...interface{})
- func Main()
- func ModuleName(_ netcontext.Context) string
- func NamespaceFromContext(ctx netcontext.Context) string
- func RegisterErrorCodeMap(service string, m map[int32]string)
- func RegisterTimeoutErrorCode(service string, code int32)
- func RegisterTransactionSetter(f interface{})
- func RequestID(ctx netcontext.Context) string
- func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error, xg bool) error
- func ServerSoftware() string
- func VersionID(_ netcontext.Context) string
- func WithAppIDOverride(ctx netcontext.Context, appID string) netcontext.Context
- func WithCallOverride(ctx netcontext.Context, f callOverrideFunc) netcontext.Context
- func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context
- func WithLogOverride(ctx netcontext.Context, f logOverrideFunc) netcontext.Context
- func WithNamespace(ctx netcontext.Context, ns string) netcontext.Context
- type APIError
- type CallError
Constants ¶
This section is empty.
Variables ¶
var ErrConcurrentTransaction = errors.New("internal: concurrent transaction")
NamespaceMods is a map from API service to a function that will mutate an RPC request to attach a namespace. The function should be prepared to be called on the same message more than once; it should only modify the RPC request the first time.
Functions ¶
func AppID ¶
func AppID(c netcontext.Context) string
func BackgroundContext ¶
func BackgroundContext() netcontext.Context
func ContextForTesting ¶
func ContextForTesting(req *http.Request) netcontext.Context
func Datacenter ¶
func Datacenter(ctx netcontext.Context) string
func DefaultVersionHostname ¶
func DefaultVersionHostname(ctx netcontext.Context) string
func FullyQualifiedAppID ¶
func FullyQualifiedAppID(ctx netcontext.Context) string
FullyQualifiedAppID returns the fully-qualified application ID. This may contain a partition prefix (e.g. "s~" for High Replication apps), or a domain prefix (e.g. "example.com:").
func IncomingHeaders ¶
func IncomingHeaders(ctx netcontext.Context) http.Header
func InstanceID ¶
func InstanceID() string
func IsDevAppServer ¶
func IsDevAppServer() bool
func Main ¶
func Main()
Main is designed so that the complete generated main package is:
package main import ( "google.golang.org/appengine/internal" _ "myapp/package0" _ "myapp/package1" ) func main() { internal.Main() }
The "myapp/packageX" packages are expected to register HTTP handlers in their init functions.
func ModuleName ¶
func ModuleName(_ netcontext.Context) string
func NamespaceFromContext ¶
func NamespaceFromContext(ctx netcontext.Context) string
func RegisterErrorCodeMap ¶
RegisterErrorCodeMap is called from API implementations to register their error code map. This should only be called from init functions.
func RegisterTransactionSetter ¶
func RegisterTransactionSetter(f interface{})
RegisterTransactionSetter registers a function that sets transaction information in a protocol buffer message. f should be a function with two arguments, the first being a protocol buffer type, and the second being *datastore.Transaction.
func RequestID ¶
func RequestID(ctx netcontext.Context) string
func RunTransactionOnce ¶
func RunTransactionOnce(c netcontext.Context, f func(netcontext.Context) error, xg bool) error
func ServerSoftware ¶
func ServerSoftware() string
func VersionID ¶
func VersionID(_ netcontext.Context) string
func WithAppIDOverride ¶
func WithAppIDOverride(ctx netcontext.Context, appID string) netcontext.Context
func WithCallOverride ¶
func WithCallOverride(ctx netcontext.Context, f callOverrideFunc) netcontext.Context
func WithContext ¶
func WithContext(parent netcontext.Context, req *http.Request) netcontext.Context
func WithLogOverride ¶
func WithLogOverride(ctx netcontext.Context, f logOverrideFunc) netcontext.Context
func WithNamespace ¶
func WithNamespace(ctx netcontext.Context, ns string) netcontext.Context
Types ¶
type APIError ¶
APIError is the type returned by appengine.Context's Call method when an API call fails in an API-specific way. This may be, for instance, a taskqueue API call failing with TaskQueueServiceError::UNKNOWN_QUEUE.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package aetesting provides utilities for testing App Engine packages.
|
Package aetesting provides utilities for testing App Engine packages. |
Package app_identity is a generated protocol buffer package.
|
Package app_identity is a generated protocol buffer package. |
Package base is a generated protocol buffer package.
|
Package base is a generated protocol buffer package. |
Package channel is a generated protocol buffer package.
|
Package channel is a generated protocol buffer package. |
Package datastore is a generated protocol buffer package.
|
Package datastore is a generated protocol buffer package. |
Package image is a generated protocol buffer package.
|
Package image is a generated protocol buffer package. |
Package log is a generated protocol buffer package.
|
Package log is a generated protocol buffer package. |
Package mail is a generated protocol buffer package.
|
Package mail is a generated protocol buffer package. |
Package memcache is a generated protocol buffer package.
|
Package memcache is a generated protocol buffer package. |
Package modules is a generated protocol buffer package.
|
Package modules is a generated protocol buffer package. |
Package remote_api is a generated protocol buffer package.
|
Package remote_api is a generated protocol buffer package. |
Package search is a generated protocol buffer package.
|
Package search is a generated protocol buffer package. |
Package taskqueue is a generated protocol buffer package.
|
Package taskqueue is a generated protocol buffer package. |
Package urlfetch is a generated protocol buffer package.
|
Package urlfetch is a generated protocol buffer package. |
Package user is a generated protocol buffer package.
|
Package user is a generated protocol buffer package. |
Package xmpp is a generated protocol buffer package.
|
Package xmpp is a generated protocol buffer package. |