jq

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateInstalled added in v0.1.3

func ValidateInstalled()

Types

type JQ

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

func New

func New(filter string) JQ

func NewWithOptions

func NewWithOptions(filter string, timeout time.Duration, options []JQOpt) JQ

func (*JQ) Commandline

func (jq *JQ) Commandline() string

func (*JQ) Filter

func (jq *JQ) Filter() string

func (*JQ) Options

func (jq *JQ) Options() []string

func (*JQ) Run

func (jq *JQ) Run(json []byte) ([]byte, *JQError)

func (*JQ) Validate

func (jq *JQ) Validate(json []byte) *JQError

type JQError

type JQError struct {
	Message string
	Type    JQErrorType
}

func (*JQError) Error

func (e *JQError) Error() string

type JQErrorType

type JQErrorType int
const (
	EmptyFilter JQErrorType = iota
	BadOptions
	BadFilter
	BadJSON
	BadExcution
	Unknown
)

type JQOpt

type JQOpt struct {
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
}

Jump to

Keyboard shortcuts

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