tariff

package
v0.0.0-...-5bfa661 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAmberFromConfig

func NewAmberFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewAwattarFromConfig

func NewAwattarFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewConfigurableFromConfig

func NewConfigurableFromConfig(ctx context.Context, other map[string]interface{}) (api.Tariff, error)

func NewEdfTempoFromConfig

func NewEdfTempoFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewElectricityMapsFromConfig

func NewElectricityMapsFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewEleringFromConfig

func NewEleringFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewEnerginetFromConfig

func NewEnerginetFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewEntsoeFromConfig

func NewEntsoeFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewFixedFromConfig

func NewFixedFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewFromConfig

func NewFromConfig(ctx context.Context, typ string, other map[string]interface{}) (api.Tariff, error)

NewFromConfig creates tariff from configuration

func NewGroupeEFromConfig

func NewGroupeEFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewGrünStromIndexFromConfig

func NewGrünStromIndexFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewNgesoFromConfig

func NewNgesoFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewOctopusFromConfig

func NewOctopusFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewPunFromConfig

func NewPunFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewSmartEnergyFromConfig

func NewSmartEnergyFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewTariffFromTemplateConfig

func NewTariffFromTemplateConfig(ctx context.Context, other map[string]interface{}) (api.Tariff, error)

func NewTibberFromConfig

func NewTibberFromConfig(other map[string]interface{}) (api.Tariff, error)

func NewWrapper

func NewWrapper(typ string, other map[string]interface{}, err error) api.Tariff

NewWrapper creates an offline tariff wrapper

func Types

func Types() []string

Types returns the list of types

Types

type Amber

type Amber struct {
	*request.Helper
	// contains filtered or unexported fields
}

func (*Amber) Rates

func (t *Amber) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Amber) Type

func (t *Amber) Type() api.TariffType

Type returns the tariff type

func (*Amber) Unit

func (t *Amber) Unit() string

type Awattar

type Awattar struct {
	// contains filtered or unexported fields
}

func (*Awattar) Rates

func (t *Awattar) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

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 CarbonIntensitySlot struct {
	CarbonIntensity float64   // 626,
	Datetime        time.Time // "2022-12-12T16:00:00.000Z"
}

type EdfTempo

type EdfTempo struct {
	*request.Helper
	// contains filtered or unexported fields
}

func (*EdfTempo) Rates

func (t *EdfTempo) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*EdfTempo) RefreshToken

func (t *EdfTempo) RefreshToken(_ *oauth2.Token) (*oauth2.Token, error)

func (*EdfTempo) Type

func (t *EdfTempo) Type() api.TariffType

Type implements the api.Tariff interface

type ElectricityMaps

type ElectricityMaps struct {
	*request.Helper
	// contains filtered or unexported fields
}

func (*ElectricityMaps) Rates

func (t *ElectricityMaps) Rates() (api.Rates, error)

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) Rates

func (t *Elering) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Elering) Type

func (t *Elering) Type() api.TariffType

Type implements the api.Tariff interface

type Energinet

type Energinet struct {
	// contains filtered or unexported fields
}

func (*Energinet) Rates

func (t *Energinet) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Energinet) Type

func (t *Energinet) Type() api.TariffType

Type implements the api.Tariff interface

type Entsoe

type Entsoe struct {
	*request.Helper
	// contains filtered or unexported fields
}

func (*Entsoe) Rates

func (t *Entsoe) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

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
}

func (*Fixed) Rates

func (t *Fixed) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Fixed) Type

func (t *Fixed) Type() api.TariffType

Type implements the api.Tariff interface

type GroupeE

type GroupeE struct {
	// contains filtered or unexported fields
}

func (*GroupeE) Rates

func (t *GroupeE) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*GroupeE) Type

func (t *GroupeE) Type() api.TariffType

Type implements the api.Tariff interface

type GrünStromIndex

type GrünStromIndex struct {
	// contains filtered or unexported fields
}

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 NewDataSet

type NewDataSet struct {
	XMLName xml.Name `xml:"NewDataSet"`
	Prezzi  []Prezzo `xml:"Prezzi"`
}

type Ngeso

type Ngeso struct {
	// contains filtered or unexported fields
}

func (*Ngeso) Rates

func (t *Ngeso) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Ngeso) Type

func (t *Ngeso) Type() api.TariffType

Type implements the api.Tariff interface

type Octopus

type Octopus struct {
	// contains filtered or unexported fields
}

func (*Octopus) Rates

func (t *Octopus) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Octopus) Type

func (t *Octopus) Type() api.TariffType

Type implements the api.Tariff interface

type Prezzo

type Prezzo struct {
	Data string `xml:"Data"`
	Ora  string `xml:"Ora"`
	PUN  string `xml:"PUN"`
}

type Pun

type Pun struct {
	// contains filtered or unexported fields
}

func (*Pun) Rates

func (t *Pun) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Pun) Type

func (t *Pun) Type() api.TariffType

Type implements the api.Tariff interface

type Rate

type Rate struct {
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`
	Price float64   `json:"price"`
}

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 Tariff

type Tariff struct {
	// contains filtered or unexported fields
}

func (*Tariff) Rates

func (t *Tariff) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Tariff) Type

func (t *Tariff) Type() api.TariffType

Type implements the api.Tariff interface

type Tariffs

type Tariffs struct {
	Currency                   currency.Unit
	Grid, FeedIn, Co2, Planner api.Tariff
}

func (*Tariffs) CurrentCo2

func (t *Tariffs) CurrentCo2() (float64, error)

CurrentCo2 determines the grids co2 emission.

func (*Tariffs) CurrentFeedInPrice

func (t *Tariffs) CurrentFeedInPrice() (float64, error)

CurrentFeedInPrice returns the current feed-in price.

func (*Tariffs) CurrentGridPrice

func (t *Tariffs) CurrentGridPrice() (float64, error)

CurrentGridPrice returns the current grid price.

type Tibber

type Tibber struct {
	// contains filtered or unexported fields
}

func (*Tibber) Rates

func (t *Tibber) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Tibber) Type

func (t *Tibber) Type() api.TariffType

Type implements the api.Tariff interface

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

Wrapper wraps an api.Tariff to capture initialization errors

func (*Wrapper) Rates

func (t *Wrapper) Rates() (api.Rates, error)

Rates implements the api.Tariff interface

func (*Wrapper) Type

func (t *Wrapper) Type() api.TariffType

Type implements the api.Tariff interface

func (*Wrapper) WrappedConfig

func (v *Wrapper) WrappedConfig() (string, map[string]interface{})

WrappedConfig indicates a device with wrapped configuration

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

Jump to

Keyboard shortcuts

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