-
Notifications
You must be signed in to change notification settings - Fork 0
/
input.go
40 lines (34 loc) · 1.44 KB
/
input.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
29
30
31
32
33
34
35
36
37
38
39
40
package redriver
import (
"encoding/json"
"time"
)
type FailedItem struct {
Version string `json:"version"`
Timestamp time.Time `json:"timestamp"`
RequestContext RequestContext `json:"requestContext"`
ResponseContext ResponseContext `json:"responseContext"`
RequestPayload json.RawMessage `json:"requestPayload,omitempty"`
ResponsePayload json.RawMessage `json:"responsePayload,omitempty"`
DDBStreamBatchInfo *DDBStreamBatchInfo `json:"DDBStreamBatchInfo,omitempty"`
}
type RequestContext struct {
RequestId string `json:"requestId"`
FunctionArn string `json:"functionArn"`
Condition string `json:"condition"`
ApproximateInvokeCount int `json:"approximateInvokeCount"`
}
type ResponseContext struct {
StatusCode int `json:"statusCode"`
ExecutedVersion string `json:"executedVersion"`
FunctionError string `json:"functionError"`
}
type DDBStreamBatchInfo struct {
ShardId string `json:"shardId"`
StartSequenceNumber string `json:"startSequenceNumber"`
EndSequenceNumber string `json:"endSequenceNumber"`
ApproximateArrivalOfFirstRecord time.Time `json:"approximateArrivalOfFirstRecord"`
ApproximateArrivalOfLastRecord time.Time `json:"approximateArrivalOfLastRecord"`
BatchSize int `json:"batchSize"`
StreamArn string `json:"streamArn"`
}