darkskysource

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForecastFormatter

type ForecastFormatter struct {
	Units Units
}

func NewForecastFormatter

func NewForecastFormatter(flags *darksky.Flags) ForecastFormatter

func (*ForecastFormatter) AlertMessage

func (f *ForecastFormatter) AlertMessage(alert *darksky.Alert, timezone string) string

func (*ForecastFormatter) Bearing

func (*ForecastFormatter) CombinedDataBlockSummary

func (f *ForecastFormatter) CombinedDataBlockSummary(first *darksky.DataBlock, second *darksky.DataBlock) string

func (*ForecastFormatter) Coordinate

func (f *ForecastFormatter) Coordinate(m darksky.Measurement) float64

func (*ForecastFormatter) DataBlockSummary

func (f *ForecastFormatter) DataBlockSummary(dataBlock *darksky.DataBlock) string

func (*ForecastFormatter) Day

func (f *ForecastFormatter) Day(val darksky.Timestamp, timezone string) string

func (*ForecastFormatter) Distance

func (*ForecastFormatter) Measurement

func (f *ForecastFormatter) Measurement(m darksky.Measurement) string

func (*ForecastFormatter) Percentage

func (f *ForecastFormatter) Percentage(m darksky.Measurement) string

func (*ForecastFormatter) Pressure

func (*ForecastFormatter) Speed

func (*ForecastFormatter) SpeedWithBearing

func (f *ForecastFormatter) SpeedWithBearing(speed darksky.Measurement, bearing darksky.Measurement) string

func (*ForecastFormatter) Temperature

func (f *ForecastFormatter) Temperature(m darksky.Measurement) string

func (*ForecastFormatter) Time

func (f *ForecastFormatter) Time(val darksky.Timestamp, timezone string) string

func (*ForecastFormatter) Title

func (f *ForecastFormatter) Title(title string) string

type Mapper

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

func NewMapper

func NewMapper(forecast darksky.ForecastResponse) Mapper

func (*Mapper) AsWeatherResponse

func (m *Mapper) AsWeatherResponse(location *gpb.GeocodeReply) (*wpb.WeatherReply, error)

type SiUnits

type SiUnits struct {
	Units
}

func (SiUnits) Accumulation

func (u SiUnits) Accumulation() string

func (SiUnits) Distance

func (u SiUnits) Distance() string

func (SiUnits) Pressure

func (u SiUnits) Pressure() string

func (SiUnits) Speed

func (u SiUnits) Speed() string

func (SiUnits) Temperature

func (u SiUnits) Temperature() string

type Units

type Units interface {
	Distance() string
	Speed() string
	Temperature() string
	Accumulation() string
	Pressure() string
}

type UsUnits

type UsUnits struct {
	Units
}

func (UsUnits) Accumulation

func (u UsUnits) Accumulation() string

func (UsUnits) Distance

func (u UsUnits) Distance() string

func (UsUnits) Pressure

func (u UsUnits) Pressure() string

func (UsUnits) Speed

func (u UsUnits) Speed() string

func (UsUnits) Temperature

func (u UsUnits) Temperature() string

Jump to

Keyboard shortcuts

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