sun

package
v0.0.0-...-84ed8a2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSunrise

func GetSunrise() time.Time

GetSunrise returns current's day time of sunrise Data maybe stale

func GetSunset

func GetSunset() time.Time

GetSunset returns current's day time of sunset Data maybe stale

func Start

func Start(ctx context.Context) error

Start starts periodical sun data refresher It also updates data right away

Types

type JSONResults

type JSONResults struct {
	SunriseString   string `json:"sunrise"`
	SunsetString    string `json:"sunset"`
	SolarNoonString string `json:"solar_noon"`
	DayLengthInt    int    `json:"day_length"`
}

JSONResults represents sunrise-sunset API

Jump to

Keyboard shortcuts

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