Documentation
¶
Overview ¶
Package openweathermap implements openweathermap.org API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct {
Coord struct {
Longitude float64 `json:"lon"`
Latitude float64 `json:"lat"`
} `json:"coord"`
Weather []struct {
ID int `json:"id"`
Main string `json:"main"`
Description string `json:"description"`
Icon string `json:"icon"`
} `json:"weather"`
Base string
Main struct {
Temperature float64 `json:"temp"`
Pressure float64 `json:"pressure"`
Humidity int `json:"humidity"`
MinTemperature float64 `json:"temp_min"`
MaxTemperature float64 `json:"temp_max"`
SeaLevelPressure float64 `json:"sea_level"`
GroundLevelPressure float64 `json:"grnd_level"`
} `json:"main"`
Wind struct {
Speed float64 `json:"speed"` // meter/second
Degrees float64 `json:"deg"`
} `json:"wind"`
Clouds struct {
All int `json:"all"`
} `json:"clouds"`
Rain struct {
OneHour float64 `json:"1h"`
ThreeHours float64 `json:"3h"`
} `json:"rain"`
Snow struct {
OneHour float64 `json:"1h"`
ThreeHours float64 `json:"3h"`
} `json:"snow"`
Timestamp uint `json:"dt"`
Sys struct {
Type string `json:"type"`
ID string `json:"id"`
Message string `json:"message"`
Country string `json:"country"`
Sunrise uint `json:"sunrise"`
Sunset uint `json:"sunset"`
} `json:"sys"`
ID int `json:"id"`
Name string `json:"name"`
}
A Response represents the parameters in API response. https://openweathermap.org/current#parameter
Click to show internal directories.
Click to hide internal directories.