tariff

package
v0.0.0-...-3371691 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAwattarFromConfig

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

func NewConfigurableFromConfig

func NewConfigurableFromConfig(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(typ string, other map[string]interface{}) (v api.Tariff, err error)

NewFromConfig creates tariff from configuration

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 NewTibberFromConfig

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

Types

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

func (*Octopus) Unit

func (t *Octopus) Unit() string

Unit implements the api.Tariff interface Stubbed because supplier always works in GBP

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 NewTariffs

func NewTariffs(currency currency.Unit, grid, feedin, co2 api.Tariff, planner api.Tariff) *Tariffs

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

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.

Jump to

Keyboard shortcuts

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