Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompiledJqFilter ¶ added in v1.15.3
type CompiledJqFilter struct {
// contains filtered or unexported fields
}
CompiledJqFilter holds a pre-compiled gojq program. Compile once and reuse across many Apply calls to eliminate repeated parse+compile overhead.
func Compile ¶ added in v1.15.3
func Compile(jqFilter string) (*CompiledJqFilter, error)
Compile parses and compiles jqFilter once. The returned *CompiledJqFilter is safe for concurrent use and can be reused for every event that carries the same filter expression.
func (*CompiledJqFilter) Apply ¶ added in v1.15.3
func (c *CompiledJqFilter) Apply(data map[string]any) ([]byte, error)
Apply executes the pre-compiled jq program against data.
func (*CompiledJqFilter) String ¶ added in v1.15.3
func (c *CompiledJqFilter) String() string
String returns the original jq filter expression for diagnostics.
type Filter ¶
type Filter struct{}
func (*Filter) ApplyFilter ¶
ApplyFilter runs jq expression provided in jqFilter with jsonData as input.
func (*Filter) FilterInfo ¶
Click to show internal directories.
Click to hide internal directories.