Documentation
¶
Index ¶
- func Exit(location error.Location, args ...Value) (*error.Error, *int)
- type Executor
- type LogLevel
- type Value
- func AddPerm(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func AddUser(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func DelPerm(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func DelUser(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func Exec(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func GetCurrentDay(executor Executor, _ error.Location) (Value, *error.Error)
- func GetCurrentHour(executor Executor, _ error.Location) (Value, *error.Error)
- func GetCurrentMinute(executor Executor, _ error.Location) (Value, *error.Error)
- func GetCurrentMonth(executor Executor, _ error.Location) (Value, *error.Error)
- func GetCurrentSecond(executor Executor, _ error.Location) (Value, *error.Error)
- func GetCurrentYear(executor Executor, _ error.Location) (Value, *error.Error)
- func GetTemperature(executor Executor, location error.Location) (Value, *error.Error)
- func GetUser(executor Executor, _ error.Location) (Value, *error.Error)
- func GetWeather(executor Executor, location error.Location) (Value, *error.Error)
- func Log(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func Notify(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func Play(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func Print(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func Sleep(_ Executor, location error.Location, args ...Value) (Value, *error.Error)
- func Switch(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- func SwitchOn(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
- type ValueBoolean
- func (self ValueBoolean) IsEqual(_ Executor, _ error.Location, other Value) (bool, *error.Error)
- func (self ValueBoolean) IsTrue(_ Executor, _ error.Location) (bool, *error.Error)
- func (self ValueBoolean) ToString(_ Executor, _ error.Location) (string, *error.Error)
- func (self ValueBoolean) Type() ValueType
- type ValueFunction
- func (self ValueFunction) IsEqual(_ Executor, _ error.Location, other Value) (bool, *error.Error)
- func (self ValueFunction) IsTrue(_ Executor, _ error.Location) (bool, *error.Error)
- func (self ValueFunction) ToString(_ Executor, _ error.Location) (string, *error.Error)
- func (self ValueFunction) Type() ValueType
- type ValueNumber
- func (self ValueNumber) IsEqual(_ Executor, _ error.Location, other Value) (bool, *error.Error)
- func (self ValueNumber) IsGreaterThan(executor Executor, other Value, location error.Location) (bool, *error.Error)
- func (self ValueNumber) IsGreaterThanOrEqual(executor Executor, other Value, location error.Location) (bool, *error.Error)
- func (self ValueNumber) IsLessThan(executor Executor, other Value, location error.Location) (bool, *error.Error)
- func (self ValueNumber) IsLessThanOrEqual(executor Executor, other Value, location error.Location) (bool, *error.Error)
- func (self ValueNumber) IsTrue(_ Executor, _ error.Location) (bool, *error.Error)
- func (self ValueNumber) ToString(_ Executor, _ error.Location) (string, *error.Error)
- func (self ValueNumber) Type() ValueType
- type ValueRelational
- type ValueString
- func (self ValueString) IsEqual(_ Executor, _ error.Location, other Value) (bool, *error.Error)
- func (self ValueString) IsTrue(_ Executor, _ error.Location) (bool, *error.Error)
- func (self ValueString) ToString(_ Executor, _ error.Location) (string, *error.Error)
- func (self ValueString) Type() ValueType
- type ValueType
- type ValueVariable
- func (self ValueVariable) IsEqual(executor Executor, location error.Location, other Value) (bool, *error.Error)
- func (self ValueVariable) IsGreaterThan(executor Executor, other Value, location error.Location) (bool, *error.Error)
- func (self ValueVariable) IsGreaterThanOrEqual(executor Executor, other Value, location error.Location) (bool, *error.Error)
- func (self ValueVariable) IsLessThan(executor Executor, other Value, location error.Location) (bool, *error.Error)
- func (self ValueVariable) IsLessThanOrEqual(executor Executor, other Value, location error.Location) (bool, *error.Error)
- func (self ValueVariable) IsTrue(executor Executor, location error.Location) (bool, *error.Error)
- func (self ValueVariable) ToString(executor Executor, location error.Location) (string, *error.Error)
- func (self ValueVariable) Type() ValueType
- type ValueVoid
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Executor ¶
type Executor interface {
Print(args ...string)
SwitchOn(name string) (bool, error)
Switch(name string, on bool) error
Play(server string, mode string) error
Notify(title string, description string, level LogLevel) error
Log(title string, description string, level LogLevel) error
Exec(homescriptId string) (string, error)
AddUser(username string, password string, forename string, surname string) error
DelUser(username string) error
AddPerm(username string, permission string) error
DelPerm(username string, permission string) error
// Builtin variables
GetUser() string
GetWeather() (string, error)
GetTemperature() (int, error)
GetDate() (int, int, int, int, int, int)
}
type Value ¶
type Value interface {
Type() ValueType
ToString(executor Executor, location error.Location) (string, *error.Error)
IsTrue(executor Executor, location error.Location) (bool, *error.Error)
IsEqual(executor Executor, location error.Location, other Value) (bool, *error.Error)
}
func Exec ¶
Launches a Homescript based on the provided script Id If no valid script could be found or the user lacks permission to execute it, an error is returned
func GetCurrentHour ¶
func GetCurrentMinute ¶
func GetCurrentMonth ¶
func GetCurrentSecond ¶
func GetCurrentYear ¶
func GetTemperature ¶
func Notify ¶
If a notification system is provided in the runtime environment a notification is sent to the current user
type ValueBoolean ¶
type ValueBoolean struct{ Value bool }
func (ValueBoolean) Type ¶
func (self ValueBoolean) Type() ValueType
type ValueFunction ¶
type ValueFunction struct {
Callback func(executor Executor, location error.Location, args ...Value) (Value, *error.Error)
}
func (ValueFunction) Type ¶
func (self ValueFunction) Type() ValueType
type ValueNumber ¶
type ValueNumber struct{ Value float64 }
func (ValueNumber) IsGreaterThan ¶
func (ValueNumber) IsGreaterThanOrEqual ¶
func (ValueNumber) IsLessThan ¶
func (ValueNumber) IsLessThanOrEqual ¶
func (ValueNumber) Type ¶
func (self ValueNumber) Type() ValueType
type ValueRelational ¶
type ValueRelational interface {
IsLessThan(executor Executor, other Value, location error.Location) (bool, *error.Error)
IsLessThanOrEqual(executor Executor, other Value, location error.Location) (bool, *error.Error)
IsGreaterThan(executor Executor, other Value, location error.Location) (bool, *error.Error)
IsGreaterThanOrEqual(executor Executor, other Value, location error.Location) (bool, *error.Error)
}
type ValueString ¶
type ValueString struct{ Value string }
func (ValueString) Type ¶
func (self ValueString) Type() ValueType
type ValueVariable ¶
type ValueVariable struct {
Callback func(executor Executor, location error.Location) (Value, *error.Error)
}
func (ValueVariable) IsGreaterThan ¶
func (ValueVariable) IsGreaterThanOrEqual ¶
func (ValueVariable) IsLessThan ¶
func (ValueVariable) IsLessThanOrEqual ¶
func (ValueVariable) Type ¶
func (self ValueVariable) Type() ValueType
Click to show internal directories.
Click to hide internal directories.