actions

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEval added in v0.6.0

func NewEval() *eval

func ReadScenario added in v0.6.0

func ReadScenario(fn string) (*spec.ScenarioDoc, error)

ReadScenario reads a scenario from file.

Types

type ActionHandler added in v0.6.0

type ActionHandler func(symbol string, args map[string]any, ctx map[string]any) (map[string]any, error)

type Engine

type Engine struct {
	core.Notifier
	// contains filtered or unexported fields
}

func NewEngine added in v0.6.0

func NewEngine() *Engine

func (*Engine) GetInterface added in v0.6.0

func (e *Engine) GetInterface(ifaceId string) *spec.InterfaceEntry

func (*Engine) GetProperties added in v0.6.0

func (e *Engine) GetProperties(symbol string) (map[string]any, error)

FetchProperties returns a copy of the properties of the interface.

func (*Engine) HasInterface added in v0.6.0

func (e *Engine) HasInterface(ifaceId string) bool

func (*Engine) HasSequence added in v0.6.0

func (e *Engine) HasSequence(sequencerId string) bool

func (*Engine) InvokeOperation added in v0.6.0

func (e *Engine) InvokeOperation(symbol string, name string, args map[string]any) (any, error)

InvokeOperation invokes a operation of the interface.

func (*Engine) LoadScenario added in v0.6.0

func (e *Engine) LoadScenario(doc *spec.ScenarioDoc) error

func (*Engine) PlaySequence added in v0.6.0

func (e *Engine) PlaySequence(sequencerId string)

func (*Engine) SetProperties added in v0.6.0

func (e *Engine) SetProperties(symbol string, props map[string]any) error

SetProperties sets the properties of the interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL