jq

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package jq provides compatibility with JQ queries for working with streams of JSON data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pipeline

func Pipeline(query string) pipeline.Pipeline

Pipeline builds a JQ query for a pipeline that runs the query against each line and maps the result to the output.

func PipelineContext added in v0.9.0

func PipelineContext(ctx context.Context, query string) pipeline.Pipeline

PipelineContext is the same as Pipeline, but runs the generated JQ code in the given context.

func Query

func Query(data io.Reader, query string) ([]byte, error)

Query is a utility for building and executing a JQ query against some data, such as a streamline.Stream instance.

func QueryContext added in v0.9.0

func QueryContext(ctx context.Context, data io.Reader, query string) ([]byte, error)

QueryContext is the same as Query, but runs the generated JQ code in the given context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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