Documentation
¶
Index ¶
- Variables
- type ArrayDecodeValue
- func (dvb ArrayDecodeValue) DecodeValue() *decode.Value
- func (dvb ArrayDecodeValue) Display(w io.Writer, opts Options) error
- func (dvb ArrayDecodeValue) ExtKeys() []string
- func (ArrayDecodeValue) ExtType() string
- func (v ArrayDecodeValue) JQValueEach() interface{}
- func (v ArrayDecodeValue) JQValueHas(key interface{}) interface{}
- func (v ArrayDecodeValue) JQValueIndex(index int) interface{}
- func (v ArrayDecodeValue) JQValueKey(name string) interface{}
- func (v ArrayDecodeValue) JQValueKeys() interface{}
- func (v ArrayDecodeValue) JQValueLength() interface{}
- func (v ArrayDecodeValue) JQValueSlice(start int, end int) interface{}
- func (v ArrayDecodeValue) JQValueSliceLen() interface{}
- func (v ArrayDecodeValue) JQValueToGoJQ() interface{}
- func (v ArrayDecodeValue) JQValueUpdate(key interface{}, u interface{}, delpath bool) interface{}
- func (dvb ArrayDecodeValue) ToBinary() (Binary, error)
- type Binary
- func (b Binary) Display(w io.Writer, opts Options) error
- func (Binary) ExtKeys() []string
- func (Binary) ExtType() string
- func (b Binary) JQValueEach() interface{}
- func (b Binary) JQValueHas(key interface{}) interface{}
- func (b Binary) JQValueIndex(index int) interface{}
- func (b Binary) JQValueKey(name string) interface{}
- func (b Binary) JQValueKeys() interface{}
- func (b Binary) JQValueLength() interface{}
- func (b Binary) JQValueSlice(start int, end int) interface{}
- func (b Binary) JQValueSliceLen() interface{}
- func (b Binary) JQValueToGoJQ() interface{}
- func (b Binary) JQValueToNumber() interface{}
- func (b Binary) JQValueToString() interface{}
- func (b Binary) JQValueType() string
- func (b Binary) JQValueUpdate(key interface{}, u interface{}, delpath bool) interface{}
- func (b Binary) ToBinary() (Binary, error)
- type DecodeValue
- type Decorator
- type Display
- type EvalOpts
- type Exiter
- type FileReader
- type FixedFileInfo
- type Function
- type Input
- type Interp
- func (i *Interp) Eval(ctx context.Context, c interface{}, expr string, opts EvalOpts) (gojq.Iter, error)
- func (i *Interp) EvalFunc(ctx context.Context, c interface{}, name string, args []interface{}, ...) (gojq.Iter, error)
- func (i *Interp) EvalFuncValues(ctx context.Context, c interface{}, name string, args []interface{}, ...) ([]interface{}, error)
- func (i *Interp) Main(ctx context.Context, output Output, versionStr string) error
- func (i *Interp) NewColorJSON(opts Options) (*colorjson.Encoder, error)
- func (i *Interp) Options(v interface{}) Options
- func (i *Interp) Stop()
- type IsEmptyErrorer
- type JQValueEx
- type OS
- type Options
- type Output
- type Platform
- type ReadlineOpts
- type RunMode
- type StructDecodeValue
- func (dvb StructDecodeValue) DecodeValue() *decode.Value
- func (dvb StructDecodeValue) Display(w io.Writer, opts Options) error
- func (dvb StructDecodeValue) ExtKeys() []string
- func (StructDecodeValue) ExtType() string
- func (v StructDecodeValue) JQValueEach() interface{}
- func (v StructDecodeValue) JQValueHas(key interface{}) interface{}
- func (v StructDecodeValue) JQValueKey(name string) interface{}
- func (v StructDecodeValue) JQValueKeys() interface{}
- func (v StructDecodeValue) JQValueLength() interface{}
- func (v StructDecodeValue) JQValueSliceLen() interface{}
- func (v StructDecodeValue) JQValueToGoJQ() interface{}
- func (v StructDecodeValue) JQValueUpdate(key interface{}, u interface{}, delpath bool) interface{}
- func (dvb StructDecodeValue) ToBinary() (Binary, error)
- type Terminal
- type ToBinary
- type Value
- type Variable
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEOF = io.EOF
View Source
var ErrInterrupt = errors.New("Interrupt")
Functions ¶
This section is empty.
Types ¶
type ArrayDecodeValue ¶
type ArrayDecodeValue struct {
gojqextra.Base
*decode.Compound
// contains filtered or unexported fields
}
func NewArrayDecodeValue ¶
func NewArrayDecodeValue(dv *decode.Value, c *decode.Compound) ArrayDecodeValue
func (ArrayDecodeValue) DecodeValue ¶
func (ArrayDecodeValue) JQValueEach ¶
func (v ArrayDecodeValue) JQValueEach() interface{}
func (ArrayDecodeValue) JQValueHas ¶
func (v ArrayDecodeValue) JQValueHas(key interface{}) interface{}
func (ArrayDecodeValue) JQValueIndex ¶
func (v ArrayDecodeValue) JQValueIndex(index int) interface{}
func (ArrayDecodeValue) JQValueKey ¶
func (v ArrayDecodeValue) JQValueKey(name string) interface{}
func (ArrayDecodeValue) JQValueKeys ¶
func (v ArrayDecodeValue) JQValueKeys() interface{}
func (ArrayDecodeValue) JQValueLength ¶
func (v ArrayDecodeValue) JQValueLength() interface{}
func (ArrayDecodeValue) JQValueSlice ¶
func (v ArrayDecodeValue) JQValueSlice(start int, end int) interface{}
func (ArrayDecodeValue) JQValueSliceLen ¶
func (v ArrayDecodeValue) JQValueSliceLen() interface{}
func (ArrayDecodeValue) JQValueToGoJQ ¶
func (v ArrayDecodeValue) JQValueToGoJQ() interface{}
func (ArrayDecodeValue) JQValueUpdate ¶
func (v ArrayDecodeValue) JQValueUpdate(key interface{}, u interface{}, delpath bool) interface{}
type Binary ¶ added in v0.0.5
type Binary struct {
// contains filtered or unexported fields
}
func (Binary) JQValueEach ¶ added in v0.0.5
func (b Binary) JQValueEach() interface{}
func (Binary) JQValueHas ¶ added in v0.0.5
func (b Binary) JQValueHas(key interface{}) interface{}
func (Binary) JQValueIndex ¶ added in v0.0.5
func (Binary) JQValueKey ¶ added in v0.0.5
func (Binary) JQValueKeys ¶ added in v0.0.5
func (b Binary) JQValueKeys() interface{}
func (Binary) JQValueLength ¶ added in v0.0.5
func (b Binary) JQValueLength() interface{}
func (Binary) JQValueSlice ¶ added in v0.0.5
func (Binary) JQValueSliceLen ¶ added in v0.0.5
func (b Binary) JQValueSliceLen() interface{}
func (Binary) JQValueToGoJQ ¶ added in v0.0.5
func (b Binary) JQValueToGoJQ() interface{}
func (Binary) JQValueToNumber ¶ added in v0.0.5
func (b Binary) JQValueToNumber() interface{}
func (Binary) JQValueToString ¶ added in v0.0.5
func (b Binary) JQValueToString() interface{}
func (Binary) JQValueType ¶ added in v0.0.5
func (Binary) JQValueUpdate ¶ added in v0.0.5
type DecodeValue ¶
TODO: redo/rename used by _isDecodeValue
type Decorator ¶
type Decorator struct {
Null ansi.Code
False ansi.Code
True ansi.Code
Number ansi.Code
String ansi.Code
ObjectKey ansi.Code
Array ansi.Code
Object ansi.Code
Index ansi.Code
Value ansi.Code
DumpHeader ansi.Code
DumpAddr ansi.Code
Error ansi.Code
ValueColor func(v interface{}) ansi.Code
ByteColor func(b byte) ansi.Code
Column string
}
type Exiter ¶
type Exiter interface {
ExitCode() int
}
gojq errors can implement this to signal exit code
type FileReader ¶
type FileReader struct {
R io.Reader
FileInfo FixedFileInfo
}
func (FileReader) Close ¶
func (FileReader) Close() error
type FixedFileInfo ¶
type FixedFileInfo struct {
FName string
FSize int64
FMode fs.FileMode
FModTime time.Time
FIsDir bool
FSys interface{}
}
func (FixedFileInfo) IsDir ¶
func (ffi FixedFileInfo) IsDir() bool
func (FixedFileInfo) ModTime ¶
func (ffi FixedFileInfo) ModTime() time.Time
func (FixedFileInfo) Mode ¶
func (ffi FixedFileInfo) Mode() fs.FileMode
func (FixedFileInfo) Name ¶
func (ffi FixedFileInfo) Name() string
func (FixedFileInfo) Size ¶
func (ffi FixedFileInfo) Size() int64
func (FixedFileInfo) Sys ¶
func (ffi FixedFileInfo) Sys() interface{}
type Interp ¶
type Interp struct {
// contains filtered or unexported fields
}
func (*Interp) EvalFuncValues ¶
func (*Interp) NewColorJSON ¶
type IsEmptyErrorer ¶
type IsEmptyErrorer interface {
IsEmptyError() bool
}
gojq halt_error uses this
type OS ¶
type OS interface {
Platform() Platform
Stdin() Input
Stdout() Output
Stderr() Output
InterruptChan() chan struct{}
Args() []string
Environ() []string
ConfigDir() (string, error)
// FS.File returned by FS().Open() can optionally implement io.Seeker
FS() fs.FS
Readline(opts ReadlineOpts) (string, error)
History() ([]string, error)
}
type Options ¶
type Options struct {
Depth int `mapstructure:"depth"`
ArrayTruncate int `mapstructure:"array_truncate"`
Verbose bool `mapstructure:"verbose"`
DecodeProgress bool `mapstructure:"decode_progress"`
Color bool `mapstructure:"color"`
Colors string `mapstructure:"colors"`
ByteColors string `mapstructure:"byte_colors"`
Unicode bool `mapstructure:"unicode"`
RawOutput bool `mapstructure:"raw_output"`
REPL bool `mapstructure:"repl"`
RawString bool `mapstructure:"raw_string"`
JoinString string `mapstructure:"join_string"`
Compact bool `mapstructure:"compact"`
BitsFormat string `mapstructure:"bits_format"`
LineBytes int `mapstructure:"line_bytes"`
DisplayBytes int `mapstructure:"display_bytes"`
AddrBase int `mapstructure:"addrbase"`
SizeBase int `mapstructure:"sizebase"`
Decorator Decorator
BitsFormatFn func(br bitio.ReaderAtSeeker) (interface{}, error)
}
type ReadlineOpts ¶ added in v0.0.5
type StructDecodeValue ¶
type StructDecodeValue struct {
gojqextra.Base
*decode.Compound
// contains filtered or unexported fields
}
func NewStructDecodeValue ¶
func NewStructDecodeValue(dv *decode.Value, c *decode.Compound) StructDecodeValue
func (StructDecodeValue) DecodeValue ¶
func (StructDecodeValue) JQValueEach ¶
func (v StructDecodeValue) JQValueEach() interface{}
func (StructDecodeValue) JQValueHas ¶
func (v StructDecodeValue) JQValueHas(key interface{}) interface{}
func (StructDecodeValue) JQValueKey ¶
func (v StructDecodeValue) JQValueKey(name string) interface{}
func (StructDecodeValue) JQValueKeys ¶
func (v StructDecodeValue) JQValueKeys() interface{}
func (StructDecodeValue) JQValueLength ¶
func (v StructDecodeValue) JQValueLength() interface{}
func (StructDecodeValue) JQValueSliceLen ¶
func (v StructDecodeValue) JQValueSliceLen() interface{}
func (StructDecodeValue) JQValueToGoJQ ¶
func (v StructDecodeValue) JQValueToGoJQ() interface{}
func (StructDecodeValue) JQValueUpdate ¶
func (v StructDecodeValue) JQValueUpdate(key interface{}, u interface{}, delpath bool) interface{}
Click to show internal directories.
Click to hide internal directories.