# README

data

Testing

This package uses golden files to verify Arrow serialization.

Add the update flag to go test to update the golden files:

go test -update

Make sure you check in any updated golden files.

# Packages

Package converters provides data.FieldConverters commonly used by plugins.
Package framestruct provides functions to convert from any type to *data.Frame or data.Frames.
No description provided by the author

# Functions

ArrowBufferToJSON writes a frame to JSON NOTE: the format should be considered experimental until grafana 8 is released.
ArrowToJSON writes a frame to JSON NOTE: the format should be considered experimental until grafana 8 is released.
FieldTypeFor returns a concrete type for a given interface or unknown if not known.
FieldTypeFromItemTypeString returns a field type from the current stringnolint:goconst,gocyclo.
FrameMetaFromJSON creates a QueryResultMeta from a json string.
FrameTestCompareOptions returns go-cmp testing options to allow testing of Frame equivalence.
FrameToJSON creates an object that holds schema and data independently.
FrameToJSON creates an object that holds schema and data independently.
FrameTypes returns a slice of all known frame types.
FromArrowRecord converts a an Arrow record batch into a Frame.
FromArrowSchemaAndInterfaces converts an Arrow schema together with an Interface array into a Frame.
FromArrowSchemaIntoSeparateFrames converts each column in an Arrow schema into a separate Frame.
GetMissing returns the value to be filled for a missing row field.
LabelsFromString() parses string into a Label object.
LongToWide converts a Long formatted time series Frame to a Wide format (see TimeSeriesType for descriptions).
NewField returns a instance of *Field.
NewFieldFromFieldType creates a new Field of the given FieldType of length n.
NewFrame returns a new Frame.
NewFrameInputConverter returns a FrameInputConverter which is used to create a Frame from data that needs value conversions.
NewFrameOfFieldTypes returns a Frame where the Fields are initialized to the corresponding field type in fTypes.
NewThreshold Creates a new Threshold object.
NumericFieldTypes returns a slice of FieldTypes that are numeric.
SortWideFrameFields sorts the order of a wide time series Frame's Fields.
UnmarshalArrowFrame converts a byte representation of an arrow table to a Frame.
UnmarshalArrowFrames decodes a slice of Arrow encoded frames to Frames ([]*Frame) by calling the UnmarshalArrow function on each encoded frame.
ValidFieldType returns if a primitive slice is a valid supported Field type.
WideToLong converts a Wide formatted time series Frame to a Long formatted time series Frame (see TimeSeriesType for descriptions).

# Constants

