examples

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVFormat added in v1.0.3

type CSVFormat[T any] struct {
	// contains filtered or unexported fields
}

func (CSVFormat[T]) Reader added in v1.0.3

func (m CSVFormat[T]) Reader(ctx context.Context, r io.Reader) (CSVReader[T], error)

func (CSVFormat[T]) Writer added in v1.0.3

func (m CSVFormat[T]) Writer(ctx context.Context, w io.Writer) (CSVWriter[T], error)

type CSVReader

type CSVReader[T any] struct {
	// contains filtered or unexported fields
}

func (CSVReader[T]) Close

func (r CSVReader[T]) Close(ctx context.Context, err error) error

func (CSVReader[T]) Read

func (r CSVReader[T]) Read(ctx context.Context) (T, error)

type CSVWriter

type CSVWriter[T any] struct {
	// contains filtered or unexported fields
}

func (CSVWriter[T]) Close

func (r CSVWriter[T]) Close(ctx context.Context, err error) error

func (CSVWriter[T]) Write

func (r CSVWriter[T]) Write(ctx context.Context, row T) error

type JSONLinesFormat added in v1.0.3

type JSONLinesFormat[T any] struct{}

jsonLinesFormat simply writes JSON lines, leveraging the json package.

func (JSONLinesFormat[T]) Reader added in v1.0.3

func (m JSONLinesFormat[T]) Reader(ctx context.Context, r io.Reader) (JSONLinesReader[T], error)

func (JSONLinesFormat[T]) Writer added in v1.0.3

func (m JSONLinesFormat[T]) Writer(ctx context.Context, w io.Writer) (JSONLinesWriter[T], error)

type JSONLinesReader

type JSONLinesReader[T any] struct {
	// contains filtered or unexported fields
}

func (JSONLinesReader[T]) Close

func (r JSONLinesReader[T]) Close(ctx context.Context, err error) error

func (JSONLinesReader[T]) Read

func (r JSONLinesReader[T]) Read(ctx context.Context) (T, error)

type JSONLinesWriter

type JSONLinesWriter[T any] struct {
	// contains filtered or unexported fields
}

func (JSONLinesWriter[T]) Close

func (r JSONLinesWriter[T]) Close(ctx context.Context, err error) error

func (JSONLinesWriter[T]) Write

func (w JSONLinesWriter[T]) Write(ctx context.Context, row T) error

Jump to

Keyboard shortcuts

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