weather

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidApiKey = fmt.Errorf("invalid owm api key")
	ErrLenWeather0   = fmt.Errorf("the owm response contains no weather information")
)

Functions

This section is empty.

Types

type WeatherMeasurement

type WeatherMeasurement struct {
	Id                 uint    `json:"id"`
	Time               uint    `json:"time"` // Time as Unix-millis
	WeatherTitle       string  `json:"weatherTitle"`
	WeatherDescription string  `json:"weatherDescription"`
	Temperature        float32 `json:"temperature"`
	FeelsLike          float32 `json:"feelsLike"`
	Humidity           uint8   `json:"humidity"`

	Sunrise uint `json:"sunrise"`
	Sunset  uint `json:"sunset"`
}

func GetCurrentWeather

func GetCurrentWeather() (WeatherMeasurement, error)

Jump to

Keyboard shortcuts

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