buienalarm

package
v0.0.0-...-441f3cd Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UrlApi = "https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?lat={lat}&lon={lon}&region={region}&unit=mm/u"
)

Variables

This section is empty.

Functions

func Fetch

func Fetch(coord cfac.Coordinate, c *colly.Collector, cb Callback, ecb cfac.ErrorCallback)

Types

type Bounds

type Bounds struct {
	N float64 `json:"N"`
	E float64 `json:"E"`
	S float64 `json:"S"`
	W float64 `json:"W"`
}

type Callback

type Callback func(Forecast)

type Forecast

type Forecast struct {
	Success    bool   `json:"success"`
	Start      int    `json:"start"`
	StartHuman string `json:"start_human"`
	Temp       int    `json:"temp"`
	Delta      int    `json:"delta"`
	Precip     []int  `json:"precip"`
	Levels     Level  `json:"levels"`
	Grid       Grid   `json:"grid"`
	Source     string `json:"source"`
	Bounds     Bounds `json:"bounds"`
}

type Grid

type Grid struct {
	X int `json:"x"`
	Y int `json:"y"`
}

type Level

type Level struct {
	Light    float64 `json:"light"`
	Moderate float64 `json:"moderate"`
	Heavy    float64 `json:"heavy"`
}

type ResponseForecast

type ResponseForecast Forecast

Jump to

Keyboard shortcuts

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