Documentation
¶
Index ¶
- Constants
- func ConstructContext(objects map[string]interface{}) (*ExecutionContext, *Variable)
- func ExecuteContext(operations []Operation, context *ExecutionContext, counter *Variable) error
- func ExecuteMLOG(input string, objects map[string]interface{}) error
- func ExecuteMLOGBytes(input []byte, objects map[string]interface{}) error
- func ExecuteMLOGFile(fileName string, objects map[string]interface{}) error
- func FastAtan2(x float64, y float64) float64
- func RegisterOperation(name string, setup OperationSetup)
- type Display
- type DrawAction
- type DrawStatement
- type ExecutionContext
- func (c ExecutionContext) Display(name string) (Display, error)
- func (c ExecutionContext) IsNumber(val string) bool
- func (c ExecutionContext) Memory(name string) (Memory, error)
- func (c ExecutionContext) Message(name string) (Message, error)
- func (c ExecutionContext) Object(name string) (interface{}, error)
- func (c ExecutionContext) Resolve(val string) interface{}
- func (c ExecutionContext) ResolveFloat(val string) float64
- func (c ExecutionContext) ResolveInt(val string) int64
- func (c ExecutionContext) ResolveStr(val string) string
- func (c ExecutionContext) Set(variable string, value interface{})
- type Memory
- type Message
- type Metrics
- type Operation
- type OperationExecutor
- type OperationSetup
- type PostExecute
- type Variable
Constants ¶
View Source
const ( DrawActionClear = DrawAction("clear") DrawActionColor = DrawAction("color") DrawActionStroke = DrawAction("stroke") DrawActionLine = DrawAction("line") DrawActionRect = DrawAction("rect") DrawActionLineRect = DrawAction("lineRect") DrawActionPoly = DrawAction("poly") DrawActionLinePoly = DrawAction("linePoly") DrawActionTriangle = DrawAction("triangle") DrawActionImage = DrawAction("image") )
Variables ¶
This section is empty.
Functions ¶
func ConstructContext ¶
func ConstructContext(objects map[string]interface{}) (*ExecutionContext, *Variable)
func ExecuteContext ¶
func ExecuteContext(operations []Operation, context *ExecutionContext, counter *Variable) error
func ExecuteMLOG ¶
func ExecuteMLOGBytes ¶
func ExecuteMLOGFile ¶
func RegisterOperation ¶
func RegisterOperation(name string, setup OperationSetup)
Types ¶
type Display ¶
type Display interface {
DrawFlush(buffer []DrawStatement)
}
type DrawAction ¶
type DrawAction string
type DrawStatement ¶
type DrawStatement struct { Action DrawAction Arguments []interface{} }
type ExecutionContext ¶
type ExecutionContext struct { Variables map[string]*Variable PrintBuffer strings.Builder DrawBuffer []DrawStatement Objects map[string]interface{} Metrics map[int64]*Metrics }
func (ExecutionContext) IsNumber ¶
func (c ExecutionContext) IsNumber(val string) bool
func (ExecutionContext) Object ¶
func (c ExecutionContext) Object(name string) (interface{}, error)
func (ExecutionContext) Resolve ¶
func (c ExecutionContext) Resolve(val string) interface{}
func (ExecutionContext) ResolveFloat ¶
func (c ExecutionContext) ResolveFloat(val string) float64
func (ExecutionContext) ResolveInt ¶
func (c ExecutionContext) ResolveInt(val string) int64
func (ExecutionContext) ResolveStr ¶
func (c ExecutionContext) ResolveStr(val string) string
func (ExecutionContext) Set ¶
func (c ExecutionContext) Set(variable string, value interface{})
type Operation ¶
type Operation struct { Line mlog.MLOGLine Executor OperationExecutor }
type OperationExecutor ¶
type OperationExecutor func(ctx *ExecutionContext)
type OperationSetup ¶
type OperationSetup func(args []string) (OperationExecutor, error)
type PostExecute ¶
type PostExecute interface {
PostExecute()
}
Click to show internal directories.
Click to hide internal directories.