Documentation ¶
Overview ¶
Package views define views for Clarify resources.
Index ¶
- type DataFrame
- type DataSeries
- type Item
- type ItemAttributes
- type ItemInclude
- type ItemRelationships
- type ItemSave
- type ItemSaveAttributes
- type Signal
- type SignalAttributes
- type SignalInclude
- type SignalReadOnlyAttributes
- type SignalRelationships
- type SignalSave
- type SignalSaveAttributes
- type SourceType
- type ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataFrame ¶
type DataFrame map[string]DataSeries
DataFrame provides JSON encoding and decoding for a map of series identified by an arbitrary key.
func (DataFrame) MarshalJSON ¶
func (*DataFrame) UnmarshalJSON ¶
type DataSeries ¶
DataSeries contain a map of timestamps in micro seconds since the epoch to a floating point value.
type Item ¶
type Item = resource.Resource[ItemAttributes, ItemRelationships]
Item describe the select view for an item.
type ItemAttributes ¶
type ItemAttributes struct {
ItemSaveAttributes
}
ItemAttributes contains attributes for the item select view.
type ItemInclude ¶
type ItemInclude struct{}
type ItemRelationships ¶
type ItemRelationships struct{}
ItemRelationships describe the item relationships that's exposed by the API.
type ItemSave ¶
type ItemSave struct { ItemSaveAttributes resource.MetaSave }
ItemSave describe the save view for an item.
func PublishedItem ¶
PublishedItem constructs a view for an item based on the passed in signal, including a set of base annotations referring the item back to the signal it was generated from. The passed in transforms, if any, are run in order.
type ItemSaveAttributes ¶
type ItemSaveAttributes struct { Name string `json:"name"` Description string `json:"description"` ValueType ValueType `json:"valueType"` SourceType SourceType `json:"sourceType"` EngUnit string `json:"engUnit"` SampleInterval fields.FixedDuration `json:"sampleInterval"` GapDetection fields.FixedDuration `json:"gapDetection"` Labels fields.Labels `json:"labels"` EnumValues fields.EnumValues `json:"enumValues"` Visible bool `json:"visible"` }
ItemSaveAttributes contains attributes that are part of the item save view.
type Signal ¶
type Signal = resource.Resource[SignalAttributes, SignalRelationships]
Signal describe the select view for a signal.
type SignalAttributes ¶
type SignalAttributes struct { SignalSaveAttributes SignalReadOnlyAttributes }
SignalAttributes contains attributes for the signal select view.
type SignalInclude ¶
type SignalInclude struct {
Items []Item `json:"items"`
}
type SignalReadOnlyAttributes ¶
type SignalReadOnlyAttributes struct {
Input string `json:"input"`
}
SignalReadOnlyAttributes contains read-only signal attributes.
type SignalRelationships ¶
type SignalRelationships struct { Integration resource.ToOne `json:"integration"` Item resource.ToOne `json:"item"` }
SignalRelationships declare the available relationships for the signal model.
type SignalSave ¶
type SignalSave struct { resource.MetaSave SignalSaveAttributes }
SignalSave describe the save view for a signal.
type SignalSaveAttributes ¶
type SignalSaveAttributes struct { Name string `json:"name"` Description string `json:"description"` ValueType ValueType `json:"valueType"` SourceType SourceType `json:"sourceType"` EngUnit string `json:"engUnit"` SampleInterval fields.FixedDuration `json:"sampleInterval"` GapDetection fields.FixedDuration `json:"gapDetection"` Labels fields.Labels `json:"labels"` EnumValues fields.EnumValues `json:"enumValues"` }
SignalSaveAttributes contains attributes that are part of the signal save view.
type SourceType ¶
type SourceType string
SourceType describe how data values where produced.
const ( // Measurement indicates that values are retrieved "directly" from a sensor. Measurement SourceType = "measurement" // Aggregation indicates that values are aggregated from one or more // sources. Aggregation SourceType = "aggregation" // Prediction indicates that values are predictions or forecasts. Prediction SourceType = "prediction" )
Allowed signal/item source types.