weather

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Results []Weather `json:"results"`
}

type Weather

type Weather struct {
	Location struct {
		ID             string `json:"id"`
		Name           string `json:"name"`
		Country        string `json:"country"`
		Path           string `json:"path"`
		Timezone       string `json:"timezone"`
		TimezoneOffset string `json:"timezone_offset"`
	} `json:"location"`
	Daily []struct {
		Date    string `json:"date"`
		TextDay string `json:"text_day"`
		//CodeDay             string `json:"code_day"`
		TextNight string `json:"text_night"`
		//CodeNight           string `json:"code_night"`
		High     string `json:"high"`
		Low      string `json:"low"`
		Rainfall string `json:"rainfall"`
		//Precip              string `json:"precip"`
		WindDirection       string `json:"wind_direction"`
		WindDirectionDegree string `json:"wind_direction_degree"`
		WindSpeed           string `json:"wind_speed"`
		WindScale           string `json:"wind_scale"`
		Humidity            string `json:"humidity"`
	} `json:"daily"`
	LastUpdate time.Time `json:"last_update"`
}

func GetWeather

func GetWeather(location string) (Weather, error)

Jump to

Keyboard shortcuts

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