Documentation ¶
Index ¶
- func InitLogger(logger *logrus.Logger)
- func RunById(username string, homescriptId string) (string, int, error)
- type Executor
- func (self *Executor) AddPerm(username string, permission string) error
- func (self *Executor) AddUser(username string, password string, forename string, surname string) error
- func (self *Executor) DelPerm(username string, permission string) error
- func (self *Executor) DelUser(username string) error
- func (self Executor) Exec(homescriptId string) (string, error)
- func (self *Executor) GetDate() (int, int, int, int, int, int)
- func (self *Executor) GetTemperature() (int, error)
- func (self *Executor) GetUser() string
- func (self *Executor) GetWeather() (string, error)
- func (self *Executor) Log(title string, description string, level interpreter.LogLevel) error
- func (self *Executor) Notify(title string, description string, level interpreter.LogLevel) error
- func (self *Executor) Play(server string, mode string) error
- func (self *Executor) Print(args ...string)
- func (self *Executor) Switch(switchId string, powerOn bool) error
- func (self *Executor) SwitchOn(switchId string) (bool, error)
- type HomescriptError
- type Location
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
Types ¶
type Executor ¶
func (*Executor) AddUser ¶
func (self *Executor) AddUser(username string, password string, forename string, surname string) error
Adds a new user to the system If the user already exists, an error is returned
func (*Executor) GetTemperature ¶
TODO: Will later be implemented, should return the temperature in Celsius
func (*Executor) GetWeather ¶
TODO: Will later be implemented, should return the weather as a human-readable string
func (*Executor) Print ¶
Emulates printing to the console Instead, appends the provided message to the output of the executor Exists in order to return the script's output to the user
type HomescriptError ¶
Click to show internal directories.
Click to hide internal directories.