-
Notifications
You must be signed in to change notification settings - Fork 0
/
resp_struct.go
53 lines (44 loc) · 1.37 KB
/
resp_struct.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
45
46
47
48
49
50
51
52
53
package main
type respBody struct {
Success string `json:"success"`
Result resultStruct `json:"result"`
Records records `json:"records"`
}
type resultStruct struct {
ResourceID string `json:"resource_id"`
Fields []field `json:"fields"`
}
type field struct {
ID string `json:"id"`
Type string `json:"type"`
}
type records struct {
Locations []locationCity `json:"locations"`
}
type locationCity struct {
DatasetDescription string `json:"datasetDescription"`
LocationsName string `json:"locationsName"`
DataID string `json:"dataid"`
Locations []locationDistrict `json:"location"`
}
type locationDistrict struct {
LocationName string `json:"locationName"`
Geocode string `json:"geocode"`
Lat string `json:"lat"`
Lon string `json:"lon"`
WeatherElements []weatherElement `json:"weatherElement"`
}
type weatherElement struct {
ElementName string `json:"elementName"`
Description string `json:"description"`
TimeData []timeData `json:"time"`
}
type timeData struct {
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
ElementValues []elementValue `json:"elementValue"`
}
type elementValue struct {
Value string `json:"value"`
Measures string `json:"measures"`
}