Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context 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"` }
type Payload ¶
type Payload struct { // custom event fields Event json.RawMessage `json:"event"` // default context object Context *Context `json:"context"` }
type Response ¶
type Response struct { // Request id is an incremental integer // representing the request that has been // received by this go proc during it's // lifetime Success *bool `json:"success,omitempty"` RequestId int `json:"-"` // can retrun request_id for debugging"` // Any errors that occur during processing // or are returned by handlers are returned Error *string `json:"errorMessage,omitempty"` Token *string `json:"token,omitempty"` // Response output data returned if no errors are present Data *interface{} `json:"response,omitempty"` }
func NewErrorResponse ¶
func NewResponse ¶
func NewResponse(data interface{}) *Response
Click to show internal directories.
Click to hide internal directories.