Documentation ¶
Index ¶
- type GeoLocation
- type NowParameter
- type OpTime
- func (o *OpTime) IsDay(ctx *base.Context, input *base.OperatorIO, g GeoLocation) *base.OperatorIO
- func (o *OpTime) IsNight(ctx *base.Context, input *base.OperatorIO, g GeoLocation) *base.OperatorIO
- func (o *OpTime) IsTimeOfDay(ctx *base.Context, input *base.OperatorIO, t TimeOfDayParameter) *base.OperatorIO
- func (o *OpTime) IsTimeOfYear(ctx *base.Context, input *base.OperatorIO, t TimeOfYearParameter) *base.OperatorIO
- func (o *OpTime) Now(ctx *base.Context, input *base.OperatorIO, n NowParameter) *base.OperatorIO
- func (o *OpTime) Sleep(ctx *base.Context, input *base.OperatorIO, s SleepParameter) *base.OperatorIO
- func (o *OpTime) Sunrise(ctx *base.Context, input *base.OperatorIO, g GeoLocation) *base.OperatorIO
- type SleepParameter
- type SunriseOutput
- type TimeOfDayParameter
- type TimeOfYearParameter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeoLocation ¶
GeoLocation is a struct to hold latitude and longitude
type NowParameter ¶
type NowParameter struct {
Format *string
}
NowParameter is a struct to hold the format to use
type OpTime ¶
type OpTime struct { }
func (*OpTime) IsDay ¶
func (o *OpTime) IsDay(ctx *base.Context, input *base.OperatorIO, g GeoLocation) *base.OperatorIO
IsDay returns the SunriseOutput for the given location if it is day, otherwise an error
func (*OpTime) IsNight ¶
func (o *OpTime) IsNight(ctx *base.Context, input *base.OperatorIO, g GeoLocation) *base.OperatorIO
IsNight returns the SunriseOutput for the given location if it is night, otherwise an error
func (*OpTime) IsTimeOfDay ¶
func (o *OpTime) IsTimeOfDay(ctx *base.Context, input *base.OperatorIO, t TimeOfDayParameter) *base.OperatorIO
IsTimeOfDay returns true if the current time is within the given range
func (*OpTime) IsTimeOfYear ¶
func (o *OpTime) IsTimeOfYear(ctx *base.Context, input *base.OperatorIO, t TimeOfYearParameter) *base.OperatorIO
IsTimeOfYear returns true if the current date is within the given range
func (*OpTime) Now ¶
func (o *OpTime) Now(ctx *base.Context, input *base.OperatorIO, n NowParameter) *base.OperatorIO
Now returns the current time
func (*OpTime) Sleep ¶
func (o *OpTime) Sleep(ctx *base.Context, input *base.OperatorIO, s SleepParameter) *base.OperatorIO
Sleep sleeps for the given duration unless aborted
func (*OpTime) Sunrise ¶
func (o *OpTime) Sunrise(ctx *base.Context, input *base.OperatorIO, g GeoLocation) *base.OperatorIO
Sunrise returns the SunriseOutput for the given location
type SleepParameter ¶
SleepParameter is a struct to hold the duration to sleep
type SunriseOutput ¶
type SunriseOutput struct { Begin time.Time End time.Time Phase string Latitude float64 Longitude float64 Since time.Duration Until time.Duration }
SunriseOutput is a struct to hold the sunrise information
type TimeOfDayParameter ¶
TimeOfDayParameter is a struct to hold the start and end of a range in hours and minutes