loaders

package
v0.1.9-0...-deb25a2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDelimiter

func ParseDelimiter(delim string, skip bool) string

ParseDelimiter parses the delimiter for an escape sequence. This allows windows users to pass in \t since they cannot pass "`t" or "$Tab" to the program.

Types

type CSVLoader

type CSVLoader struct {
	SkipHeader       bool
	SkipParseHeader  bool
	Fields           string
	Delimiter        string
	Excel            bool
	NullDelimiter    string
	SkipSanitization bool
	// contains filtered or unexported fields
}

CSVLoader ...

func DefaultCSVLoader

func DefaultCSVLoader() *CSVLoader

DefaultCSVLoader ..

func (CSVLoader) Create

func (csvl CSVLoader) Create(reader io.Reader, skipSanitization bool) ImportLoader

Create ...

func (*CSVLoader) Describe

func (csvl *CSVLoader) Describe() string

Describe ...

func (*CSVLoader) Finish

func (csvl *CSVLoader) Finish() error

Finish ...

func (*CSVLoader) Load

func (csvl *CSVLoader) Load() (entry map[string]interface{}, err error)

Load ...

func (*CSVLoader) Start

func (csvl *CSVLoader) Start() error

Start ...

type ImportLoader

type ImportLoader interface {
	Load() (map[string]interface{}, error)
	Start() error
	Finish() error
	Describe() string
	Create(reader io.Reader, sanitize bool) ImportLoader
}

ImportLoader ...

type Loader

type Loader struct {
	File           string
	SpecificLoader ImportLoader

	Bar              *uiprogress.Bar
	SkipSanitization bool
	// contains filtered or unexported fields
}

Loader ...

func (*Loader) Create

func (l *Loader) Create(file string) (*Loader, error)

Create ...

func (*Loader) Describe

func (l *Loader) Describe() string

Describe ..

func (*Loader) Finish

func (l *Loader) Finish() error

Finish ...

func (*Loader) GetProgress

func (l *Loader) GetProgress() (int64, int64)

GetProgress ..

func (*Loader) Load

func (l *Loader) Load() (map[string]interface{}, error)

Load ...

func (*Loader) Start

func (l *Loader) Start() error

Start ...

func (*Loader) UpdateProgress

func (l *Loader) UpdateProgress()

UpdateProgress ...

func (*Loader) Write

func (l *Loader) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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