-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignature.go
36 lines (32 loc) · 1023 Bytes
/
signature.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
package main
type Geometry struct {
Type string `json:"type"`
Coordinates []float64 `json:"coordinates"`
}
type Properties struct {
Title string `json:"title"`
Description string `json:"description"`
Group int `json:"group"`
MediaURL string `json:"media_url,omitempty"`
MarkerColor string `json:"marker-color"`
}
type Entity struct {
Type string `json:"type"`
ID int64 `json:"id"`
Geometry Geometry `json:"geometry"`
Properties Properties `json:"properties,omitempty"`
}
type NormalisedEntity struct {
Latitude float64 `json:"lat"`
Longitude float64 `json:"lon"`
Level uint8 `json:"level"`
Date string `json:"date"` // probably string is better
Title string `json:"title"`
MediaURL string `json:"media_url,omitempty"`
}
type MapObject struct {
Casualties []NormalisedEntity `json:"casualties"`
Shellings []NormalisedEntity `json:"shelling"`
InfraDamage []NormalisedEntity `json:"infra_damage"`
}
type Entities = []Entity