Skip to content

Commit d9db870

Browse files
lyoung-confluentbmoffattcarlzogh
authored
Create BatchItemFailure structs for DynamoDB, Kinesis, SQS (#410)
* Create streams.go * go fmt * Split StreamsEventResponse into duplicate structs Co-authored-by: Bryan Moffatt <[email protected]> Co-authored-by: Carl Zogheib <[email protected]>
1 parent 96ab249 commit d9db870

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

events/streams.go

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package events
2+
3+
// KinesisEventResponse is the outer structure to report batch item failures for KinesisEvent.
4+
type KinesisEventResponse struct {
5+
BatchItemFailures []KinesisBatchItemFailure `json:"batchItemFailures"`
6+
}
7+
8+
// KinesisBatchItemFailure is the individual record which failed processing.
9+
type KinesisBatchItemFailure struct {
10+
ItemIdentifier string `json:"itemIdentifier"`
11+
}
12+
13+
// DynamoDBEventResponse is the outer structure to report batch item failures for DynamoDBEvent.
14+
type DynamoDBEventResponse struct {
15+
BatchItemFailures []DynamoDBBatchItemFailure `json:"batchItemFailures"`
16+
}
17+
18+
// DynamoDBBatchItemFailure is the individual record which failed processing.
19+
type DynamoDBBatchItemFailure struct {
20+
ItemIdentifier string `json:"itemIdentifier"`
21+
}
22+
23+
// SQSEventResponse is the outer structure to report batch item failures for SQSEvent.
24+
type SQSEventResponse struct {
25+
BatchItemFailures []SQSBatchItemFailure `json:"batchItemFailures"`
26+
}
27+
28+
// SQSBatchItemFailure is the individual record which failed processing.
29+
type SQSBatchItemFailure struct {
30+
ItemIdentifier string `json:"itemIdentifier"`
31+
}

0 commit comments

Comments
 (0)