loaders

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 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 io.Reader, updateHandler io.Writer) (*Loader, error)

Create ...

func (*Loader) Describe

func (l *Loader) Describe() string

Describe ..

func (*Loader) Finish

func (l *Loader) Finish() error

Finish ...

func (*Loader) Load

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

Load ...

func (*Loader) Start

func (l *Loader) Start() error

Start ...

type XMLLoader

type XMLLoader struct {
	Config config.XMLReaderConfig
	// contains filtered or unexported fields
}

XMLLoader ...

func DefaultXMLLoader

func DefaultXMLLoader() *XMLLoader

DefaultXMLLoader ..

func (XMLLoader) Create

func (xmll XMLLoader) Create(reader io.Reader, skipSanitization bool) ImportLoader

Create ...

func (*XMLLoader) Describe

func (xmll *XMLLoader) Describe() string

Describe ...

func (*XMLLoader) Finish

func (xmll *XMLLoader) Finish() error

Finish ...

func (*XMLLoader) Load

func (xmll *XMLLoader) Load() (map[string]interface{}, error)

Load ...

func (*XMLLoader) Start

func (xmll *XMLLoader) Start() error

Start ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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