Documentation ¶
Overview ¶
Package gae offers a google appengine integration for the gotojs package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextConstructor ¶
func ContextConstructor(req *http.Request, res http.ResponseWriter) *HTTPContext
ContextConstructor creates a gotos HTTPContext
func ContextInjector ¶
func ContextInjector(b Binding, hc *HTTPContext, injs Injections) bool
ContextInjector is a gotojs injector method that takes care to add the GAE context to then injection vector and allows bindings to take it as injection argument.
func SetupAndStart ¶
func SetupAndStart(f *Container, cons ...ModuleController)
Types ¶
type BaseModuleController ¶
type BaseModuleController struct { Next ModuleController // contains filtered or unexported fields }
func NewBaseModuleController ¶
func NewBaseModuleController(f *Container, cons ...ModuleController) *BaseModuleController
NewBaseModuleController creates a generic module control that supoprts start/stop methods and integrates the gae specific context injections. The constructor should be called after the service bindings have been defined. A generic controller will be created and if given by parameter a subsequent one is chained in.
func (*BaseModuleController) ServeHTTP ¶
func (con *BaseModuleController) ServeHTTP(res http.ResponseWriter, req *http.Request)
ServeHTTP dispatches incoming requests to module controller methods (start/stop) and the gotojs handler.
func (*BaseModuleController) Start ¶
func (con *BaseModuleController) Start(c *Context)
Start is the menthod of the module controller that will be called when a appengine backend module is started (manual/basic_scaling)
func (*BaseModuleController) Stop ¶
func (con *BaseModuleController) Stop(c *Context)
Stop is the menthod of the module controller that will be called when a appengine backend module is stoped or aborted (manual/basic_scaling)
type Context ¶
Google App Engine context wrapper.
func NewContext ¶
func NewContext(hc *HTTPContext) *Context
NewContext creates a new appengine context wrapper by the given http call attributes.