exprhelpers

package
Version: v0.0.0-...-236fc01 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Atof

func Atof(x string) float64

func File

func File(filename string) []string

func FileInit

func FileInit(fileFolder string, filename string, fileType string) error

func GetExprEnv

func GetExprEnv(ctx map[string]interface{}) map[string]interface{}

func Init

func Init() error

func IpInRange

func IpInRange(ip string, ipRange string) bool

func JsonExtract

func JsonExtract(jsblob string, target string) string

func JsonExtractLib

func JsonExtractLib(jsblob string, target ...string) string

func RegexpInFile

func RegexpInFile(data string, filename string) bool

func Upper

func Upper(s string) string

Types

type ExprDebugger

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

ExprDebugger contains the list of expression to be run when debugging an expression filter

func NewDebugger

func NewDebugger(filter string, exprEnv expr.Option) (*ExprDebugger, error)

NewDebugger is the exported function that build the debuggers expressions

func (*ExprDebugger) Run

func (e *ExprDebugger) Run(logger *logrus.Entry, filterResult bool, exprEnv map[string]interface{})

Run display the content of each variable of a filter by evaluating them with expr, again the expr environment given in parameter

Jump to

Keyboard shortcuts

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