Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoPrices = errors.New("prices not yet available")
Functions ¶
func AddCharges ¶
Returns the price in Euros per kWh, including VAT.
func FormatCurrencyValue ¶
func GetGreeting ¶
func GetPriceEmoji ¶
func PrepareQueryParameters ¶
func PrepareQueryParameters() string
Types ¶
type EnergyPrices ¶
type EnergyPrices struct {
// contains filtered or unexported fields
}
func GetEnergyPrices ¶
func GetEnergyPrices(log *slog.Logger) (*EnergyPrices, error)
func NewEnergyPrices ¶ added in v1.0.60
func NewEnergyPrices(prices []Price) *EnergyPrices
func (*EnergyPrices) Average ¶
func (e *EnergyPrices) Average() float64
func (*EnergyPrices) AverageHours ¶
func (e *EnergyPrices) AverageHours() []int
func (*EnergyPrices) High ¶
func (e *EnergyPrices) High() float64
func (*EnergyPrices) HighHours ¶
func (e *EnergyPrices) HighHours() []int
func (*EnergyPrices) Low ¶
func (e *EnergyPrices) Low() float64
func (*EnergyPrices) LowHours ¶
func (e *EnergyPrices) LowHours() []int
Source Files
¶
Click to show internal directories.
Click to hide internal directories.