Documentation
¶
Overview ¶
Package weather provides an i3bar module that displays weather info.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Direction ¶
type Direction int
Direction represents a compass direction stored as degrees.
func (Direction) Cardinal ¶
Cardinal returns the cardinal direction.
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents a bar.Module that displays weather information.
func New ¶
New constructs an instance of the weather module with the provided configuration.
func (*Module) Output ¶
Output configures a module to display the output of a user-defined function.
func (*Module) RefreshInterval ¶
RefreshInterval configures the polling frequency.
type Provider ¶
Provider is an interface for weather providers, implemented by the various provider packages.
type Weather ¶
type Weather struct {
Location string
Condition Condition
Description string
Temperature unit.Temperature
Humidity float64
Pressure unit.Pressure
Wind Wind
CloudCover float64
Sunrise time.Time
Sunset time.Time
Updated time.Time
Attribution string
}
Weather represents the current weather conditions.
Source Files
¶
- direction.go
- weather.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package metar provides weather using the METAR API from the NOAA Aviation Digital Data Service, available at https://www.aviationweather.gov/.
|
Package metar provides weather using the METAR API from the NOAA Aviation Digital Data Service, available at https://www.aviationweather.gov/. |
|
Package openweathermap provides weather using the OpenWeatherMap API, available at https://openweathermap.org/api.
|
Package openweathermap provides weather using the OpenWeatherMap API, available at https://openweathermap.org/api. |
Click to show internal directories.
Click to hide internal directories.