weatherman

package
v0.0.0-...-b7be3b7 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 7 Imported by: 0

README

weatherman

-- import "github.com/adrianos93/nomenclator/internal/weatherman"

Usage

type Forecast
type Forecast struct {
	Conditions string
}

Forecast is a custom type used to communicate weather data to other packages.

type WeatherOptions
type WeatherOptions func(*Weatherman)
func WithFilter
func WithFilter(filters []string) WeatherOptions
type Weatherman
type Weatherman struct {
}

Weatherman is an interface for interacting with the Weather API

func New
func New(apikey string, options ...WeatherOptions) *Weatherman

New returns a new Weatherman

func (*Weatherman) CheckWeather
func (w *Weatherman) CheckWeather(latitude, longitude float64, date time.Time) (Forecast, error)

CheckWeather is a function that will return weather data for a certain date based on geographical coordinates and a date.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forecast

type Forecast struct {
	Conditions string
}

Forecast is a custom type used to communicate weather data to other packages.

type WeatherOptions

type WeatherOptions func(*Weatherman)

func WithFilter

func WithFilter(filters []string) WeatherOptions

type Weatherman

type Weatherman struct {
	// contains filtered or unexported fields
}

Weatherman is an interface for interacting with the Weather API

func New

func New(apikey string, options ...WeatherOptions) *Weatherman

New returns a new Weatherman

func (*Weatherman) CheckWeather

func (w *Weatherman) CheckWeather(latitude, longitude float64, date time.Time) (Forecast, error)

CheckWeather is a function that will return weather data for a certain date based on geographical coordinates and a date.

Jump to

Keyboard shortcuts

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