Documentation ¶
Index ¶
- func CompressedCsvReader(path string, readerHandler func(reader *csv.Reader) error, opts ...CsvOption) error
- func CompressedCsvWriter(path string, writerHandler func(writer *csv.Writer) error, opts ...CsvOption) error
- func GetTempFilePath() (string, error)
- func NewCsvReader(r io.Reader) *csv.Reader
- func NewCsvWriter(w io.Writer) *csv.Writer
- func OpenTempFile() (io.WriteCloser, string, error)
- func Pipeline(src chan interface{}, pipes ...Pipe) chan interface{}
- func ReadAllLines(csvReader *csv.Reader, batchSize int, ...) error
- func SplitEntityName(fullName, entityType string) (string, int32, error)
- type Batcher
- type CsvOption
- type JsonUnmarshaler
- func (u *JsonUnmarshaler) Goroutines(count int) *JsonUnmarshaler
- func (u *JsonUnmarshaler) Map(src chan interface{}) chan interface{}
- func (u *JsonUnmarshaler) OnError(f func(err error)) *JsonUnmarshaler
- func (u *JsonUnmarshaler) Unmarshal(unmarshal func(bytes []byte, ptr interface{}) error) *JsonUnmarshaler
- type LineScanner
- type Pipe
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressedCsvReader ¶ added in v1.5.1
func CompressedCsvWriter ¶ added in v1.5.1
func GetTempFilePath ¶ added in v1.5.1
func OpenTempFile ¶ added in v1.5.1
func OpenTempFile() (io.WriteCloser, string, error)
func ReadAllLines ¶
Types ¶
type CsvOption ¶ added in v1.9.0
type CsvOption func(opts *csvOpts)
func WithCloseErrorHandler ¶ added in v1.9.0
func WithSeparator ¶ added in v1.9.0
type JsonUnmarshaler ¶
type JsonUnmarshaler struct {
// contains filtered or unexported fields
}
func NewJsonUnmarshaler ¶
func NewJsonUnmarshaler(makePtr func() interface{}) *JsonUnmarshaler
func (*JsonUnmarshaler) Goroutines ¶
func (u *JsonUnmarshaler) Goroutines(count int) *JsonUnmarshaler
func (*JsonUnmarshaler) Map ¶
func (u *JsonUnmarshaler) Map(src chan interface{}) chan interface{}
func (*JsonUnmarshaler) OnError ¶
func (u *JsonUnmarshaler) OnError(f func(err error)) *JsonUnmarshaler
func (*JsonUnmarshaler) Unmarshal ¶
func (u *JsonUnmarshaler) Unmarshal(unmarshal func(bytes []byte, ptr interface{}) error) *JsonUnmarshaler
type LineScanner ¶
type LineScanner struct {
// contains filtered or unexported fields
}
func NewLineScanner ¶
func NewLineScanner(filePattern string, maxBuffSize int) *LineScanner
func (*LineScanner) Lines ¶
func (s *LineScanner) Lines() chan interface{}
func (*LineScanner) OnError ¶
func (s *LineScanner) OnError(f func(err error)) *LineScanner
func (*LineScanner) Reader ¶
func (s *LineScanner) Reader(makeReader func(f *os.File) (io.Reader, error)) *LineScanner
func (*LineScanner) Run ¶
func (s *LineScanner) Run() []Result
iterate from 0 to n, replace index in 'filePattern' and tries to read file it closes channel 'ch' and return if file is not exists
func (*LineScanner) Skip ¶
func (s *LineScanner) Skip(lineCount int) *LineScanner
Click to show internal directories.
Click to hide internal directories.