Documentation
¶
Index ¶
- Constants
- func At(t api.Tariff, ts time.Time) (api.Rate, error)
- func Name(conf config.Typed) string
- func NewAmberFromConfig(other map[string]any) (api.Tariff, error)
- func NewAverageProxy(t api.Tariff) (api.Tariff, error)
- func NewAwattarFromConfig(other map[string]any) (api.Tariff, error)
- func NewCachedFromConfig(ctx context.Context, typ string, other map[string]any) (api.Tariff, error)
- func NewCombined(tariffs []api.Tariff) api.Tariff
- func NewConfigurableFromConfig(ctx context.Context, other map[string]any) (api.Tariff, error)
- func NewEdfTempoFromConfig(other map[string]any) (api.Tariff, error)
- func NewElectricityMapsFromConfig(other map[string]any) (api.Tariff, error)
- func NewEleringFromConfig(other map[string]any) (api.Tariff, error)
- func NewEntsoeFromConfig(other map[string]any) (api.Tariff, error)
- func NewFixedFromConfig(other map[string]any) (api.Tariff, error)
- func NewFromConfig(ctx context.Context, typ string, other map[string]any) (api.Tariff, error)
- func NewFromTemplateConfig(ctx context.Context, other map[string]any) (api.Tariff, error)
- func NewGrünStromIndexFromConfig(other map[string]any) (api.Tariff, error)
- func NewMergedFromConfig(ctx context.Context, other map[string]any) (api.Tariff, error)
- func NewNgesoFromConfig(other map[string]any) (api.Tariff, error)
- func NewOctopusDeFromConfig(other map[string]any) (api.Tariff, error)
- func NewOctopusFromConfig(other map[string]any) (api.Tariff, error)
- func NewOstromFromConfig(other map[string]any) (api.Tariff, error)
- func NewProxyFromConfig(ctx context.Context, typ string, other map[string]any) (api.Tariff, error)
- func NewPunFromConfig(other map[string]any) (api.Tariff, error)
- func NewSmartEnergyFromConfig(other map[string]any) (api.Tariff, error)
- func NewSolcastFromConfig(other map[string]any) (api.Tariff, error)
- func NewStekkerFromConfig(other map[string]any) (api.Tariff, error)
- func NewTibberFromConfig(other map[string]any) (api.Tariff, error)
- func NewWrapper(typ string, other map[string]any, err error) api.Tariff
- func Now(t api.Tariff) (float64, error)
- func Rates(t api.Tariff) api.Rates
- func Types() []string
- type Amber
- type Awattar
- type CarbonIntensity
- type CarbonIntensitySlot
- type EdfTempo
- type ElectricityMaps
- type Elering
- type Entsoe
- type Fixed
- type FromTo
- type GrünStromIndex
- type Merged
- type NewDataSet
- type Ngeso
- type Octopus
- type OctopusDe
- type Ostrom
- type Prezzo
- type Pun
- type Rate
- type SlotWrapper
- type SmartEnergy
- type Solcast
- type Stekker
- type Tariff
- type Tariffs
- type Tibber
- type Typed
- type Wrapper
Constants ¶
const SlotDuration = 15 * time.Minute
Variables ¶
This section is empty.
Functions ¶
func NewAverageProxy ¶
NewAverageProxy creates a proxy that tariff averaging
func NewCachedFromConfig ¶
NewCachedFromConfig creates a proxy that controls tariff instantiation and caching
func NewFromConfig ¶
NewFromConfig creates tariff from configuration
func NewFromTemplateConfig ¶
func NewMergedFromConfig ¶
func NewOctopusDeFromConfig ¶
NewOctopusDeFromConfig creates the tariff provider from the given config map, and runs it.
func NewOctopusFromConfig ¶
NewOctopusFromConfig creates the tariff provider from the given config map, and runs it.
func NewProxyFromConfig ¶
NewProxyFromConfig creates a tariff proxy supporting average or caching
func NewStekkerFromConfig ¶
NewStekkerFromConfig creates provider from config
func NewWrapper ¶
NewWrapper creates an offline tariff wrapper
Types ¶
type Awattar ¶
type Awattar struct {
// contains filtered or unexported fields
}
func (*Awattar) Type ¶
func (t *Awattar) Type() api.TariffType
Type implements the api.Tariff interface
type CarbonIntensity ¶
type CarbonIntensity struct {
Error string
Zone string
Forecast []CarbonIntensitySlot
}
type CarbonIntensitySlot ¶
type EdfTempo ¶
func (*EdfTempo) Type ¶
func (t *EdfTempo) Type() api.TariffType
Type implements the api.Tariff interface
type ElectricityMaps ¶
func (*ElectricityMaps) Type ¶
func (t *ElectricityMaps) Type() api.TariffType
Type implements the api.Tariff interface
type Elering ¶
type Elering struct {
// contains filtered or unexported fields
}
func (*Elering) Type ¶
func (t *Elering) Type() api.TariffType
Type implements the api.Tariff interface
type Entsoe ¶
func (*Entsoe) Type ¶
func (t *Entsoe) Type() api.TariffType
Type implements the api.Tariff interface
type Fixed ¶
type Fixed struct {
// contains filtered or unexported fields
}
type GrünStromIndex ¶
func (*GrünStromIndex) Rates ¶
func (t *GrünStromIndex) Rates() (api.Rates, error)
Rates implements the api.Tariff interface
func (*GrünStromIndex) Type ¶
func (t *GrünStromIndex) Type() api.TariffType
Type implements the api.Tariff interface
type Merged ¶
type Merged struct {
// contains filtered or unexported fields
}
Merged combines a primary tariff with a secondary (forecast) tariff. Primary rates are used where available, secondary fills gaps after primary ends.
func (*Merged) Type ¶
func (t *Merged) Type() api.TariffType
Type implements the api.Tariff interface
type NewDataSet ¶
type Ngeso ¶
type Ngeso struct {
// contains filtered or unexported fields
}
type Octopus ¶
type Octopus struct {
// contains filtered or unexported fields
}
func (*Octopus) Type ¶
func (t *Octopus) Type() api.TariffType
Type implements the api.Tariff interface
type OctopusDe ¶
type OctopusDe struct {
// contains filtered or unexported fields
}
func (*OctopusDe) Type ¶
func (t *OctopusDe) Type() api.TariffType
Type implements the api.Tariff interface
type Ostrom ¶
func (*Ostrom) Type ¶
func (t *Ostrom) Type() api.TariffType
Type implements the api.Tariff interface
type Pun ¶
type Pun struct {
// contains filtered or unexported fields
}
type SlotWrapper ¶
func (*SlotWrapper) Rates ¶
func (t *SlotWrapper) Rates() (api.Rates, error)
Rates converts arbitrary slot lengths (e.g. 1h, 30m) to 15m slots. Slot length must be multiple of SlotDuration. For price tariffs, the value is constant over all sub-slots. For solar/co2, linear interpolation is used between slot boundaries.
type SmartEnergy ¶
type SmartEnergy struct {
// contains filtered or unexported fields
}
func (*SmartEnergy) Rates ¶
func (t *SmartEnergy) Rates() (api.Rates, error)
Rates implements the api.Tariff interface
func (*SmartEnergy) Type ¶
func (t *SmartEnergy) Type() api.TariffType
Type implements the api.Tariff interface
type Solcast ¶
func (*Solcast) Type ¶
func (t *Solcast) Type() api.TariffType
Type implements the api.Tariff interface
type Tariff ¶
type Tariff struct {
// contains filtered or unexported fields
}
func (*Tariff) Type ¶
func (t *Tariff) Type() api.TariffType
Type implements the api.Tariff interface
type Tibber ¶
type Tibber struct {
// contains filtered or unexported fields
}
func (*Tibber) Type ¶
func (t *Tibber) Type() api.TariffType
Type implements the api.Tariff interface
type Typed ¶
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper wraps an api.Tariff to capture initialization errors
func (*Wrapper) Type ¶
func (t *Wrapper) Type() api.TariffType
Type implements the api.Tariff interface
Source Files
¶
- amber.go
- awattar.go
- combined.go
- config.go
- edf-tempo.go
- electricitymaps.go
- elering.go
- embed.go
- entsoe.go
- fixed.go
- gruenstromindex.go
- helper.go
- merged.go
- ngeso.go
- octopus.go
- octopusde.go
- ostrom.go
- proxy.go
- proxy_average.go
- proxy_cache.go
- proxy_cache_error.go
- proxy_cache_helper.go
- pun.go
- slots.go
- smartenergy.go
- solcast.go
- stekker.go
- tariff.go
- tariffs.go
- template.go
- tibber.go
- types.go
- wrapper.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package entsoe implements a minimalized version of the European Network of Transmission System Operators for Electricity's Transparency Platform API (https://transparency.entsoe.eu)
|
Package entsoe implements a minimalized version of the European Network of Transmission System Operators for Electricity's Transparency Platform API (https://transparency.entsoe.eu) |
|
Package ngeso implements the carbonintensity.org.uk Grid CO2 tracking service, which provides CO2 forecasting for the UK at a national and regional level.
|
Package ngeso implements the carbonintensity.org.uk Grid CO2 tracking service, which provides CO2 forecasting for the UK at a national and regional level. |
|
octopus
|
|
|
octopusde
|
|