globalmatchers

package
v3.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback func(event output.InternalEvent, result *operators.Result)

Callback is called when a global matcher is matched. It receives internal event & result of the operator execution.

type Item

type Item struct {
	TemplateID   string
	TemplatePath string
	TemplateInfo model.Info
	Operators    []*operators.Operators
}

Item is a struct that holds the global matchers details for a template

type Storage

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

Storage is a struct that holds the global matchers

func New

func New() *Storage

New creates a new storage for global matchers

func (*Storage) AddOperator

func (s *Storage) AddOperator(item *Item)

AddOperator adds a new operator to the global matchers

func (*Storage) HasMatchers

func (s *Storage) HasMatchers() bool

HasMatchers returns true if we have global matchers

func (*Storage) Match

func (s *Storage) Match(
	event output.InternalEvent,
	matchFunc operators.MatchFunc,
	extractFunc operators.ExtractFunc,
	isDebug bool,
	callback Callback,
)

Match matches the global matchers against the response

Jump to

Keyboard shortcuts

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