Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEloverblik = errors.New("error getting data from eloverblik.dk")
Functions ¶
func Prices ¶
func Prices(from, to time.Time, c interfaces.Configurator, ignoreMissingTariffs bool) ([]entities.FullPrice, error)
Prices fetches price data from `from` and as far ahead as they're available, for the given `mid` using the `token` for auth. If 'IgnoreMissingTariffs' is true, just return spot prices without tariffs, if they can't be fetched.
Types ¶
type FullPrices ¶
var FullPricesCached FullPrices
func Summarize ¶
func Summarize(spot interfaces.SpotPricer, t interfaces.Indexer) FullPrices
Summarize will combine the information in spot and t into a list of FullPrices
func (FullPrices) InRange ¶
func (fp FullPrices) InRange(from, to time.Time) bool
InRange returns true if fb contains data in the full range from - to
func (FullPrices) Price ¶
func (fp FullPrices) Price(t time.Time) float64
Price implements the Pricer interface
func (FullPrices) Range ¶
func (fp FullPrices) Range(from, to time.Time) FullPrices
Range returns the subset of fp that are between from and to. If out of range, returns empty
Directories ¶
Path | Synopsis |
---|---|
Package interfaces defines a bunch of interfaces for passing abstracted data around.
|
Package interfaces defines a bunch of interfaces for passing abstracted data around. |
repos
|
|
Click to show internal directories.
Click to hide internal directories.