Documentation ¶
Overview ¶
Package appengine_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(fqai string) string
- func ApplyTransaction(pb ProtoMessage, t *pb.Transaction)
- func BackendHostname(c apiContext, name string, index int) string
- func BackendInstance() int
- func Datacenter() string
- func DefaultVersionHostname(req interface{}) string
- func InstanceID() string
- func IsDevAppServer() bool
- func Main()
- func ModuleName(req interface{}) string
- func NewContext(req *http.Request) context
- func RegisterAPIOverride(service, method string, f func(in, out ProtoMessage, opts *CallOptions) error)
- func RegisterErrorCodeMap(service string, m map[int32]string)
- func RegisterTestContext(req *http.Request, c context) func()
- func RegisterTimeoutErrorCode(service string, code int32)
- func RegisterTransactionSetter(f interface{})
- func RequestID(req interface{}) string
- func ServerSoftware() string
- func VersionID(req interface{}) string
- type APIError
- type CallError
- type CallOptions
- type ProtoMessage
Constants ¶
This section is empty.
Variables ¶
var NamespaceMods = make(map[string]func(m ProtoMessage, namespace string))
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 ApplyTransaction ¶
func ApplyTransaction(pb ProtoMessage, t *pb.Transaction)
ApplyTransaction applies the transaction t to message pb by using the relevant setter passed to RegisterTransactionSetter.
func BackendHostname ¶
func BackendInstance ¶
func BackendInstance() int
func Datacenter ¶
func Datacenter() string
func DefaultVersionHostname ¶
func DefaultVersionHostname(req interface{}) string
func InstanceID ¶
func InstanceID() string
func IsDevAppServer ¶
func IsDevAppServer() bool
IsDevAppServer returns whether the App Engine app is running in the development App Server.
func Main ¶
func Main()
Main is designed so that the complete generated main.main package is:
package main import ( "path/to/appengine_internal" _ "myapp/package0" _ "myapp/package1" ) func main() { appengine_internal.Main() }
The "myapp/packageX" packages are expected to register HTTP handlers in their init functions.
func ModuleName ¶
func ModuleName(req interface{}) string
func NewContext ¶
func RegisterAPIOverride ¶
func RegisterAPIOverride(service, method string, f func(in, out ProtoMessage, opts *CallOptions) error)
func RegisterErrorCodeMap ¶
RegisterErrorCodeMap is called from API implementations to register their error code map. This should only be called from init functions.
func RegisterTestContext ¶
RegisterTestContext associates a test context with the given HTTP request, returning a closure to delete the association. It should only be used by the aetest package, and never directly. It is only available in the SDK.
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 ServerSoftware ¶
func ServerSoftware() string
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.
type CallError ¶
type CallError struct { Detail string Code int32 // TODO: Remove this if we get a distinguishable error code. Timeout bool }
CallError is the type returned by appengine.Context's Call method when an API call fails in a generic way, such as APIResponse::CAPABILITY_DISABLED.
type CallOptions ¶
type ProtoMessage ¶
type ProtoMessage interface { Reset() String() string ProtoMessage() }
ProtoMessage is the same as proto.Message. It is defined here because user code cannot import package proto.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine_base is a generated protocol buffer package.
|
Package appengine_base is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package datastore is a generated protocol buffer package.
|
Package datastore is a generated protocol buffer package. |
Package files is a generated protocol buffer package.
|
Package files is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package init provides initialization that must happen before any App Engine user code runs.
|
Package init provides initialization that must happen before any App Engine user code runs. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine 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 appengine_tools_devappserver2 is a generated protocol buffer package.
|
Package appengine_tools_devappserver2 is a generated protocol buffer package. |
Package search is a generated protocol buffer package.
|
Package search is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |
Package appengine is a generated protocol buffer package.
|
Package appengine is a generated protocol buffer package. |