weather

package
v0.0.0-...-ea4ac85 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 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