Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenWeatherMap ¶
type OpenWeatherMap struct { AppID string `toml:"app_id"` BaseURL string `toml:"base_url"` Units string `toml:"units"` Lang string `toml:"lang"` Fetch []string `toml:"fetch"` CityID []string `toml:"city_id"` ResponseTimeout internal.Duration `toml:"response_timeout"` // contains filtered or unexported fields }
func (*OpenWeatherMap) Description ¶
func (n *OpenWeatherMap) Description() string
func (*OpenWeatherMap) Gather ¶
func (n *OpenWeatherMap) Gather(ctx context.Context, acc cua.Accumulator) error
func (*OpenWeatherMap) Init ¶
func (n *OpenWeatherMap) Init() error
func (*OpenWeatherMap) SampleConfig ¶
func (n *OpenWeatherMap) SampleConfig() string
type WeatherEntry ¶
type WeatherEntry struct { Name string `json:"name"` Weather []struct { Main string `json:"main"` Description string `json:"description"` Icon string `json:"icon"` ID int64 `json:"id"` } `json:"weather"` Sys struct { Country string `json:"country"` Sunrise int64 `json:"sunrise"` Sunset int64 `json:"sunset"` } `json:"sys"` Main struct { Humidity int64 `json:"humidity"` Pressure float64 `json:"pressure"` Temp float64 `json:"temp"` } `json:"main"` Rain struct { Rain1 float64 `json:"1h"` Rain3 float64 `json:"3h"` } `json:"rain"` Wind struct { Deg float64 `json:"deg"` Speed float64 `json:"speed"` } `json:"wind"` Coord struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` } `json:"coord"` Dt int64 `json:"dt"` ID int64 `json:"id"` Clouds struct { All int64 `json:"all"` } `json:"clouds"` Visibility int64 `json:"visibility"` }
Click to show internal directories.
Click to hide internal directories.