/
kinesis.go
27 lines (23 loc) · 1.08 KB
/
kinesis.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
// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
package events
type KinesisEvent struct {
Records []KinesisEventRecord `json:"Records"`
}
type KinesisEventRecord struct {
AwsRegion string `json:"awsRegion"`
EventID string `json:"eventID"`
EventName string `json:"eventName"`
EventSource string `json:"eventSource"`
EventSourceArn string `json:"eventSourceARN"`
EventVersion string `json:"eventVersion"`
InvokeIdentityArn string `json:"invokeIdentityArn"`
Kinesis KinesisRecord `json:"kinesis"`
}
type KinesisRecord struct {
ApproximateArrivalTimestamp SecondsEpochTime `json:"approximateArrivalTimestamp"`
Data []byte `json:"data"`
EncryptionType string `json:"encryptionType,omitempty"`
PartitionKey string `json:"partitionKey"`
SequenceNumber string `json:"sequenceNumber"`
KinesisSchemaVersion string `json:"kinesisSchemaVersion"`
}