-
Notifications
You must be signed in to change notification settings - Fork 42
/
schema.go
53 lines (45 loc) · 1.09 KB
/
schema.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 weather
type coord struct {
Lon float64 `json:"lon"`
Lat float64 `json:"lat"`
}
type weather struct {
ID int `json:"id"`
Main string `json:"main"`
Description string `json:"description"`
Icon string `json:"icon"`
}
type wind struct {
Speed float64 `json:"speed"`
Deg float64 `json:"deg"`
}
type clouds struct {
All int `json:"all"`
}
type rain struct {
Threehr int `json:"3h"`
}
type main struct {
Temp float64 `json:"temp"`
Pressure int `json:"pressure"`
Humidity int `json:"humidity"`
TempMin float64 `json:"temp_min"`
TempMax float64 `json:"temp_max"`
}
type sys struct {
Country string `json:"country"`
Sunrise int `json:"sunrise"`
Sunset int `json:"sunset"`
}
type currentWeatherResponse struct {
Coord coord `json:"coord"`
Weather []weather `json:"weather"`
Main main `json:"main"`
Wind wind `json:"wind"`
Rain rain `json:"rain"`
Clouds clouds `json:"clouds"`
Sys sys `json:"sys"`
Dt int `json:"dt"`
ID int `json:"id"`
Name string `json:"name"`
}