openweather

package
v0.0.108 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	sync.Mutex
	// contains filtered or unexported fields
}

API ...

func New

func New(apiKey string, refresh time.Duration, apiVersion string, log *zap.Logger) (*API, error)

New ...

func (*API) CacheClear

func (a *API) CacheClear()

CacheClear ...

func (*API) CurrentForecast

func (a *API) CurrentForecast(ctx context.Context, zipCode string, country string, bounds image.Rectangle, metric bool) (*weatherboard.Forecast, error)

CurrentForecast ...

func (*API) DailyForecasts

func (a *API) DailyForecasts(ctx context.Context, zipCode string, country string, bounds image.Rectangle, metric bool) ([]*weatherboard.Forecast, error)

DailyForecasts ...

func (*API) HourlyForecasts

func (a *API) HourlyForecasts(ctx context.Context, zipCode string, country string, bounds image.Rectangle, metric bool) ([]*weatherboard.Forecast, error)

HourlyForecasts ...

Jump to

Keyboard shortcuts

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