model

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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UInt8 = DataType(iota)
	UInt16
	UInt32
	UInt64
	UInt256
	Int8
	Int16
	Int32
	Int64
	Int128
	Int256

	Float32
	Float64

	Decimal

	Boolean

	String
	FixedString

	UUID

	Date
	DateTime
	DateTime64

	Enum
	LowCardinality
	Array
	AggregateFunction
	Tuple
	Nullable
)

Variables

This section is empty.

Functions

func MarshalTimeseries

func MarshalTimeseries(ts timeseries.Timeseries, rlo *timeseries.RequestOptions, status int) ([]byte, error)

MarshalTimeseries converts a Timeseries into a JSON blob

func MarshalTimeseriesWriter

func MarshalTimeseriesWriter(ts timeseries.Timeseries,
	rlo *timeseries.RequestOptions, status int, w io.Writer,
) error

MarshalTimeseriesWriter converts a Timeseries into a JSON blob via an io.Writer

func NewModeler

func NewModeler() *timeseries.Modeler

NewModeler returns a collection of modeling functions for clickhouse interoperability

func UnmarshalTimeseries

func UnmarshalTimeseries(data []byte, trq *timeseries.TimeRangeQuery) (timeseries.Timeseries, error)

UnmarshalTimeseries converts a TSV blob into a Timeseries

func UnmarshalTimeseriesReader

func UnmarshalTimeseriesReader(reader io.Reader, trq *timeseries.TimeRangeQuery) (timeseries.Timeseries, error)

UnmarshalTimeseriesReader converts a TSV blob into a Timeseries via io.Reader

Types

type DataType

type DataType int

type WFData

type WFData []WFDataItem

WFData is the collection of data rows in the document

type WFDataItem

type WFDataItem []WFDataItemElement

WFDataItem is a slice of WFDataItemElements (aka a Row) in the WF Document

func (WFDataItem) MarshalJSON

func (d WFDataItem) MarshalJSON() ([]byte, error)

type WFDataItemElement

type WFDataItemElement struct {
	Key   string
	Value string
}

WFDataItemElement represents a data point and its value in the response.

type WFDocument

type WFDocument struct {
	Meta WFMeta `json:"meta"`
	Data WFData `json:"data"`
	Rows *int   `json:"rows"`
}

WFDocument is represents the Wire Format structure for ClickHouse

type WFMeta

type WFMeta []WFMetaItem

WFMeta is a slice of Metadata items in the Wire Format Document

type WFMetaItem

type WFMetaItem struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

WFMetaItem is a metadata attribute in the Wire Format Document

Jump to

Keyboard shortcuts

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