/
model.go
53 lines (43 loc) · 1002 Bytes
/
model.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
41
42
43
44
45
46
47
48
49
50
51
52
53
package sqs
type ConceptUpdate struct {
UUID string
Bookmark string
ReceiptHandle *string
}
//SQS Message Format
type Body struct {
Message string `json:"Message"`
}
type Message struct {
Records []Record `json:"Records"`
}
type Record struct {
S3 s3 `json:"s3"`
Bookmark string `json:"bookmark"`
}
type s3 struct {
Object object `json:"object"`
}
type object struct {
Key string `json:"key"`
}
//Events
type ConceptChanges struct {
ChangedRecords []Event `json:"events"`
UpdatedIds []string `json:"updatedIDs"`
}
type Event struct {
ConceptType string `json:"type"`
ConceptUUID string `json:"uuid"`
AggregateHash string `json:"aggregateHash"`
TransactionID string `json:"transactionID"`
EventDetails interface{} `json:"eventDetails"`
}
type ConceptEvent struct {
Type string `json:"eventType"`
}
type ConcordanceEvent struct {
Type string `json:"eventType"`
OldID string `json:"oldID"`
NewID string `json:"newID"`
}