Documentation ¶
Index ¶
- Constants
- Variables
- func CancelScheduling(sch *Scheduling)
- func InitScheduling()
- func ParseCommands(config JsonObject)
- func RegisterCommandForPeriodicExecution(cmd DisplayCommand, secs int)
- func ScheduleCommand(scheduling Scheduling) error
- type BasicCommand
- type Command
- type DisplayCommand
- type JsonObject
- type Scheduling
- type ToggleCommand
Constants ¶
View Source
const BasicCommandTypeString = "basic"
View Source
const RANDOM_RANGE = 3
View Source
const SECONDS_TIMING = 6
View Source
const ToggleCommandTypeString = "toggle"
Variables ¶
View Source
var CommandsAvailable map[int]DisplayCommand
Functions ¶
func CancelScheduling ¶
func CancelScheduling(sch *Scheduling)
func InitScheduling ¶
func InitScheduling()
func ParseCommands ¶
func ParseCommands(config JsonObject)
func RegisterCommandForPeriodicExecution ¶
func RegisterCommandForPeriodicExecution(cmd DisplayCommand, secs int)
func ScheduleCommand ¶
func ScheduleCommand(scheduling Scheduling) error
Types ¶
type BasicCommand ¶
type BasicCommand struct {
// contains filtered or unexported fields
}
func CreateBasicCommand ¶
func CreateBasicCommand(data JsonObject) *BasicCommand
func (BasicCommand) Execute ¶
func (cmd BasicCommand) Execute(parameter interface{}) string
type DisplayCommand ¶
type JsonObject ¶
type JsonObject map[string]interface{}
type Scheduling ¶
type Scheduling struct { ID int StartDate time.Time EndDate time.Time StartTime time.Time EndTime time.Time Dynamic bool CommandID int ExecutedOn bool ExecutedOff bool }
func GetSchedulingById ¶
func GetSchedulingById(id int) *Scheduling
func GetSchedulings ¶
func GetSchedulings() []*Scheduling
type ToggleCommand ¶
type ToggleCommand struct {
// contains filtered or unexported fields
}
func CreateToggleCommand ¶
func CreateToggleCommand(data JsonObject) *ToggleCommand
func (ToggleCommand) Execute ¶
func (cmd ToggleCommand) Execute(parameter interface{}) string
Click to show internal directories.
Click to hide internal directories.