weather

package
v0.0.0-...-0c9a1fe Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Init creates new Redis client (required for storing weather cache)

Types

type WeatherInfo

type WeatherInfo struct {
	City    string
	Weather apixu.Weather
}

func GetCurrent

func GetCurrent(city string) (*WeatherInfo, error)

GetCurrent fetches city coordinates by it's name, then fetches current weather data from Redis (if corresponding coordinates-key exists) or directly from Apixu Weather.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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