sun

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

README

SUN Plugin

Documentation

Documentation

Index

Constants

View Source
const (
	// Name ...
	Name = "sun"
	// EntitySun ...
	EntitySun = string("sun")
)
View Source
const (
	// StateAboveHorizon ...
	StateAboveHorizon = "aboveHorizon"
	// StateBelowHorizon ...
	StateBelowHorizon = "belowHorizon"

	Version = "0.0.1"
)
View Source
const (
	// AttrHorizonState ...
	AttrHorizonState = "horizonState"
	// AttrPhase ...
	AttrPhase = "phase"
	// AttrAzimuth ...
	AttrAzimuth = "azimuth"
	// AttrElevation ...
	AttrElevation = "elevation"
	// AttrSunrise ...
	AttrSunrise = "sunrise"
	// AttrSunset ...
	AttrSunset = "sunset"
	// AttrSunriseEnd ...
	AttrSunriseEnd = "sunriseEnd"
	// AttrSunsetStart ...
	AttrSunsetStart = "sunsetStart"
	// AttrDawn ...
	AttrDawn = "dawn"
	// AttrDusk ...
	AttrDusk = "dusk"
	// AttrNauticalDawn ...
	AttrNauticalDawn = "nauticalDawn"
	// AttrNauticalDusk ...
	AttrNauticalDusk = "nauticalDusk"
	// AttrNightEnd ...
	AttrNightEnd = "nightEnd"
	// AttrNight ...
	AttrNight = "night"
	// AttrGoldenHourEnd ...
	AttrGoldenHourEnd = "goldenHourEnd"
	// AttrGoldenHour ...
	AttrGoldenHour = "goldenHour"
	// AttrSolarNoon ...
	AttrSolarNoon = "solarNoon"
	// AttrNadir ...
	AttrNadir = "nadir"

	// AttrLat ...
	AttrLat = "lat"
	// AttrLon ...
	AttrLon = "lon"
)
View Source
const (
	// Sunrise ...
	Sunrise = "sunrise"
	// Sunset ...
	Sunset = "sunset"

	// SunriseEnd ...
	SunriseEnd = "sunriseEnd"
	// SunsetStart ...
	SunsetStart = "sunsetStart"

	// Dawn ...
	Dawn = "dawn"
	// Dusk ...
	Dusk = "dusk"

	// NauticalDawn ...
	NauticalDawn = "nauticalDawn"
	// NauticalDusk ...
	NauticalDusk = "nauticalDusk"

	// NightEnd ...
	NightEnd = "nightEnd"
	// Night ...
	Night = "night"

	// GoldenHourEnd ...
	GoldenHourEnd = "goldenHourEnd"
	// GoldenHour ...
	GoldenHour = "goldenHour"

	// SolarNoon ...
	SolarNoon = "solarNoon"
	// Nadir ...
	Nadir = "nadir"
)

Variables

Functions

func New

func New() supervisor.Pluggable

New ...

func NewAttr

func NewAttr() m.Attributes

NewAttr ...

func NewSettings

func NewSettings() m.Attributes

NewSettings ...

func NewStates

func NewStates() (states map[string]supervisor.ActorState)

NewStates ...

Types

type Actor

type Actor struct {
	*supervisor.BaseActor
	// contains filtered or unexported fields
}

Actor ...

func NewActor

func NewActor(entity *m.Entity,
	service supervisor.Service) *Actor

NewActor ...

func (*Actor) Destroy added in v0.12.0

func (e *Actor) Destroy()

func (*Actor) Spawn

func (e *Actor) Spawn()

Spawn ...

func (*Actor) UpdateSunPosition

func (e *Actor) UpdateSunPosition(now time.Time)

UpdateSunPosition ...

type DayTime

type DayTime struct {
	MorningName string
	Time        time.Time
}

DayTime ...

type DayTimes

type DayTimes []DayTime

DayTimes ...

func (DayTimes) Len

func (l DayTimes) Len() int

Len ...

func (DayTimes) Less

func (l DayTimes) Less(i, j int) bool

Less ...

func (DayTimes) Swap

func (l DayTimes) Swap(i, j int)

Swap ...

Jump to

Keyboard shortcuts

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