-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathaddress.go
44 lines (42 loc) · 1.29 KB
/
address.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
package geocodio
type Address struct {
Query string `json:"query"`
Components Components `json:"address_components"`
Formatted string `json:"formatted_address"`
Location Location `json:"location"`
Accuracy float64 `json:"accuracy"`
AccuracyType string `json:"accuracy_type"`
Source string `json:"source"`
Fields Fields `json:"fields,omitempty"`
}
// Components
/*
"address_components": {
"number": "1109",
"predirectional": "N",
"street": "Highland",
"suffix": "St",
"formatted_street": "N Highland St",
"city": "Arlington",
"county": "Arlington County",
"state": "VA",
"zip": "22201",
"country": "US"
},
*/
type Components struct {
Number string `json:"number"`
Street string `json:"street"`
Suffix string `json:"suffix"`
SecondaryNumber string `json:"secondarynumber"`
SecondaryUnit string `json:"secondaryunit"`
PostDirectional string `json:"postdirectional"`
FormattedStreet string `json:"formatted_street"`
City string `json:"city"`
State string `json:"state"`
Zip string `json:"zip"`
County string `json:"county"`
Country string `json:"country"`
PreDirectional string `json:"predirectional"`
Prefix string `json:"prefix"`
}