84 lines
2.1 KiB
Go
84 lines
2.1 KiB
Go
package storage
|
||
|
||
import "time"
|
||
|
||
//CurrentWeatherDetail
|
||
type CurrentWeatherDetail struct {
|
||
// https://openweathermap.org/weather-conditions#Weather-Condition-Codes-2
|
||
id int
|
||
// Group of weather parameters (Rain, Snow, Extreme etc.)
|
||
main string
|
||
// Weather condition within the group (full list of weather conditions). Get the output in your language
|
||
description string
|
||
// Weather icon id. How to get icons
|
||
icon string
|
||
}
|
||
|
||
//CurrentWeather
|
||
type CurrentWeather struct {
|
||
// Geographical coordinates of the location (latitude)
|
||
latitude float32
|
||
|
||
// Geographical coordinates of the location (longitude)
|
||
longitude float32
|
||
|
||
// Timezone name for the requested location
|
||
timezone string
|
||
|
||
// Shift in seconds from UTC
|
||
timezone_offset int
|
||
|
||
// Current time, Unix, UTC
|
||
timestamp time.Time
|
||
|
||
// Sunrise time, Unix, UTC
|
||
sunrise time.Time
|
||
|
||
// Sunset time, Unix, UTC
|
||
sunset time.Time
|
||
|
||
// Temperature. Units - default: kelvin, metric: Celsius, imperial: Fahrenheit. How to change units used
|
||
temperature int
|
||
|
||
// Temperature. This temperature parameter accounts for the human perception of weather.
|
||
// Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.
|
||
feels_like float32
|
||
|
||
// Atmospheric pressure on the sea level, hPa
|
||
pressure int
|
||
|
||
// Humidity, %
|
||
humidity int
|
||
|
||
// Atmospheric temperature (varying according to pressure and humidity) below which water droplets begin to condense and dew can form.
|
||
// Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.
|
||
dew_point float32
|
||
|
||
// Cloudiness, %
|
||
clouds int
|
||
|
||
// Current UV index
|
||
uvi int
|
||
|
||
// Average visibility, metres
|
||
visibility int
|
||
|
||
// Wind speed. Wind speed. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units used
|
||
wind_speed float32
|
||
|
||
// Wind gust. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units used (rafale)
|
||
wind_gust int
|
||
|
||
// Wind direction, degrees (meteorological)
|
||
wind_deg int
|
||
|
||
// Rain volume for last hour, mm
|
||
rainLastHour int
|
||
|
||
// Snow volume for last hour, mm
|
||
snowLastHour int
|
||
|
||
// detail about weather condition
|
||
detaiil CurrentWeatherDetail
|
||
}
|