Documentation
¶
Index ¶
- type Executor
- type LogLevel
- type Value
- func Exit(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 GetDebugInfo(executor Executor, location 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
- func (self ValueBoolean) TypeName() string
- 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
- func (self ValueFunction) TypeName() string
- 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
- func (self ValueNumber) TypeName() string
- 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
- func (self ValueString) TypeName() string
- 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
- func (self ValueVariable) TypeName() string
- type ValueVoid
- func (self ValueVoid) IsEqual(_ Executor, _ error.Location, other Value) (bool, *error.Error)
- func (self ValueVoid) IsTrue(_ Executor, _ error.Location) (bool, *error.Error)
- func (self ValueVoid) ToString(_ Executor, _ error.Location) (string, *error.Error)
- func (self ValueVoid) Type() ValueType
- func (self ValueVoid) TypeName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface {
Exit(code int)
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
// Builtin variables
GetUser() string
GetWeather() (string, error)
GetTemperature() (int, error)
GetDate() (int, int, int, int, int, int)
GetDebugInfo() (string, error)
}
type Value ¶
type Value interface {
Type() ValueType
TypeName() string
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 GetCurrentHour ¶
func GetCurrentMinute ¶
func GetCurrentMonth ¶
func GetCurrentSecond ¶
func GetCurrentYear ¶
func GetDebugInfo ¶
func GetTemperature ¶
type ValueBoolean ¶
type ValueBoolean struct{ Value bool }
func (ValueBoolean) Type ¶
func (self ValueBoolean) Type() ValueType
func (ValueBoolean) TypeName ¶
func (self ValueBoolean) TypeName() string
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
func (ValueFunction) TypeName ¶
func (self ValueFunction) TypeName() string
type ValueNumber ¶
type ValueNumber struct{ Value int }
func (ValueNumber) IsGreaterThan ¶
func (ValueNumber) IsGreaterThanOrEqual ¶
func (ValueNumber) IsLessThan ¶
func (ValueNumber) IsLessThanOrEqual ¶
func (ValueNumber) Type ¶
func (self ValueNumber) Type() ValueType
func (ValueNumber) TypeName ¶
func (self ValueNumber) TypeName() string
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
func (ValueString) TypeName ¶
func (self ValueString) TypeName() string
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
func (ValueVariable) TypeName ¶
func (self ValueVariable) TypeName() string
Click to show internal directories.
Click to hide internal directories.