Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIGatewayContext ¶
type APIGatewayContext struct { AppID string `json:"appId"` Method string `json:"method"` RequestID string `json:"requestId"` ResourceID string `json:"resourceId"` ResourcePath string `json:"resourcePath"` Stage string `json:"stage"` Identity APIGatewayIdentity `json:"identity"` }
APIGatewayContext is the API-Gateway context information
type APIGatewayEnvelope ¶
type APIGatewayEnvelope struct { Method string `json:"method"` Headers map[string]string `json:"headers"` QueryParams map[string]string `json:"queryParams"` PathParams map[string]string `json:"pathParams"` Context APIGatewayContext `json:"context"` Authorizer map[string]interface{} `json:"authorizer"` }
APIGatewayEnvelope is the type that maps to the VTL properties
type APIGatewayIdentity ¶
type APIGatewayIdentity struct { AccountID string `json:"accountId"` APIKey string `json:"apiKey"` Caller string `json:"caller"` CognitoAuthenticationProvider string `json:"cognitoAuthenticationProvider"` CognitoAuthenticationType string `json:"cognitoAuthenticationType"` CognitoIdentityID string `json:"cognitoIdentityId"` CognitoIdentityPoolID string `json:"cognitoIdentityPoolId"` SourceIP string `json:"sourceIp"` User string `json:"user"` UserAgent string `json:"userAgent"` UserArn string `json:"userArn"` }
APIGatewayIdentity is the API Gateway identity information
type APIGatewayRequest ¶
type APIGatewayRequest struct { APIGatewayEnvelope Body interface{} `json:"body"` }
APIGatewayRequest represents the API Gateway request that is submitted to a Lambda function. This format matches the inputmapping_default.VTL templates
func NewAPIGatewayMockRequest ¶
func NewAPIGatewayMockRequest(lambdaName string, httpMethod string, whitelistParamValues map[string]string, eventData interface{}) (*APIGatewayRequest, error)
NewAPIGatewayMockRequest creates a mock API Gateway request. This request format mirrors the VTL templates in github.com/mweagle/Sparta/resources/provision/apigateway
Click to show internal directories.
Click to hide internal directories.