Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create BatchItemFailure structs for DynamoDB, Kinesis, SQS #410

Merged
merged 6 commits into from
Jan 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions events/streams.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package events

// KinesisEventResponse is the outer structure to report batch item failures for KinesisEvent.
type KinesisEventResponse struct {
BatchItemFailures []KinesisBatchItemFailure `json:"batchItemFailures"`
}

// KinesisBatchItemFailure is the individual record which failed processing.
type KinesisBatchItemFailure struct {
ItemIdentifier string `json:"itemIdentifier"`
}

// DynamoDBEventResponse is the outer structure to report batch item failures for DynamoDBEvent.
type DynamoDBEventResponse struct {
BatchItemFailures []DynamoDBBatchItemFailure `json:"batchItemFailures"`
}

// DynamoDBBatchItemFailure is the individual record which failed processing.
type DynamoDBBatchItemFailure struct {
ItemIdentifier string `json:"itemIdentifier"`
}

// SQSEventResponse is the outer structure to report batch item failures for SQSEvent.
type SQSEventResponse struct {
BatchItemFailures []SQSBatchItemFailure `json:"batchItemFailures"`
}

// SQSBatchItemFailure is the individual record which failed processing.
type SQSBatchItemFailure struct {
ItemIdentifier string `json:"itemIdentifier"`
}