Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultServeMux = &defaultServeMux
DefaultServeMux is the default ServeMux used by Serve.
var LambdaContextKey = contextKey{"lambda-context"}
LambdaContextKey is a context key. It can be used by handlers to access the AWS Lambda Context from the Request object. The associated value will be of type LambdaContext
var LambdaRequestContextKey = contextKey{"lambda-request-context"}
LambdaRequestContextKey is a context key. It can be used by handlers to access the AWS Lambda Request Context from the Request object.
Functions ¶
func Handle ¶
Handle registers the handler for the given pattern in the DefaultServeMux. The documentation for http.ServeMux explains how patterns are matched.
func HandleFunc ¶
func HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
HandleFunc registers the handler function for the given pattern in the DefaultServeMux. The documentation for http.ServeMux explains how patterns are matched.
Types ¶
type Authorizer ¶
type LambdaContext ¶
type LambdaContext struct { AwsRequestID string `json:"awsRequestId"` FunctionName string `json:"functionName"` FunctionVersion string `json:"functionVersion"` InvokeID string `json:"invokeid"` IsDefaultFunctionVersion bool `json:"isDefaultFunctionVersion"` LogGroupName string `json:"logGroupName"` LogStreamName string `json:"logStreamName"` MemoryLimitInMB string `json:"memoryLimitInMB"` }
LambdaContext is the AWS Lambda request context
type LambdaRequestContext ¶
type LambdaRequestContext struct { AccountID string `json:"accountId"` ResourceID string `json:"resourceId"` Stage string `json:"stage"` RequestID string `json:"requestId"` Identity map[string]string `json:"identity"` Authorizer Authorizer `json:"authorizer"` ResourcePath string `json:"resourcePath"` HTTPMethod string `json:"httpMethod"` APIID string `json:"apiId"` }
type LambdaServer ¶
LambdaServer is an analog of http.Server to handle Lambda requests
func (*LambdaServer) ListenAndServe ¶
func (srv *LambdaServer) ListenAndServe() error
ListenAndServe listens for incoming requests and dispatches them to the configured handler