-
Notifications
You must be signed in to change notification settings - Fork 4
/
schema.go
38 lines (33 loc) · 1.34 KB
/
schema.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
package schema
import "github.com/ONSdigital/dp-kafka/v3/avro"
var generateCMDDownloads = `{
"type": "record",
"name": "filter-output-submitted",
"fields": [
{"name": "filter_output_id", "type": "string", "default": ""},
{"name": "instance_id", "type": "string", "default": ""},
{"name": "dataset_id", "type": "string", "default": ""},
{"name": "edition", "type": "string", "default": ""},
{"name": "version", "type": "string", "default": ""}
]
}`
var generateCantabularDownloads = `{
"type": "record",
"name": "cantabular-export-start",
"fields": [
{"name": "instance_id", "type": "string", "default": ""},
{"name": "dataset_id", "type": "string", "default": ""},
{"name": "edition", "type": "string", "default": ""},
{"name": "version", "type": "string", "default": ""},
{"name": "filter_output_id","type": "string", "default": ""},
{"name": "dimensions", "type": { "type": "array", "items": "string"}, "default": [] }
]
}`
// GenerateCMDDownloadsEvent the Avro schema for FilterOutputSubmitted messages.
var GenerateCMDDownloadsEvent = &avro.Schema{
Definition: generateCMDDownloads,
}
// GenerateCantabularDownloadsEvent the Avro schema for FilterOutputSubmitted messages.
var GenerateCantabularDownloadsEvent = &avro.Schema{
Definition: generateCantabularDownloads,
}