tankerkoenig

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: CC-BY-4.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestPrices

func RequestPrices(setup *Setup) (*response, error)

func Task

func Task(quotes chan FuelQuote, kill chan bool, setup Setup)

Types

type FuelQuote

type FuelQuote struct {
	Name   string             `json:"name"`   //< Name of the fuel station
	Lat    float64            `json:"lat"`    //< Latitude of the fuel station
	Lon    float64            `json:"lon"`    //< Longitude of the fuel station
	Prices map[string]float64 `json:"prices"` //< Prices of the fuel station, indexed by fuel type
}

func (FuelQuote) Serialize

func (quote FuelQuote) Serialize() (*string, error)

type Setup

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

type SetupBuilder

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

func NewSetupBuilder

func NewSetupBuilder(apiKey string) *SetupBuilder

func (*SetupBuilder) Build

func (b *SetupBuilder) Build() (*Setup, error)

func (*SetupBuilder) WithCoordinates

func (b *SetupBuilder) WithCoordinates(lat, lon float64) *SetupBuilder

func (*SetupBuilder) WithPeriod

func (b *SetupBuilder) WithPeriod(period time.Duration) *SetupBuilder

func (*SetupBuilder) WithRadius

func (b *SetupBuilder) WithRadius(kilometers float64) *SetupBuilder

Jump to

Keyboard shortcuts

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