json

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutputFormatter

type OutputFormatter struct {
	OutputIndividualRows bool
	OutputFile           string
	OutputFileTemplate   string
	OutputMultipleFiles  bool
}

func NewOutputFormatter

func NewOutputFormatter(options ...OutputFormatterOption) *OutputFormatter

func (*OutputFormatter) ContentType added in v0.2.84

func (f *OutputFormatter) ContentType() string

func (*OutputFormatter) Output

func (f *OutputFormatter) Output(ctx context.Context, table_ *types.Table, w io.Writer) error

func (*OutputFormatter) RegisterMiddlewares added in v0.3.0

func (f *OutputFormatter) RegisterMiddlewares(mw *middlewares.Processor) error

type OutputFormatterOption

type OutputFormatterOption func(*OutputFormatter)

func WithOutputFile

func WithOutputFile(file string) OutputFormatterOption

func WithOutputFileTemplate

func WithOutputFileTemplate(outputFileTemplate string) OutputFormatterOption

func WithOutputIndividualRows

func WithOutputIndividualRows(outputIndividualRows bool) OutputFormatterOption

func WithOutputMultipleFiles

func WithOutputMultipleFiles(outputMultipleFiles bool) OutputFormatterOption

type RowOutputFormatter added in v0.3.0

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

RowOutputFormatter is a streaming formatter that can only output individual rows as dictionaries.

func NewRowOutputFormatter added in v0.3.0

func NewRowOutputFormatter(options ...RowOutputFormatterOption) *RowOutputFormatter

func (*RowOutputFormatter) ContentType added in v0.3.0

func (r *RowOutputFormatter) ContentType() string

func (*RowOutputFormatter) Output added in v0.3.0

func (r *RowOutputFormatter) Output(ctx context.Context, row types.Row, w io.Writer) error

func (*RowOutputFormatter) RegisterMiddlewares added in v0.3.0

func (r *RowOutputFormatter) RegisterMiddlewares(mw *middlewares.Processor) error

type RowOutputFormatterOption added in v0.3.0

type RowOutputFormatterOption func(*RowOutputFormatter)

func WithIndent added in v0.3.0

func WithIndent(indent string) RowOutputFormatterOption

Jump to

Keyboard shortcuts

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