Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Use ¶
func Use(fn HandlerFunc) bridge
Use the provided HandlerFunc as handler for incoming requests. This function returns a bridge that manages values passing between the caller (python) and the target HandlerFunc.
Note: do not pass the bridge directly to C, otherwise CGo checker will complain, instead use a map of handles, see module/module.go for example.
Warning: bytes of eventData should be copied explicitly if you want to use them outside the HandlerFunc scope (e.g. in goroutines), they are valid until the Bridge func returns.
Types ¶
type ClientContext ¶
type ClientContext struct { InstallationID string `json:"installation_id"` AppTitle string `json:"app_title"` AppVersionName string `json:"app_version_name"` AppVersionCode string `json:"app_version_code"` AppPackageName string `json:"app_package_name"` Custom json.RawMessage `json:"custom"` Env json.RawMessage `json:"env"` }
ClientContext holds information about the client application and device when invoked through the AWS Mobile SDK.
type CognitoIdentity ¶
type CognitoIdentity struct { ID string `json:"cognito_identity_id"` PoolID string `json:"cognito_identity_pool_id"` }
CognitoIdentity identity provider when invoked through the AWS Mobile SDK.
type Context ¶
type Context struct { FunctionName string `json:"function_name"` FunctionVersion string `json:"function_version"` InvokedFunctionARN string `json:"invoked_function_arn"` MemoryLimitString string `json:"memory_limit_in_mb"` RequestID string `json:"aws_request_id"` LogGroupName string `json:"log_group_name"` LogStreamName string `json:"log_stream_name"` Identity *CognitoIdentity `json:"identity"` ClientContext *ClientContext `json:"client_context"` }
Context defines LambdaContext object as described on http://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html
func (*Context) MemoryLimit ¶
type HandlerFunc ¶
type HandlerFunc func(event json.RawMessage, context *Context) []byte