Versions in this module Expand all Collapse all v0 v0.13.0 Oct 28, 2019 Changes in this version + var AdditionalConditions = []*ConditionData + var AtmosphereConditions = []*ConditionData + var CloudConditions = []*ConditionData + var DataUnits = map[string]string + var DateTimeAliases = []string + var DrizzleConditions = []*ConditionData + var ExtremeConditions = []*ConditionData + var IconList = []*IconData + var LangCodes = map[string]string + var RainConditions = []*ConditionData + var SnowConditions = []*ConditionData + var StationDataParameters = []string + var ThunderstormConditions = []*ConditionData + var UVData = []UVIndexInfo + func ConvertToURLValues(data map[string]string) string + func RetrieveIcon(destination, iconFile string) (int64, error) + func SendStationData(data url.Values) + func ValidAPIKey(key string) error + func ValidAlias(alias string) bool + func ValidDataUnit(u string) bool + func ValidDataUnitSymbol(u string) bool + func ValidLangCode(c string) bool + func ValidateStationDataParameter(param string) bool + type APIError struct + COD string + Message string + type City struct + Coord Coordinates + Country string + ID int + Name string + Population int + Sys ForecastSys + type Clouds struct + All int + type ConditionData struct + ID int + Icon1 string + Icon2 string + Meaning string + type Config struct + APIKey string + Lang string + Mode string + Password string + Unit string + Username string + func (c *Config) CheckAPIKeyExists() bool + type Coordinates struct + Latitude float64 + Longitude float64 + type CurrentWeatherData struct + Base string + Clouds Clouds + Cod int + Dt int + GeoPos Coordinates + ID int + Key string + Lang string + Main Main + Name string + Rain Rain + Snow Snow + Sys Sys + Timezone int + Unit string + Weather []Weather + Wind Wind + func NewCurrent(unit, lang, key string, options ...Option) (*CurrentWeatherData, error) + func (w *CurrentWeatherData) CurrentByArea() + func (w *CurrentWeatherData) CurrentByCoordinates(location *Coordinates) error + func (w *CurrentWeatherData) CurrentByID(id int) error + func (w *CurrentWeatherData) CurrentByName(location string) error + func (w *CurrentWeatherData) CurrentByZip(zip int, countryCode string) error + type DtTxt struct + func (dt *DtTxt) UnmarshalJSON(b []byte) error + func (t *DtTxt) MarshalJSON() ([]byte, error) + type Forecast16WeatherData struct + COD int + City City + Cnt int + List []Forecast16WeatherList + Message string + func (f *Forecast16WeatherData) Decode(r io.Reader) error + type Forecast16WeatherList struct + Clouds int + Deg int + Dt int + Humidity int + Pressure float64 + Rain float64 + Snow float64 + Speed float64 + Temp Temperature + Weather []Weather + type Forecast5WeatherData struct + City City + Cnt int + List []Forecast5WeatherList + func (f *Forecast5WeatherData) Decode(r io.Reader) error + type Forecast5WeatherList struct + Clouds Clouds + Dt int + DtTxt DtTxt + Main Main + Rain Rain + Snow Snow + Weather []Weather + Wind Wind + type ForecastSys struct + Population int + type ForecastWeather interface + DailyByCoordinates func(location *Coordinates, days int) error + DailyByID func(id, days int) error + DailyByName func(location string, days int) error + type ForecastWeatherData struct + Key string + Lang string + Unit string + func NewForecast(forecastType, unit, lang, key string, options ...Option) (*ForecastWeatherData, error) + func (f *ForecastWeatherData) DailyByCoordinates(location *Coordinates, days int) error + func (f *ForecastWeatherData) DailyByID(id, days int) error + func (f *ForecastWeatherData) DailyByName(location string, days int) error + type ForecastWeatherJson interface + Decode func(r io.Reader) error + type HistoricalParameters struct + Cnt int + End int64 + Start int64 + type HistoricalWeatherData struct + CalcTime float64 + CityData int + Cnt int + Cod int + Key string + List []WeatherHistory + Message string + Unit string + func NewHistorical(unit, key string, options ...Option) (*HistoricalWeatherData, error) + func (h *HistoricalWeatherData) HistoryByCoord(location *Coordinates, hp *HistoricalParameters) error + func (h *HistoricalWeatherData) HistoryByID(id int, hp ...*HistoricalParameters) error + func (h *HistoricalWeatherData) HistoryByName(location string) error + type IconData struct + Condition string + Day string + Night string + type Main struct + GrndLevel float64 + Humidity int + Pressure float64 + SeaLevel float64 + Temp float64 + TempMax float64 + TempMin float64 + type Option func(s *Settings) error + func WithHttpClient(c *http.Client) Option + type Pollution struct + Data []PollutionData + Key string + Location Coordinates + Time string + func NewPollution(key string, options ...Option) (*Pollution, error) + func (p *Pollution) PollutionByParams(params *PollutionParameters) error + type PollutionData struct + Precision float64 + Pressure float64 + Value float64 + type PollutionParameters struct + Datetime string + Location Coordinates + type Rain struct + OneH float64 + ThreeH float64 + type Settings struct + func NewSettings() *Settings + type Snow struct + OneH float64 + ThreeH float64 + type Sys struct + Country string + ID int + Message float64 + Sunrise int + Sunset int + Type int + type Temperature struct + Day float64 + Eve float64 + Max float64 + Min float64 + Morn float64 + Night float64 + type UV struct + Coord []float64 + DT int64 + Data []UVDataPoints + Key string + Value float64 + func NewUV(key string, options ...Option) (*UV, error) + func (u *UV) Current(coord *Coordinates) error + func (u *UV) Historical(coord *Coordinates, start, end time.Time) error + func (u *UV) UVInformation() ([]UVIndexInfo, error) + type UVDataPoints struct + DT int64 + Value float64 + type UVIndexInfo struct + MGC string + RecommendedProtection string + Risk string + UVIndex []float64 + type Weather struct + Description string + ID int + Icon string + Main string + type WeatherHistory struct + Clouds Clouds + Dt int + Main Main + Rain Rain + Weather []Weather + Wind Wind + type Wind struct + Deg float64 + Speed float64