DataTopicAnnotations is used to specify that the frame should be used as annotation of the actual data frame response.
ExplicitNullValue is the string representation for null.
FieldTypeBool indicates the underlying primitive is a []bool.
FieldTypeFloat32 indicates the underlying primitive is a []float32.
FieldTypeFloat64 indicates the underlying primitive is a []float64.
FieldTypeInt16 indicates the underlying primitive is a []int16.
FieldTypeInt32 indicates the underlying primitive is a []int32.
FieldTypeInt64 indicates the underlying primitive is a []int64.
FieldTypeInt8 indicates the underlying primitive is a []int8.
FieldTypeJSON indicates the underlying primitive is a []json.RawMessage.
FieldTypeNullableBool indicates the underlying primitive is a []*bool.
FieldTypeNullableFloat32 indicates the underlying primitive is a []*float32.
FieldTypeNullableFloat64 indicates the underlying primitive is a []*float64.
FieldTypeNullableInt16 indicates the underlying primitive is a []*int16.
FieldTypeNullableInt32 indicates the underlying primitive is a []*int32.
FieldTypeNullableInt64 indicates the underlying primitive is a []*int64.
FieldTypeNullableInt8 indicates the underlying primitive is a []*int8.
FieldTypeNullableJSON indicates the underlying primitive is a []*json.RawMessage.
FieldTypeNullableString indicates the underlying primitive is a []*string.
FieldTypeNullableTime indicates the underlying primitive is a []*time.Time.
FieldTypeNullableUint16 indicates the underlying primitive is a []*uint16.
FieldTypeNullableUint32 indicates the underlying primitive is a []*uint32.
FieldTypeNullableUint64 indicates the underlying primitive is a []*uint64.
FieldTypeNullableUint8 indicates the underlying primitive is a []*uint8.
FieldTypeString indicates the underlying primitive is a []string.
FieldTypeTime indicates the underlying primitive is a []time.Time.
FieldTypeUint16 indicates the underlying primitive is a []uint16.
FieldTypeUint32 indicates the underlying primitive is a []uint32.
FieldTypeUint64 indicates the underlying primitive is a []uint64.
FieldTypeUint8 indicates the underlying primitive is a []uint8.
FieldTypeUnknown indicates that we do not know the field type.
FillModeNull fills with null.
FillModePrevious fills with the last seen value unless that does not exist, in which case it fills with null.
FillModeValue fills with a specific value.
FrameTypeDirectoryListing represents the items in a directory field[0]: * name * new paths can be constructed from the parent path + separator + name field[1]: * media-type * when "directory" it can be nested.
FrameTypeTable represents an arbitrary table structure with no constraints.
FrameTypeTimeSeriesLong uses string fields to define dimensions.
FrameTypeTimeSeriesMany is the same as "Wide" with exactly one numeric value field field[0]: * type time * ascending values field[1]: * number field * labels represent the series dimensions This structure is typically part of a list of frames with the same structure.
FrameTypeTimeSeriesWide has at least two fields: field[0]: * type time * unique ascending values field[1..n]: * distinct labels may be attached to each field * numeric & boolean fields can be drawn as lines on a graph See https://grafana.com/docs/grafana/latest/developers/plugins/data-frames/#wide-format.
FrameTypeUnknown indicates that we do not know the field type.
IncludeAll serializes the entire Frame with both Schema and Data.
IncludeDataOnly only serializes data part of a frame.
IncludeSchemaOnly only serializes schema part of a frame.
InspectTypeData suggests the "data" tab of the panel editor in Grafana's user interface.
InspectTypeError suggests the "error" tab of the panel editor in Grafana's user interface.
InspectTypeMeta suggests the "meta" tab of the panel editor in Grafana's user interface.
InspectTypeNone is no suggestion for a tab of the panel editor in Grafana's user interface.
InspectTypeStats suggests the "stats" tab of the panel editor in Grafana's user interface.
NoticeSeverityError is error severity.
NoticeSeverityInfo is informational severity.
NoticeSeverityWarning is warning severity.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ThresholdsModeAbsolute pick thresholds based on absolute value.
ThresholdsModePercentage the threshold is relative to min/max.
TimeSeriesTimeFieldName is the standard name for time series time fields.
TimeSeriesTypeLong means this Frame can be treated as a "Long" time series.
TimeSeriesTypeNot means this Frame is not a valid time series.
TimeSeriesTypeWide means this Frame can be treated as a "Wide" time series.
TimeSeriesValueFieldName is the standard name for time series value fields.
VisTypeFlameGraph indicates the response should be visualized using a flame graph visualization.
VisTypeGraph indicates the response should be visualized using a graph.
VisTypeLogs indicates the response should be visualized using a logs visualization.
VisTypeNodeGraph indicates the response should be visualized using a node graph visualization.
VisTypeTable indicates the response should be visualized using a table.
VisTypeTrace indicates the response should be visualized using a trace view visualization.

# Structs

DataLink define what.
Field represents a typed column of data within a Frame.
FieldConfig represents the display properties for a Field.
A FieldConverter is a type to support building Frame fields of a different type than one's input data.
FillMissing is a struct containing the fill mode and the fill value if fill mode is FillModeValue.
Frame is a columnar data structure where each column is a Field.
FrameInputConverter is a type to support building a Frame while also doing conversion as data is added to the Frame.
FrameJSON holds a byte representation of the schema separate from the data.
FrameMeta matches: https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L11 NOTE -- in javascript this can accept any `[key: string]: any;` however this interface only exposes the values we want to be exposedswagger:model.
Notice provides a structure for presenting notifications in Grafana's user interface.
QueryStat is used for storing arbitrary statistics metadata related to a query and its result, e.g.
No description provided by the author
No description provided by the author
Threshold a single step on the threshold list.
ThresholdsConfig setup thresholds.
TimeSeriesSchema is information about a Frame's schema.
ValueMappingResult is the results from mapping a value.

# Interfaces

Framer is simply an object that can be converted to Grafana data frames.
ValueMapping allows mapping input values to text and color.

# Type aliases

ConfFloat64 is a float64.
Converter is a function type for converting values in a Frame.
DataTopic is used to identify which topic the frame should be assigned to.
Fields is a slice of Field pointers.
FieldType indicates the Go type underlying the Field.
FillMode is an integer type denoting how missing values should be filled.
FrameInclude - custom type to hold Frame serialization options.
Frames is a slice of Frame pointers.
A FrameType string, when present in a frame's metadata, asserts that the frame's structure conforms to the FrameType's specification.
InspectType is a type for the Inspect property of a Notice.
Labels are used to add metadata to an object.
NoticeSeverity is a type for the Severity property of a Notice.
No description provided by the author
ThresholdsMode absolute or percentage.
TimeSeriesType represents the type of time series the schema can be treated as (if any).
ValueMapper converts one set of strings to another.
No description provided by the author
VisType is used to indicate how the data should be visualized in explore.