weather

package
v0.0.0-...-2754710 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StationsHandler

func StationsHandler(ctx *gin.Context)

Types

type ClimateInstance

type ClimateInstance struct {
	Time        time.Time `json:"time"`
	Temperature float64   `json:"temperature"`
}

type ClimateReport

type ClimateReport struct {
	Maximum        ClimateInstance `json:"maximum"`
	Minimum        ClimateInstance `json:"minimum"`
	Precipitations Precipitations  `json:"precipitations"`
}

type ClimateStation

type ClimateStation struct {
	Code        int           `json:"code"`
	Name        string        `json:"name"`
	Operational bool          `json:"operational"`
	LastReport  time.Time     `json:"last_report"`
	Temperature float64       `json:"temperature"`
	Humidity    float64       `json:"humidity"`
	PresureHPas float64       `json:"presure_hpas"`
	Today       ClimateReport `json:"today"`
	Yesterday   ClimateReport `json:"yesterday"`
}

func GetClimateStations

func GetClimateStations() ([]ClimateStation, error)

func ParseClimateHTML

func ParseClimateHTML(r io.ReadCloser) (stations []ClimateStation, err error)

type Precipitations

type Precipitations struct {
	Sum float64 `json:"sum"`
	EMA float64 `json:"ema"`
}

Jump to

Keyboard shortcuts

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