template

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisplayData

type DisplayData struct {
	// Location data
	Latitude  float64
	Longitude float64
	Elevation float64
	Address   geocode.Address

	// General weather and moon phase data
	UpdateTime    time.Time
	TempUnit      string
	PressureUnit  string
	SunsetTime    time.Time
	SunriseTime   time.Time
	Moonphase     string
	MoonphaseIcon string

	// Current weather and forecast data
	Current  WeatherData
	Forecast WeatherData
}

type Templates

type Templates struct {
	Text    *template.Template
	AltText *template.Template
	Tooltip *template.Template
	// contains filtered or unexported fields
}

func New added in v0.2.5

func New(conf *config.Config, loc *spreak.Localizer) (*Templates, error)

type WeatherData added in v0.2.1

type WeatherData struct {
	WeatherDateForTime  time.Time
	Temperature         float64
	ApparentTemperature float64
	Humidity            float64
	PressureMSL         float64
	WeatherCode         float64
	WindDirection       float64
	WindSpeed           float64
	ConditionIcon       string
	Condition           string
	IsDaytime           bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL