envcan

package
v0.0.0-...-a65048b Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidDate is returned if an invalid date qualifier is supplied.
	ErrInvalidDate = errors.New("invalid date supplied")
)

Functions

This section is empty.

Types

type Station

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

Station contains the data about a single weather location reported on by Environment Canada

func NewStation

func NewStation(logger *zap.Logger, url string, title string, lat float64, lon float64) *Station

func (*Station) GetForecast

func (s *Station) GetForecast(ctx context.Context) ([]*weather.WeatherForecast, error)

GetForecast returns the forecast for this station

func (*Station) GetReport

func (s *Station) GetReport(ctx context.Context) (*weather.WeatherReport, error)

GetReport returns the current weather report for this station.

func (*Station) Latitude

func (s *Station) Latitude() float64

Latitude returns the latitude of this weather station

func (*Station) Longitude

func (s *Station) Longitude() float64

Longitude returns the longitude of this weather station

func (*Station) Name

func (s *Station) Name() string

Name returns the printable name of this weather station

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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