ostrom

package
v0.0.0-...-c8d982f Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URI_AUTH_PRODUCTION  = "https://auth.production.ostrom-api.io"
	URI_API_PRODUCTION   = "https://production.ostrom-api.io"
	URI_AUTH_SANDBOX     = "https://auth.sandbox.ostrom-api.io"
	URI_API_SANDBOX      = "https://sandbox.ostrom-api.io"
	URI_GET_CITYID       = "https://api.ostrom.de/v1/addresses/cities"
	URI_GET_STATIC_PRICE = "https://api.ostrom.de/v1/tariffs/city-id"
	URI_AUTH             = URI_AUTH_PRODUCTION
	URI_API              = URI_API_PRODUCTION
)
View Source
const (
	PRODUCT_FAIR     = "SIMPLY_FAIR"
	PRODUCT_FAIR_CAP = "SIMPLY_FAIR_WITH_PRICE_CAP"
	PRODUCT_DYNAMIC  = "SIMPLY_DYNAMIC"
	PRODUCT_BASIC    = "basisProdukt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Zip         string `json:"zip"`         //"22083",
	City        string `json:"city"`        //"Hamburg",
	Street      string `json:"street"`      //"Mozartstr.",
	HouseNumber string `json:"housenumber"` //"35"
}

type CityId

type CityId []struct {
	Id       int    `json:"id"`
	Postcode string `json:"postcode"`
	Name     string `json:"name"`
}

type Contract

type Contract struct {
	Id        int64   `json:"id"`                          //"100523456",
	Type      string  `json:"type"`                        //"ELECTRICITY",
	Product   string  `json:"productCode"`                 //"SIMPLY_DYNAMIC",
	Status    string  `json:"status"`                      //"ACTIVE",
	FirstName string  `json:"customerFirstName"`           //"Max",
	LastName  string  `json:"customerLastName"`            //"Mustermann",
	StartDate string  `json:"startDate"`                   // "2024-03-22",
	Dposit    int     `json:"currentMonthlyDepositAmount"` //120,
	Address   Address `json:"address"`
}

type Contracts

type Contracts struct {
	Data []Contract
}

type ForecastInfo

type ForecastInfo struct {
	StartTimestamp time.Time `json:"date"`
	Marketprice    float64   `json:"grossKwhPrice"`
	AdditionalCost float64   `json:"grossKwhTaxAndLevies"`
}

type Prices

type Prices struct {
	Data []ForecastInfo
}

type Tariffs

type Tariffs struct {
	Ostrom []struct {
		ProductCode                              string  `json:"productCode"`
		Tariff                                   int     `json:"tariff"`
		BasicFee                                 int     `json:"basicFee"`
		NetworkFee                               float64 `json:"networkFee"`
		UnitPricePerkWH                          float64 `json:"unitPricePerkWH"`
		TariffWithStormPreisBremse               int     `json:"tariffWithStormPreisBremse"`
		StromPreisBremseUnitPrice                int     `json:"stromPreisBremseUnitPrice"`
		AccumulatedUnitPriceWithStromPreisBremse float64 `json:"accumulatedUnitPriceWithStromPreisBremse"`
		UnitPrice                                float64 `json:"unitPrice"`
		EnergyConsumption                        int     `json:"energyConsumption"`
		BasePriceBrutto                          float64 `json:"basePriceBrutto"`
		WorkingPriceBrutto                       float64 `json:"workingPriceBrutto"`
		WorkingPriceNetto                        float64 `json:"workingPriceNetto"`
		MeterChargeBrutto                        int     `json:"meterChargeBrutto"`
		WorkingPricePowerTax                     float64 `json:"workingPricePowerTax"`
		AverageHourlyPriceToday                  float64 `json:"averageHourlyPriceToday,omitempty"`
		MinHourlyPriceToday                      float64 `json:"minHourlyPriceToday,omitempty"`
		MaxHourlyPriceToday                      float64 `json:"maxHourlyPriceToday,omitempty"`
	} `json:"ostrom"`
	Footprint struct {
		Usage          int `json:"usage"`
		KgCO2Emissions int `json:"kgCO2Emissions"`
	} `json:"footprint"`
	IsPendingApplicationAllowed bool   `json:"isPendingApplicationAllowed"`
	Status                      string `json:"status"`
	PartnerName                 any    `json:"partnerName"`
}

Jump to

Keyboard shortcuts

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