models

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisplayTypeGauge     = "gauge"
	DisplayTypeSlider    = "slider"
	DisplayTypeValue     = "value"
	DisplayTypeChart     = "chart"
	DisplayTypeHistogram = "histogram"
	DisplayTypeTable     = "table"
	DisplayTypeSwitch    = "switch"
	DisplayTypeMap       = "map"
)

DisplayType constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartDataPoint

type ChartDataPoint struct {
	Timestamp time.Time `json:"timestamp"`
	Value     float64   `json:"value"`
}

ChartDataPoint for chart/histogram data

type ChartDataResponse

type ChartDataResponse struct {
	Data []ChartDataPoint `json:"data"`
}

ChartDataResponse for chart and histogram types

type Coordinate

type Coordinate struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

Coordinate for map type

type GaugeValueResponse

type GaugeValueResponse struct {
	Value             float64 `json:"value"`
	UnitOfMeasurement string  `json:"unit_of_measurement,omitempty"`
}

GaugeValueResponse for gauge, slider, value types

type HistogramBucket

type HistogramBucket struct {
	Bucket string  `json:"bucket"`
	Count  int64   `json:"count"`
	Value  float64 `json:"value"`
}

HistogramBucket for histogram type

type HistogramDataResponse

type HistogramDataResponse struct {
	Data []HistogramBucket `json:"data"`
}

HistogramDataResponse for histogram type

type MapDataResponse

type MapDataResponse struct {
	Coordinate Coordinate `json:"coordinate"`
}

MapDataResponse for map type

type SwitchValueResponse

type SwitchValueResponse struct {
	Value bool `json:"value"`
}

SwitchValueResponse for switch type

type TableDataResponse

type TableDataResponse struct {
	Columns []string   `json:"columns"`
	Data    []TableRow `json:"data"`
}

TableDataResponse for table type

type TableRow

type TableRow struct {
	Timestamp time.Time              `json:"timestamp"`
	Values    map[string]interface{} `json:"values"`
}

TableRow for table type

type WidgetDataRequest

type WidgetDataRequest struct {
	EntityID    string     `query:"entity_id"`
	OrgSlug     string     `query:"org_slug"`
	SpaceSlug   string     `query:"space_slug"`
	DeviceID    string     `query:"device_id"`
	StartTime   *time.Time `query:"start_time"`
	EndTime     *time.Time `query:"end_time"`
	DisplayType string     `query:"display_type"`
}

WidgetDataRequest represents widget data fetch request

Jump to

Keyboard shortcuts

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