Documentation
¶
Index ¶
- type API
- type Config
- type FontConfig
- type Forecast
- type Server
- type WeatherBoard
- func (w *WeatherBoard) Enabler() board.Enabler
- func (w *WeatherBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)
- func (w *WeatherBoard) GetRPCHandler() (string, http.Handler)
- func (w *WeatherBoard) InBetween() bool
- func (w *WeatherBoard) Name() string
- func (w *WeatherBoard) Render(ctx context.Context, canvas board.Canvas) error
- func (w *WeatherBoard) ScrollMode() bool
- func (w *WeatherBoard) ScrollRender(ctx context.Context, canvas board.Canvas, padding int) (board.Canvas, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { CurrentForecast(ctx context.Context, zipCode string, country string, bounds image.Rectangle, metricUnits bool) (*Forecast, error) DailyForecasts(ctx context.Context, zipCode string, country string, bounds image.Rectangle, metricUnits bool) ([]*Forecast, error) HourlyForecasts(ctx context.Context, zipCode string, country string, bounds image.Rectangle, metricUnits bool) ([]*Forecast, error) CacheClear() }
API interface for getting weather data
type Config ¶
type Config struct { StartEnabled *atomic.Bool `json:"enabled"` BoardDelay string `json:"boardDelay"` ScrollMode *atomic.Bool `json:"scrollMode"` TightScrollPadding int `json:"tightScrollPadding"` ScrollDelay string `json:"scrollDelay"` ZipCode string `json:"zipCode"` Country string `json:"country"` APIKey string `json:"apiKey"` CurrentForecast *atomic.Bool `json:"currentForecast"` HourlyForecast *atomic.Bool `json:"hourlyForecast"` DailyForecast *atomic.Bool `json:"dailyForecast"` DailyNumber int `json:"dailyNumber"` HourlyNumber int `json:"hourlyNumber"` OnTimes []string `json:"onTimes"` OffTimes []string `json:"offTimes"` MetricUnits *atomic.Bool `json:"metricUnits"` ShowBetween *atomic.Bool `json:"showBetween"` APIVersion string `json:"apiVersion"` BigFont *FontConfig `json:"bigFont"` SmallFont *FontConfig `json:"smallFont"` // contains filtered or unexported fields }
Config for a WeatherBoard
type FontConfig ¶ added in v0.0.107
type FontConfig struct {
Size float64 `json:"size"`
}
type Forecast ¶
type Forecast struct { Time time.Time Temperature *float64 HighTemp *float64 LowTemp *float64 Humidity int TempUnit string Icon *logo.Logo IconCode string IsHourly bool PrecipChance *int }
Forecast ...
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server ...
type WeatherBoard ¶
WeatherBoard displays weather
func (*WeatherBoard) Enabler ¶
func (w *WeatherBoard) Enabler() board.Enabler
func (*WeatherBoard) GetHTTPHandlers ¶
func (w *WeatherBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)
GetHTTPHandlers ...
func (*WeatherBoard) GetRPCHandler ¶
func (w *WeatherBoard) GetRPCHandler() (string, http.Handler)
GetRPCHandler ...
Click to show internal directories.
Click to hide internal directories.