Documentation ¶
Overview ¶
Package tsdata provides tools to manage TSData files. See https://github.com/armbrustlab/tsdataformat for a description of TSData files.
Index ¶
Constants ¶
const Delim = "\t"
Delim is the field separator string
const HeaderSize = 7
HeaderSize is the number of lines in a header section
const NA = "NA"
NA is the string used to represent missing data
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶ added in v0.2.0
Data holds validated information for one TSDATA file line, with the original column strings in Fields and time in Time.
type Tsdata ¶
type Tsdata struct { FileType string Project string FileDescription string Comments []string Types []string Units []string Headers []string // contains filtered or unexported fields }
Tsdata defines a TSData file
func (*Tsdata) ParseHeader ¶
ParseHeader parses and validates header metadata. Input should a string of all lines in the file's header section.
func (*Tsdata) ValidateLine ¶
ValidateLine checks values in a data line and returns all fields as a slice of strings. It returns an error for the first field that fails validation. It also returns an error if the timestamp in this line is earlier than the timestamp in the last line validated by this struct.
func (*Tsdata) ValidateMetadata ¶
ValidateMetadata checks for errors and inconsistencies in metadata values.