walk

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: BSD-3-Clause Imports: 12 Imported by: 17

Documentation

Overview

package walk provides methods for walking all in the records in a line-delimited JSON document.

Index

Constants

View Source
const CONTEXT_PATH string = "github.com/aaronland/go-jsonl#path"

Variables

This section is empty.

Functions

func IsEOFError added in v0.0.7

func IsEOFError(err error) bool

func WalkBucket

func WalkBucket(ctx context.Context, opts *WalkOptions, bucket *blob.Bucket) error

func WalkReader

func WalkReader(ctx context.Context, opts *WalkOptions, fh io.Reader)

Types

type WalkError

type WalkError struct {
	Path       string
	LineNumber int
	Err        error
}

func (*WalkError) Error

func (e *WalkError) Error() string

func (*WalkError) String

func (e *WalkError) String() string

type WalkFilterFunc added in v0.0.11

type WalkFilterFunc func(context.Context, string) bool

type WalkOptions

type WalkOptions struct {
	URI                  string
	Workers              int
	RecordChannel        chan *WalkRecord
	ErrorChannel         chan *WalkError
	DoneChannel          chan bool
	SendCompletedChannel bool
	ValidateJSON         bool
	FormatJSON           bool
	QuerySet             *query.QuerySet
	IsBzip               bool
	Filter               WalkFilterFunc
}

type WalkRecord

type WalkRecord struct {
	Path             string
	LineNumber       int
	Body             []byte
	CompletedChannel chan bool
}

Jump to

Keyboard shortcuts

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