weather

package
v0.0.0-...-ed7ff26 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNoWeather = errors.New("no weather available")
)

Functions

func UpdateWeatherCache

func UpdateWeatherCache() error

We should, in theory, be putting this in REDIS or similar... but since all of us right now are using single instance APIs, using an in-memory cache is sufficient.

Types

type METAR

type METAR struct {
	StationID string `xml:"station_id"`
	RawText   string `xml:"raw_text"`
}

type TAF

type TAF struct {
	StationID string `xml:"station_id"`
	RawText   string `xml:"raw_text"`
}

type Weather

type Weather struct {
	METAR string `json:"metar"`
	TAF   string `json:"taf"`
}

func GetWeather

func GetWeather(icao string) (*Weather, error)

Jump to

Keyboard shortcuts

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