loader

package
v0.0.0-...-fc27e31 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnequalValues = errors.New("unequal value size")
View Source
var InvalidXLS = errors.New("Invalid XLS")

Functions

func Matrix

func Matrix(rower Rower, parsers map[int]parser.Parser) (*mtx.Dense, error)

func ReadPath

func ReadPath(opts Options) (*types.Dataset, error)

Types

type CSV

type CSV struct {
	Columns []string
	// contains filtered or unexported fields
}

func NewCSV

func NewCSV(reader io.Reader) (*CSV, error)

func (CSV) Dims

func (c CSV) Dims() (int, int)

func (*CSV) Row

func (c *CSV) Row() ([]string, error)

type Options

type Options struct {
	Name    string
	Path    string
	Enc     string
	Columns []string
	Sheet   string // Sheet name (XLS)
	Size    int64  // File Size (XLS)
	Parsers map[int]parser.Parser
}

func (*Options) Rower

func (opts *Options) Rower(fp *os.File) (Rower, error)

Rower returns a Rower based on the configured options

type Rower

type Rower interface {
	Row() ([]string, error)
	Dims() (int, int)
}

type XLS

type XLS struct {
	// contains filtered or unexported fields
}

func NewXLS

func NewXLS(reader io.ReaderAt, opts Options) (*XLS, error)

func (XLS) Dims

func (x XLS) Dims() (int, int)

func (*XLS) Row

func (x *XLS) Row() ([]string, error)

Jump to

Keyboard shortcuts

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