-
Notifications
You must be signed in to change notification settings - Fork 0
/
data-structs.go
34 lines (30 loc) · 963 Bytes
/
data-structs.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
// data structures
package main
// Path is used to store information about the footpaths
type Path struct {
PathID string `json:"path-id"`
Desc string `json:"path-description"`
Surveys []Survey `json:"surveys"`
}
// Image is used to store details of uploaded images
type Image struct {
ImageID string `json:"image-id"`
Filename string `json:"filename"`
S3Path string `json:"s3-location"`
Location Coordinate `json:"image-coordinates"`
}
// Coordinate is used to store lat/long extracted from EXIF data
type Coordinate struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
}
// Survey is used to store survey data
type Survey struct {
SurveyID string `json:"survey-id"`
PathID string `json:"path-id"`
Date string `json:"survey-date"`
User string `json:"survey-submitted-by"`
Detail string `json:"detail"`
Images []Image `json:"images"`
ImageIDs string `json:"image-ids"`
}