Documentation
¶
Overview ¶
Package filter provides JQ filtering for response bodies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssertionDetail ¶ added in v0.5.0
type AssertionDetail struct {
Expression string // The full assertion expression
LeftSide string // The left side of comparison (e.g., ".id")
Operator string // The operator (e.g., "==", "!=", ">", etc.)
RightSide string // The right side/expected value (e.g., "999")
ActualValue string // The actual value from the left side evaluation
ExpectedValue string // The expected value (right side)
}
AssertionDetail contains detailed information about an assertion failure
func EvalJQBoolWithDetail ¶ added in v0.5.0
func EvalJQBoolWithDetail(input string, expr string) (bool, *AssertionDetail, error)
EvalJQBoolWithDetail evaluates a JQ expression and returns detailed information about the assertion. This is useful for generating helpful error messages when assertions fail.
func EvalJQBoolWithDetailAndVars ¶ added in v0.5.0
func EvalJQBoolWithDetailAndVars(input string, expr string, variables map[string]any) (bool, *AssertionDetail, error)
EvalJQBoolWithDetailAndVars evaluates a JQ expression with optional variables. Variables is a map of variable names to values (e.g., map[string]any{"_headers": {...}}).
Click to show internal directories.
Click to hide internal directories.