csv

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidFieldParserFunc     = errors.New("invalid Field Parser Function")
	ErrInvalidDataTypeParserFunc  = errors.New("invalid Data Type Parser Function")
	ErrInvalidTimestampParserFunc = errors.New("invalid Timestamp Parser Function")
)

Functions

This section is empty.

Types

type DataTypeParserFunc

type DataTypeParserFunc func(string) timeseries.FieldDataType

type FieldParserFunc

type FieldParserFunc func([][]string, *timeseries.TimeRangeQuery) (timeseries.SeriesFields, error)

type Parser

type Parser interface {
	ToDataSet([][]string, *timeseries.TimeRangeQuery) (*dataset.DataSet, error)
	ToTimeseries([][]string, *timeseries.TimeRangeQuery) (timeseries.Timeseries, error)
}

Parser represents a CSV-to-DataSet Parser

func NewParser

func NewParser(fp FieldParserFunc, dp DataTypeParserFunc,
	tp TimestampParserFunc, firstDataRow int,
) (Parser, error)

NewParser returns a concurrency-safe CSV parser

func NewParserMust

func NewParserMust(fp FieldParserFunc, dp DataTypeParserFunc,
	tp TimestampParserFunc, firstDataRow int,
) Parser

NewParserMust returns a concurrency-safe CSV parser or panics if the provided options are invalid

type TimestampParserFunc

type TimestampParserFunc func(string, timeseries.FieldDefinition) (epoch.Epoch, error)

Jump to

Keyboard shortcuts

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