Documentation ¶
Overview ¶
Package input contains logic for parsing disk-file/standard-input byte streams into records.
Index ¶
- Constants
- type BOMStrippingReader
- type DefaultLineReader
- type ILineReader
- type IRecordReader
- func Create(readerOptions *cli.TReaderOptions, recordsPerBatch int64) (IRecordReader, error)
- func NewRecordReaderMarkdown(readerOptions *cli.TReaderOptions, recordsPerBatch int64) (IRecordReader, error)
- func NewRecordReaderPPRINT(readerOptions *cli.TReaderOptions, recordsPerBatch int64) (IRecordReader, error)
- type JSONCommentEnabledReader
- type MultiIRSLineReader
- type PseudoReaderGen
- type RecordReaderCSV
- type RecordReaderCSVLite
- type RecordReaderDKVPNIDX
- type RecordReaderJSON
- type RecordReaderPprintBarredOrMarkdown
- type RecordReaderTSV
- type RecordReaderXTAB
- type SingleIRSLineReader
- type WorkaroundBuffer
Constants ¶
View Source
const CSV_BOM = "\xef\xbb\xbf"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BOMStrippingReader ¶
type BOMStrippingReader struct {
// contains filtered or unexported fields
}
BOMStrippingReader implements io.Reader to strip leading byte-order-mark characters off of CSV data.
func NewBOMStrippingReader ¶
func NewBOMStrippingReader(underlying io.Reader) *BOMStrippingReader
type DefaultLineReader ¶
type DefaultLineReader struct {
// contains filtered or unexported fields
}
func (*DefaultLineReader) Read ¶
func (r *DefaultLineReader) Read() (string, error)
type ILineReader ¶
type ILineReader interface { // Read returns the string without the final newline (or whatever terminator). // The error condition io.EOF as non-error "error" case. // EOF is always returned with empty line: the code here is structured so that // we do not return a non-empty line along with an EOF indicator. Read() (string, error) }
func NewLineReader ¶
func NewLineReader(handle io.Reader, irs string) ILineReader
type IRecordReader ¶
type IRecordReader interface { Read( filenames []string, initialContext types.Context, readerChannel chan<- *list.List, errorChannel chan error, downstreamDoneChannel <-chan bool, ) }
func Create ¶
func Create(readerOptions *cli.TReaderOptions, recordsPerBatch int64) (IRecordReader, error)
func NewRecordReaderMarkdown ¶
func NewRecordReaderMarkdown( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (IRecordReader, error)
func NewRecordReaderPPRINT ¶
func NewRecordReaderPPRINT( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (IRecordReader, error)
type JSONCommentEnabledReader ¶
type JSONCommentEnabledReader struct {
// contains filtered or unexported fields
}
JSONCommentEnabledReader implements io.Reader to strip comment lines off of CSV data.
func NewJSONCommentEnabledReader ¶
func NewJSONCommentEnabledReader( underlying io.Reader, readerOptions *cli.TReaderOptions, readerChannel chan<- *list.List, ) *JSONCommentEnabledReader
type MultiIRSLineReader ¶
type MultiIRSLineReader struct {
// contains filtered or unexported fields
}
MultiIRSLineReader handles reading lines which may be delimited by multi-line separators, e.g. "\xe2\x90\x9e" for USV.
func (*MultiIRSLineReader) Read ¶
func (r *MultiIRSLineReader) Read() (string, error)
type PseudoReaderGen ¶
type PseudoReaderGen struct {
// contains filtered or unexported fields
}
func NewPseudoReaderGen ¶
func NewPseudoReaderGen( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (*PseudoReaderGen, error)
type RecordReaderCSV ¶
type RecordReaderCSV struct {
// contains filtered or unexported fields
}
----------------------------------------------------------------
func NewRecordReaderCSV ¶
func NewRecordReaderCSV( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (*RecordReaderCSV, error)
type RecordReaderCSVLite ¶
type RecordReaderCSVLite struct {
// contains filtered or unexported fields
}
func NewRecordReaderCSVLite ¶
func NewRecordReaderCSVLite( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (*RecordReaderCSVLite, error)
type RecordReaderDKVPNIDX ¶
type RecordReaderDKVPNIDX struct {
// contains filtered or unexported fields
}
func NewRecordReaderDKVP ¶
func NewRecordReaderDKVP( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (*RecordReaderDKVPNIDX, error)
func NewRecordReaderNIDX ¶
func NewRecordReaderNIDX( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (*RecordReaderDKVPNIDX, error)
type RecordReaderJSON ¶
type RecordReaderJSON struct {
// contains filtered or unexported fields
}
func NewRecordReaderJSON ¶
func NewRecordReaderJSON( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (*RecordReaderJSON, error)
type RecordReaderPprintBarredOrMarkdown ¶
type RecordReaderPprintBarredOrMarkdown struct {
// contains filtered or unexported fields
}
type RecordReaderTSV ¶
type RecordReaderTSV struct {
// contains filtered or unexported fields
}
func NewRecordReaderTSV ¶
func NewRecordReaderTSV( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (*RecordReaderTSV, error)
type RecordReaderXTAB ¶
type RecordReaderXTAB struct {
// contains filtered or unexported fields
}
func NewRecordReaderXTAB ¶
func NewRecordReaderXTAB( readerOptions *cli.TReaderOptions, recordsPerBatch int64, ) (*RecordReaderXTAB, error)
type SingleIRSLineReader ¶
type SingleIRSLineReader struct {
// contains filtered or unexported fields
}
SingleIRSLineReader handles reading lines with a single-character terminator.
func (*SingleIRSLineReader) Read ¶
func (r *SingleIRSLineReader) Read() (string, error)
type WorkaroundBuffer ¶
type WorkaroundBuffer struct {
// contains filtered or unexported fields
}
func NewWorkaroundBuffer ¶
func NewWorkaroundBuffer() WorkaroundBuffer
func (WorkaroundBuffer) String ¶
func (wb WorkaroundBuffer) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.