Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor struct { Identifier string `json:"identifier"` ControllerName string `json:"controller_name"` }
Actor represents a device to perform an action on
type Rule ¶
type Rule struct { Second *int // 0-59 Minute *int // 0-59 Hour *int // 0-23 Weekday *int // 0-6 (Sunday = 0) Day *int // 1-31 Month *int // 1-12 }
Rule represents a periodic time
type Schedule ¶
type Schedule struct { // ActorID is the ID of the controller to act upon ActorID string // Actions is the list of actions to perform Actions []Action // StartTime is the earliest time that the schedule can run. // N.b. it might not run at this time if the rules do not permit. StartTime time.Time // NextRun is a cache of the next run time NextRun time.Time // Count is the number of times the schedule should run. // A value of -1 will run the schedule ad infinitum. Count int // Until is the end date of the schedule Until time.Time }
Schedule wraps a set of rules and a set of actions
Click to show internal directories.
Click to hide internal directories.