plugin

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCoreFunctions added in v0.3.0

func RegisterCoreFunctions(rule javascript.JSEnabledRuleFunction)

Types

type FunctionHook

type FunctionHook func(nodes []*yaml.Node, context model.RuleFunctionContext) []model.RuleFunctionResult

type FunctionSchema

type FunctionSchema func() model.RuleFunctionSchema

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func CreatePluginManager added in v0.0.19

func CreatePluginManager() *Manager

func LoadFunctions

func LoadFunctions(path string, silence bool) (*Manager, error)

LoadFunctions will load custom functions found in the supplied path

func (*Manager) GetCustomFunctions

func (pm *Manager) GetCustomFunctions() map[string]model.RuleFunction

func (*Manager) LoadedFunctionCount

func (pm *Manager) LoadedFunctionCount() int

LoadedFunctionCount returns the number of available and ready to use functions.

func (*Manager) RegisterFunction

func (pm *Manager) RegisterFunction(name string, ruleFunction model.RuleFunction)

RegisterFunction allows a custom function to be hooked in

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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