Documentation
¶
Index ¶
- func BuildVM() *goja.Runtime
- type CoreFunction
- type JSEnabledRuleFunction
- type JSRuleFunction
- func (j *JSRuleFunction) CheckScript() error
- func (j *JSRuleFunction) GetCategory() string
- func (j *JSRuleFunction) GetSchema() model.RuleFunctionSchema
- func (j *JSRuleFunction) RegisterCoreFunction(name string, function CoreFunction)
- func (j *JSRuleFunction) RunRule(nodes []*yaml.Node, context model.RuleFunctionContext) []model.RuleFunctionResult
- func (j *JSRuleFunction) RunScript() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CoreFunction ¶
type CoreFunction func(input any, context model.RuleFunctionContext) []model.RuleFunctionResult
type JSEnabledRuleFunction ¶
type JSEnabledRuleFunction interface {
RunRule(nodes []*yaml.Node, context model.RuleFunctionContext) []model.RuleFunctionResult
GetSchema() model.RuleFunctionSchema
CheckScript() error
RunScript() error
RegisterCoreFunction(name string, function CoreFunction)
GetCategory() string
}
func NewJSRuleFunction ¶
func NewJSRuleFunction(ruleName, script string) JSEnabledRuleFunction
type JSRuleFunction ¶
type JSRuleFunction struct {
// contains filtered or unexported fields
}
func (*JSRuleFunction) CheckScript ¶
func (j *JSRuleFunction) CheckScript() error
func (*JSRuleFunction) GetCategory ¶
func (j *JSRuleFunction) GetCategory() string
func (*JSRuleFunction) GetSchema ¶
func (j *JSRuleFunction) GetSchema() model.RuleFunctionSchema
func (*JSRuleFunction) RegisterCoreFunction ¶
func (j *JSRuleFunction) RegisterCoreFunction(name string, function CoreFunction)
func (*JSRuleFunction) RunRule ¶
func (j *JSRuleFunction) RunRule(nodes []*yaml.Node, context model.RuleFunctionContext) []model.RuleFunctionResult
func (*JSRuleFunction) RunScript ¶
func (j *JSRuleFunction) RunScript() error
Click to show internal directories.
Click to hide internal directories.