github.com/Foodji/aws-lambda-go@v1.20.2/events/alb.go (about)

     1  package events
     2  
     3  // ALBTargetGroupRequest contains data originating from the ALB Lambda target group integration
     4  type ALBTargetGroupRequest struct {
     5  	HTTPMethod                      string                       `json:"httpMethod"`
     6  	Path                            string                       `json:"path"`
     7  	QueryStringParameters           map[string]string            `json:"queryStringParameters,omitempty"`
     8  	MultiValueQueryStringParameters map[string][]string          `json:"multiValueQueryStringParameters,omitempty"`
     9  	Headers                         map[string]string            `json:"headers,omitempty"`
    10  	MultiValueHeaders               map[string][]string          `json:"multiValueHeaders,omitempty"`
    11  	RequestContext                  ALBTargetGroupRequestContext `json:"requestContext"`
    12  	IsBase64Encoded                 bool                         `json:"isBase64Encoded"`
    13  	Body                            string                       `json:"body"`
    14  }
    15  
    16  // ALBTargetGroupRequestContext contains the information to identify the load balancer invoking the lambda
    17  type ALBTargetGroupRequestContext struct {
    18  	ELB ELBContext `json:"elb"`
    19  }
    20  
    21  // ELBContext contains the information to identify the ARN invoking the lambda
    22  type ELBContext struct {
    23  	TargetGroupArn string `json:"targetGroupArn"`
    24  }
    25  
    26  // ALBTargetGroupResponse configures the response to be returned by the ALB Lambda target group for the request
    27  type ALBTargetGroupResponse struct {
    28  	StatusCode        int                 `json:"statusCode"`
    29  	StatusDescription string              `json:"statusDescription"`
    30  	Headers           map[string]string   `json:"headers"`
    31  	MultiValueHeaders map[string][]string `json:"multiValueHeaders"`
    32  	Body              string              `json:"body"`
    33  	IsBase64Encoded   bool                `json:"isBase64Encoded"`
    34  }