weather

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDewpoint added in v0.2.2

func SetDewpoint(r *Record, v float64)

func SetFeelsLike added in v0.2.2

func SetFeelsLike(r *Record, v float64)

func SetIceAmount added in v0.2.2

func SetIceAmount(r *Record, v float64)

func SetPrecipitationProbability added in v0.2.2

func SetPrecipitationProbability(r *Record, v float64)

func SetPreciptationAmount added in v0.2.2

func SetPreciptationAmount(r *Record, v float64)

func SetSkyCover added in v0.2.2

func SetSkyCover(r *Record, v float64)

func SetSnowAmount added in v0.2.2

func SetSnowAmount(r *Record, v float64)

func SetTemperature added in v0.2.2

func SetTemperature(r *Record, v float64)

func SetWindDirection added in v0.2.2

func SetWindDirection(r *Record, v float64)

func SetWindGust added in v0.2.2

func SetWindGust(r *Record, v float64)

func SetWindSpeed added in v0.2.2

func SetWindSpeed(r *Record, v float64)

Types

type AstroEvent added in v0.7.0

type AstroEvent struct {
	Time   time.Time
	SunUp  *int
	MoonUp *int
	// this is hard to name. It's not "how bright is the moon" - it's "ratio of current moon phase to the full moon".
	FullMoonRatio *float64
}

type AstroEvents added in v0.7.0

type AstroEvents struct {
	Values []AstroEvent
}

func (AstroEvents) ToPoints added in v0.7.0

func (as AstroEvents) ToPoints(options WriteOptions) []*write.Point

type Astrocaster added in v0.7.0

type Astrocaster interface {
	Initer
	GetAstrocast() (AstroEvents, error)
}

type Forecaster

type Forecaster interface {
	Initer
	GetWeather() (Records, error)
}

type Initer added in v0.7.0

type Initer interface {
	Init(lat string, lon string, retryer http.Retryer) error
}

type Record added in v0.2.2

type Record struct {
	Time                     time.Time
	Temperature              *float64
	Dewpoint                 *float64
	FeelsLike                *float64
	SkyCover                 *float64
	WindDirection            *int
	WindSpeed                *float64
	WindGust                 *float64
	PrecipitationProbability *float64
	PrecipitationAmount      *float64
	SnowAmount               *float64
	IceAmount                *float64
}

type Records added in v0.7.0

type Records struct {
	Values []Record
}

func (Records) ToPoints added in v0.7.0

func (rs Records) ToPoints(options WriteOptions) []*write.Point

type WriteOptions added in v0.7.0

type WriteOptions struct {
	ForecastSource  string
	MeasurementName string
	Location        string
	ForecastTime    *int64
}

Jump to

Keyboard shortcuts

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