-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlocation.go
38 lines (30 loc) · 1016 Bytes
/
location.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 monta
// Location represents a geographical location.
type Location struct {
// Coordinates of the location.
Coordinates *LatLng `json:"coordinates"`
// Address of the location.
Address *Address `json:"address"`
}
// LatLng is a latitude longitude pair of geographical coordinates.
type LatLng struct {
// Latitude of the coordinate.
Latitude float64 `json:"latitude"`
// Longitude of the coordinate.
Longitude float64 `json:"longitude"`
}
// Address represents a postal address.
type Address struct {
// Address1 is the first line of address.
Address1 string `json:"address1"`
// Address2 is the second line of address (optional).
Address2 *string `json:"address2"`
// Address3 is the third line of address (optional).
Address3 *string `json:"address3"`
// Zip is the zip code of the address.
Zip string `json:"zip"`
// City is the human-readable name of the city.
City string `json:"city"`
// Country is the human-readable name of the country.
Country string `json:"country"`
}