weather

package
Version: v0.0.0-...-b472bfd Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package weather is providing support to query the Open Weather API and retrieve weather for a specified city. https://openweathermap.org/api

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Weather

type Weather struct {
	CityName      string  `json:"city_name"`
	Visibility    string  `json:"visibility"`
	Desc          string  `json:"description"`
	Temp          float64 `json:"temp"`
	FeelsLike     float64 `json:"feels_like"`
	MinTemp       float64 `json:"temp_min"`
	MaxTemp       float64 `json:"temp_max"`
	Pressure      int     `json:"pressure"`
	Humidity      int     `json:"humidity"`
	WindSpeed     float64 `json:"wind_speed"`
	WindDirection int     `json:"wind_direction"`
	Sunrise       int     `json:"sunrise"`
	Sunset        int     `json:"sunset"`
}

Weather contains the weather data points captured from the API.

func Search(ctx context.Context, apiKey string, url string, lat float64, lng float64) (Weather, error)

Search can locate weather for a given latitude and longitude.

Source Files

Jump to

Keyboard shortcuts

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