weather

package
v0.0.0-...-3ccddf6 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EpochTime

type EpochTime time.Time

func (*EpochTime) UnmarshalJSON

func (et *EpochTime) UnmarshalJSON(data []byte) error

type Location

type Location struct {
	CountryCode string `json:"country"`
	Sunrise     EpochTime
	Sunset      EpochTime
}

type Observation

type Observation struct {
	CurrentTemp   float32
	MaxTemp       float32
	MinTemp       float32
	Icon          string
	Humidity      int32
	Location      Location
	ConditionCode int
}

func FetchCurrentWeather

func FetchCurrentWeather(loc string) (*Observation, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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