accuweather

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Avg

func Avg(vals ...float32) float32

Types

type AirAndPollenValue

type AirAndPollenValue struct {
	Category      string
	CategoryValue int
	Name          string
	Type          string
	Value         float32
}

type CurrentCondition

type CurrentCondition struct {
	LocalObservationDateTime time.Time
	Temperature              MetricUnitValue
	TemperatureSummary       TemperatureSummary
	RealFeelTemperature      MetricUnitValue
	CloudCover               float32
	RelativeHumidity         float32
	Ice                      UnitValue
	RainProbability          float32
	Snow                     UnitValue
	Wind                     WindCurrent
	PrecipitationSummary     PrecipitationSummary
}

func (CurrentCondition) MapToPot

func (f CurrentCondition) MapToPot() []models.Forecast

type DailyForecast

type DailyForecast struct {
	AirAndPollen        []AirAndPollenValue
	Date                time.Time
	Day                 Day
	Night               Day
	Temperature         Temperature
	RealFeelTemperature Temperature
}

type Day

type Day struct {
	CloudCover      float32
	Ice             UnitValue
	Rain            UnitValue
	RainProbability float32
	SnowProbability float32
	Snow            UnitValue
	Wind            Wind
}

type Direction

type Direction struct {
	Degrees float32
}

type Forecast

type Forecast struct {
	DailyForecasts []DailyForecast
}

func (Forecast) MapToPot

func (f Forecast) MapToPot() []models.Forecast

type ForecastService

type ForecastService struct {
	Token       string
	GeoPosition models.GeoPositionService
}

func (*ForecastService) Get

type GeoPositionResponse

type GeoPositionResponse struct {
	Key string `json:"Key"`
}

type GeoPositionService

type GeoPositionService struct {
	Token string
}

func (*GeoPositionService) Get

type MetricTemperature

type MetricTemperature struct {
	Maximum MetricUnitValue
	Minimum MetricUnitValue
}

type MetricUnitValue

type MetricUnitValue struct {
	Metric UnitValue
}

type PrecipitationSummary

type PrecipitationSummary struct {
	Precipitation MetricUnitValue
}

type Temperature

type Temperature struct {
	Maximum UnitValue
	Minimum UnitValue
}

type TemperatureSummary

type TemperatureSummary struct {
	Past24HourRange MetricTemperature
}

type UnitValue

type UnitValue struct {
	Unit     string
	UnitType int
	Value    float32
}

func (*UnitValue) GetValue

func (u *UnitValue) GetValue() float32

type Wind

type Wind struct {
	Direction Direction
	Speed     UnitValue
}

type WindCurrent

type WindCurrent struct {
	Direction Direction
	Speed     MetricUnitValue
}

Jump to

Keyboard shortcuts

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