Documentation
¶
Index ¶
- func GetModule() common.Module
- type Weather
- func (m *Weather) GetDescription() string
- func (m *Weather) GetLastRun() string
- func (m *Weather) GetName() string
- func (m *Weather) GetRunInterval() int64
- func (m *Weather) GetRunIntervalOnBattery() int64
- func (m *Weather) GetSlug() string
- func (m *Weather) GetWaybarOutput() (*common.WaybarOutput, error)
- func (m *Weather) IsEnabled() bool
- func (m *Weather) Run() error
- func (m *Weather) RunCommand(name string, args []string) error
- func (m *Weather) SaveLastRun()
- func (m *Weather) SuspendOnBattery() bool
- func (m *Weather) WriteOutput() error
- type WttrIn
- type WttrInHour
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Weather ¶
type Weather struct { Name string Description string Slug string // contains filtered or unexported fields }
func (*Weather) GetDescription ¶
func (*Weather) GetLastRun ¶
func (*Weather) GetRunInterval ¶
func (*Weather) GetRunIntervalOnBattery ¶
func (*Weather) GetWaybarOutput ¶
func (m *Weather) GetWaybarOutput() (*common.WaybarOutput, error)
func (*Weather) SaveLastRun ¶
func (m *Weather) SaveLastRun()
func (*Weather) SuspendOnBattery ¶
func (*Weather) WriteOutput ¶
type WttrIn ¶
type WttrIn struct { CurrentCondition []struct { Feelslikec string `json:"FeelsLikeC"` Feelslikef string `json:"FeelsLikeF"` Cloudcover string `json:"cloudcover"` Humidity string `json:"humidity"` Localobsdatetime string `json:"localObsDateTime"` ObservationTime string `json:"observation_time"` Precipinches string `json:"precipInches"` Precipmm string `json:"precipMM"` Pressure string `json:"pressure"` Pressureinches string `json:"pressureInches"` TempC string `json:"temp_C"` TempF string `json:"temp_F"` Uvindex string `json:"uvIndex"` Visibility string `json:"visibility"` Visibilitymiles string `json:"visibilityMiles"` Weathercode string `json:"weatherCode"` Weatherdesc []struct { Value string `json:"value"` } `json:"weatherDesc"` Weathericonurl []struct { Value string `json:"value"` } `json:"weatherIconUrl"` Winddir16Point string `json:"winddir16Point"` Winddirdegree string `json:"winddirDegree"` Windspeedkmph string `json:"windspeedKmph"` Windspeedmiles string `json:"windspeedMiles"` } `json:"current_condition"` NearestArea []struct { Areaname []struct { Value string `json:"value"` } `json:"areaName"` Country []struct { Value string `json:"value"` } `json:"country"` Latitude string `json:"latitude"` Longitude string `json:"longitude"` Population string `json:"population"` Region []struct { Value string `json:"value"` } `json:"region"` Weatherurl []struct { Value string `json:"value"` } `json:"weatherUrl"` } `json:"nearest_area"` Request []struct { Query string `json:"query"` Type string `json:"type"` } `json:"request"` Weather []struct { Astronomy []struct { MoonIllumination string `json:"moon_illumination"` MoonPhase string `json:"moon_phase"` Moonrise string `json:"moonrise"` Moonset string `json:"moonset"` Sunrise string `json:"sunrise"` Sunset string `json:"sunset"` } `json:"astronomy"` Avgtempc string `json:"avgtempC"` Avgtempf string `json:"avgtempF"` Date string `json:"date"` Hourly []*WttrInHour `json:"hourly"` Maxtempc string `json:"maxtempC"` Maxtempf string `json:"maxtempF"` Mintempc string `json:"mintempC"` Mintempf string `json:"mintempF"` Sunhour string `json:"sunHour"` TotalsnowCm string `json:"totalSnow_cm"` Uvindex string `json:"uvIndex"` } `json:"weather"` }
type WttrInHour ¶
type WttrInHour struct { Dewpointc string `json:"DewPointC"` Dewpointf string `json:"DewPointF"` Feelslikec string `json:"FeelsLikeC"` Feelslikef string `json:"FeelsLikeF"` Heatindexc string `json:"HeatIndexC"` Heatindexf string `json:"HeatIndexF"` Windchillc string `json:"WindChillC"` Windchillf string `json:"WindChillF"` Windgustkmph string `json:"WindGustKmph"` Windgustmiles string `json:"WindGustMiles"` Chanceoffog string `json:"chanceoffog"` Chanceoffrost string `json:"chanceoffrost"` Chanceofhightemp string `json:"chanceofhightemp"` Chanceofovercast string `json:"chanceofovercast"` Chanceofrain string `json:"chanceofrain"` Chanceofremdry string `json:"chanceofremdry"` Chanceofsnow string `json:"chanceofsnow"` Chanceofsunshine string `json:"chanceofsunshine"` Chanceofthunder string `json:"chanceofthunder"` Chanceofwindy string `json:"chanceofwindy"` Cloudcover string `json:"cloudcover"` Humidity string `json:"humidity"` Precipinches string `json:"precipInches"` Precipmm string `json:"precipMM"` Pressure string `json:"pressure"` Pressureinches string `json:"pressureInches"` Tempc string `json:"tempC"` Tempf string `json:"tempF"` Time string `json:"time"` Uvindex string `json:"uvIndex"` Visibility string `json:"visibility"` Visibilitymiles string `json:"visibilityMiles"` Weathercode string `json:"weatherCode"` Weatherdesc []struct { Value string `json:"value"` } `json:"weatherDesc"` Weathericonurl []struct { Value string `json:"value"` } `json:"weatherIconUrl"` Winddir16Point string `json:"winddir16Point"` Winddirdegree string `json:"winddirDegree"` Windspeedkmph string `json:"windspeedKmph"` Windspeedmiles string `json:"windspeedMiles"` }
Click to show internal directories.
Click to hide internal directories.