csv

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format uint
const (
	RowIDColumnID Format = iota
	RowIDColumnKey
	RowKeyColumnID
	RowKeyColumnKey
	ColumnID
	ColumnKey
)

type Iterator

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

Iterator reads records from a Reader. Each line should contain a single record in the following form: field1,field2,...

func NewColumnIterator

func NewColumnIterator(format Format, reader io.Reader) *Iterator

func NewColumnIteratorWithTimestampFormat

func NewColumnIteratorWithTimestampFormat(format Format, reader io.Reader, timestampFormat string) *Iterator

func NewIterator

func NewIterator(reader io.Reader, unmarshaller RecordUnmarshaller) *Iterator

NewIterator creates a CSVIterator from a Reader.

func NewValueIterator

func NewValueIterator(format Format, reader io.Reader) *Iterator

func (*Iterator) NextRecord

func (c *Iterator) NextRecord() (pilosa.Record, error)

NextRecord iterates on lines of a Reader. Returns io.EOF on end of iteration.

type RecordUnmarshaller

type RecordUnmarshaller func(text string) (pilosa.Record, error)

func ColumnUnmarshaller

func ColumnUnmarshaller(format Format) RecordUnmarshaller

func ColumnUnmarshallerWithTimestamp

func ColumnUnmarshallerWithTimestamp(format Format, timestampFormat string) RecordUnmarshaller

func FieldValueUnmarshaller

func FieldValueUnmarshaller(format Format) RecordUnmarshaller

Jump to

Keyboard shortcuts

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