Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionError ¶
ActionError is an error that occurred while processing an action.
func (*ActionError) Error ¶
func (a *ActionError) Error() string
type CompiledAction ¶
type CompiledAction struct { gadb.UIKActionV1 Params map[string]*vm.Program }
CompiledAction is a compiled version of a UIKActionV1.
func NewCompiledAction ¶
func NewCompiledAction(a gadb.UIKActionV1) (*CompiledAction, error)
NewCompiledAction will compile a UIKActionV1 into a CompiledAction.
func (*CompiledAction) Run ¶
func (a *CompiledAction) Run(vm *vm.VM, env any) (result gadb.UIKActionV1, err error)
Run will execute the compiled action against the provided VM and environment.
type CompiledConfig ¶
type CompiledConfig struct { gadb.UIKConfigV1 CompiledRules []CompiledRule DefaultActions []CompiledAction }
CompiledConfig is a compiled version of a UIKConfigV1.
func NewCompiledConfig ¶
func NewCompiledConfig(cfg gadb.UIKConfigV1) (*CompiledConfig, error)
NewCompiledConfig will compile a UIKConfigV1 into a CompiledConfig.
func (*CompiledConfig) Run ¶
func (c *CompiledConfig) Run(vm *vm.VM, env any) (actions []gadb.UIKActionV1, err error)
Run will execute the compiled config against the provided VM and environment.
type CompiledRule ¶
type CompiledRule struct { gadb.UIKRuleV1 Condition *vm.Program Actions []CompiledAction }
CompiledRule is a compiled version of a UIKRuleV1.
func NewCompiledRule ¶
func NewCompiledRule(r gadb.UIKRuleV1) (*CompiledRule, error)
NewCompiledRule will compile a UIKRuleV1 into a CompiledRule.
func (*CompiledRule) Run ¶
func (r *CompiledRule) Run(vm *vm.VM, env any) (actions []gadb.UIKActionV1, matched bool, err error)
Run will execute the compiled rule against the provided VM and environment.
type ConditionError ¶
type ConditionError struct {
Err error
}
ConditionError is an error that occurred while processing a condition.
func (*ConditionError) Error ¶
func (c *ConditionError) Error() string
type ParamError ¶
ParamError is an error that occurred while processing a param.
func (*ParamError) Error ¶
func (p *ParamError) Error() string