jq

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDelFunc          = errors.New("del function is not allowed")
	ErrRecursiveDescent = errors.New("recursive descent operator '..' is not allowed")
)

Functions

func ValidateJQExpressions

func ValidateJQExpressions(object any) []error

ValidateJQExpressions recursively validates all the fields of the object tagged with 'jq:"validate"'

func ValidateParsedJQ added in v0.1.0

func ValidateParsedJQ(q *gojq.Query) error

ValidateParsedJQ checks that a parsed JQ query is safe for read-only use. It rejects assignment operators, del, dangerous recursive/unbounded built-ins, and the recursive descent operator.

The walk is reflection-driven so it automatically covers any new node types added by future gojq versions — no manual field enumeration needed.

Types

This section is empty.

Directories

Path Synopsis
Package execution is a generated GoMock package.
Package execution is a generated GoMock package.

Jump to

Keyboard shortcuts

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