Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatasourceSettings ¶
type DatasourceSettings struct { APIKey string `json:"apiKey"` Environment string `json:"environment"` }
DatasourceSettings contains APIKey and Environment
func LoadSettings ¶
func LoadSettings(ctx backend.PluginContext) (*DatasourceSettings, error)
LoadSettings gets the relevant settings from the plugin context
type QuerySpecification ¶
type QuerySpecification struct { // Not from JSON TimeRange backend.TimeRange `json:"-"` MaxDataPoints int64 `json:"-"` // QueryType defines if the query is a metric lookup (e.g. companies, machines) or a real query. QueryType QueryType `json:"queryType"` // RefId is the frontend reference id of a query RefId string // CompanyID is the company which is selected at the user interface // This field is optional; CompanyID string `json:"companyId"` // Namespace defines if a query is a sensors or a kpi query Namespace string `json:"namespace"` // MachineID is the fully qualified id (trn) of a selected machine MachineID string `json:"machineId"` SensorID string `json:"sensorId"` // KpiType defines the selected KPI; this attribute can best be seen as an enumeration since there are only a number // of valid options: oee, mttr, mtbf and ee // At other places in the innius stack this attribute is named the Kpi ID KpiType string `json:"kpi"` // KpiComponent is the selected kpi component; Some innius KPIs consists of components which are used by the calculation // of the actual kpi. For example: oee consists of quality, rate and availability. KpiComponent string `json:"kpiComponent"` // Metric is the actual metric of the query. Metric string `json:"metric"` // Alias is a user defined alias for the query result Alias string `json:"alias"` }
QuerySpecification is the contract between the plugin frontend and backend
func GetQueryModel ¶
func GetQueryModel(query backend.DataQuery) (*QuerySpecification, error)
Click to show internal directories.
Click to hide internal directories.