-
Notifications
You must be signed in to change notification settings - Fork 548
/
sqs.go
28 lines (24 loc) · 1.23 KB
/
sqs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
package events
type SQSEvent struct {
Records []SQSMessage `json:"Records"`
}
type SQSMessage struct {
MessageId string `json:"messageId"`
ReceiptHandle string `json:"receiptHandle"`
Body string `json:"body"`
Md5OfBody string `json:"md5OfBody"`
Md5OfMessageAttributes string `json:"md5OfMessageAttributes"`
Attributes map[string]string `json:"attributes"`
MessageAttributes map[string]SQSMessageAttribute `json:"messageAttributes"`
EventSourceARN string `json:"eventSourceARN"`
EventSource string `json:"eventSource"`
AWSRegion string `json:"awsRegion"`
}
type SQSMessageAttribute struct {
StringValue *string `json:"stringValue,omitempty"`
BinaryValue []byte `json:"binaryValue,omitempty"`
StringListValues []string `json:"stringListValues"`
BinaryListValues [][]byte `json:"binaryListValues"`
DataType string `json:"dataType"`
}