Documentation
¶
Overview ¶
* Copyright (c) 2015 The heedy Contributors (see AUTHORS) Licensed under the MIT license. *
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewArrayReader ¶
func NewArrayReader(r io.Reader) (*pipescript.DatapointArrayIterator, error)
Types ¶
type CSVDatapointReader ¶
type CSVDatapointReader struct {
// contains filtered or unexported fields
}
CSVDatapointReader is a reader for CSV files
func NewCSVDatapointReader ¶
func NewCSVDatapointReader(r io.Reader, timestamphint string, disabletimestamp bool) (*CSVDatapointReader, error)
NewCSVDatapointReader creates a new reader for CSV files, using the optional timestamp key hint and optional disabling of timestamp
func (*CSVDatapointReader) Next ¶
func (r *CSVDatapointReader) Next(out *pipescript.Datapoint) (*pipescript.Datapoint, error)
Next allows us to conform to the DatapointIterator interface
type DatapointGenerator ¶
type DatapointGenerator struct {
// contains filtered or unexported fields
}
DatapointGenerator converts a map of data to a datapoint, making sure that the associated timestamp is correctly parsed and converted. It modifies the map during execution
func EmptyDatapointGenerator ¶
func EmptyDatapointGenerator() *DatapointGenerator
EmptyDatapointGenerator returns datapoints without timestamps. For use on datasets which do not have timestamps defined
func NewDatapointGenerator ¶
func NewDatapointGenerator(sampledata map[string]interface{}, keyhint string) (*DatapointGenerator, error)
NewDatapointGenerator creates a new generator
func (*DatapointGenerator) Generate ¶
func (t *DatapointGenerator) Generate(data map[string]interface{}) (*pipescript.Datapoint, error)
Generate performs the generation of datapoint
type DatapointReader ¶
type DatapointReader struct {
// contains filtered or unexported fields
}
DatapointReader
func NewDatapointReader ¶
func NewDatapointReader(r io.Reader) (*DatapointReader, error)
func (*DatapointReader) Next ¶
func (r *DatapointReader) Next(out *pipescript.Datapoint) (*pipescript.Datapoint, error)
Next allows us to conform to the DatapointIterator interface
type JSONDatapointReader ¶
type JSONDatapointReader struct {
// contains filtered or unexported fields
}
JSONDatapointReader
func NewJSONDatapointReader ¶
func NewJSONDatapointReader(r io.Reader, timestamphint string, disabletimestamp bool) (*JSONDatapointReader, error)
NewJSONDatapointReader creates a new readed for JSON files, using the optional timestamp key hint and optional disabling of timestamp
func (*JSONDatapointReader) Next ¶
func (r *JSONDatapointReader) Next(out *pipescript.Datapoint) (*pipescript.Datapoint, error)
Next allows us to conform to the DatapointIterator interface
type JsonReader ¶
type JsonReader struct { Separator []byte // The separator to use between datapoints Ender []byte // contains filtered or unexported fields }
JsonReader imitates an io.Reader interface
func NewJsonArrayReader ¶
func NewJsonArrayReader(data pipescript.Iterator) (*JsonReader, error)
NewJsonArrayReader creates a new json array reader object. Allows using a RangeReader as an io.Reader type which outputs json. This reads the DataRange as a json array. (ie, [{},[],])
func NewJsonReader ¶
func NewJsonReader(data pipescript.Iterator, starter, separator, footer, preindent, indent string) (*JsonReader, error)
NewJsonReader creates a JsonReader with the given separator