plugin

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) (*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