-
Notifications
You must be signed in to change notification settings - Fork 0
/
struct.go
63 lines (57 loc) · 1.5 KB
/
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
54
55
56
57
58
59
60
61
62
63
package baiduMap
// get the route
type StructRoute struct {
Status int64 `json:"status"`
Message string `json:"message"`
Result *StructResult `json:"result"`
}
type StructResult struct {
Origin struct {
Lng float64 `json:"lng"`
Lat float64 `json:"lat"`
} `json:"orign"`
Destination struct {
Lng float64 `json:"lng"`
Lat float64 `json:"lat"`
} `json:"destination"`
Routes []*StructRoutes `json:"routes"`
}
type StructRoutes struct {
Distance float64 `json:"distance"`
Duration float64 `json:"duration"`
Toll int64 `json:"toll"`
Traffic_condition int64 `json:"traffic_condition"`
Steps []*StructSteps `json:"steps"`
}
type StructSteps struct {
Leg_index int64 `json:"leg_index"`
Direction int64 `json:"direction"`
Turn int64 `json:"turn"`
Distance float64 `json:"distance"`
Duration float64 `json:"duration"`
Road_types string `json:"road_types"`
Instruction string `json:"instruction"`
Start_loaction struct {
Lng string `json:"lng"`
Lat string `json:"lat"`
} `json:"start_location"`
End_location struct {
Lng string `json:"lng"`
Lat string `json:"lat"`
} `json:"end_location"`
Path string `json:"path"`
Traffic_condition []*StructTraffic `json:"traffic_condition"`
}
type StructTraffic struct {
Status int64 `json:"status"`
Geo_cnt int64 `json:"geo_cnt"`
}
// StructGEOToAddress
type StructGEOToAddress struct {
Status int64 `json:"status"`
Result struct {
AddressComponent struct {
Country string `json:"country_code_iso2"`
} `json:"addressComponent"`
} `json:"result"`
}