internal

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStatus = errors.New("status code is not 200")

Functions

func AddCharges

func AddCharges(price float64) float64

func FormatCurrencyValue

func FormatCurrencyValue(value float64) string

func GetGreeting

func GetGreeting() (hello string, goodbye string)

func GetPriceEmoji

func GetPriceEmoji(price float64, average float64) string

func Pad added in v1.0.19

func Pad(i int) string

func PrepareQueryParameters

func PrepareQueryParameters() string

Types

type EnergyPrices

type EnergyPrices struct {
	Prices       []Price
	Average      float64
	AverageHours []int
	High         float64
	HighHours    []int
	Low          float64
	LowHours     []int
}

func GetEnergyPrices

func GetEnergyPrices() (*EnergyPrices, error)

type Price

type Price struct {
	Hour  int
	Price float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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