enc

package
v0.0.0-...-7f7bbd0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSchema error = errors.New("invalid schema")
	ErrInvalidField  error = errors.New("invalid field")
)
View Source
var DefaultSchemaToLinesToStdoutDefault func(
	iter.Seq[string],
) IO[Void] = SchemaToLinesToStdoutDefault(string(la.SchemaDefault))

Functions

func CodecConv

func CodecConv(c la.Codec) ho.CodecName

func ConfigToOpts

func ConfigToOpts(cfg la.EncodeConfig) []ho.EncoderFunc

func LinesToStdout

func LinesToStdout(
	ctx context.Context,
	lines iter.Seq[string],
	schema string,
	cfg la.EncodeConfig,
) error

func LinesToStdoutDefault

func LinesToStdoutDefault(
	ctx context.Context,
	lines iter.Seq[string],
	schema string,
) error

func LinesToWriter

func LinesToWriter(
	ctx context.Context,
	lines iter.Seq[string],
	w io.Writer,
	schema string,
	cfg la.EncodeConfig,
) error

func LinesToWriterHamba

func LinesToWriterHamba(
	ctx context.Context,
	lines iter.Seq[string],
	w io.Writer,
	s ha.Schema,
	opts ...ho.EncoderFunc,
) error

func LinesToWriterRecordSchema

func LinesToWriterRecordSchema(
	ctx context.Context,
	lines iter.Seq[string],
	w io.Writer,
	rs *ha.RecordSchema,
	opts ...ho.EncoderFunc,
) error

func MapsToStdout

func MapsToStdout(
	ctx context.Context,
	m iter.Seq2[map[string]any, error],
	schema string,
	cfg la.EncodeConfig,
) error

func MapsToStdoutDefault

func MapsToStdoutDefault(
	ctx context.Context,
	m iter.Seq2[map[string]any, error],
	schema string,
) error

func MapsToWriter

func MapsToWriter(
	ctx context.Context,
	m iter.Seq2[map[string]any, error],
	w io.Writer,
	schema string,
	cfg la.EncodeConfig,
) error

func MapsToWriterHamba

func MapsToWriterHamba(
	ctx context.Context,
	m iter.Seq2[map[string]any, error],
	w io.Writer,
	s ha.Schema,
	opts ...ho.EncoderFunc,
) error

func SchemaToLinesToStdoutDefault

func SchemaToLinesToStdoutDefault(
	schema string,
) func(iter.Seq[string]) IO[Void]

func SchemaToMapsToStdoutDefault

func SchemaToMapsToStdoutDefault(
	schema string,
) func(iter.Seq2[map[string]any, error]) IO[Void]

Types

This section is empty.

Jump to

Keyboard shortcuts

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