evaluator

package
v0.16.8 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NOT          = "not"
	LESSTHAN     = "less_than"
	GREATERTHAN  = "greater_than"
	EQUALS       = "equals"
	IN           = "in"
	JSONPATH     = "json_path"
	XMLPATH      = "xml_path"
	REGEXP       = "regexp"
	EXISTS       = "exists"
	CONTAINS     = "contains"
	RANGE        = "range"
	EQUALSONFILE = "equals_on_file"
)

Variables

This section is empty.

Functions

func Eval

func Eval(node ast.Node, env *AssertEnv, receivedMap map[string]interface{}) (interface{}, error)

Types

type ArgumentError

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

func (ArgumentError) Error

func (nf ArgumentError) Error() string

func (ArgumentError) Unwrap

func (nf ArgumentError) Unwrap() error

type AssertEnv

type AssertEnv struct {
	StatusCode   int64
	ResponseSize int64
	ResponseTime int64 // in ms
	Body         string
	Headers      http.Header
	Variables    map[string]interface{}
}

type NotFoundError

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

func (NotFoundError) Error

func (nf NotFoundError) Error() string

func (NotFoundError) Unwrap

func (nf NotFoundError) Unwrap() error

type OperatorError

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

func (OperatorError) Error

func (nf OperatorError) Error() string

func (OperatorError) Unwrap

func (nf OperatorError) Unwrap() error

Jump to

Keyboard shortcuts

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