extract

package
v0.0.85-test Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DashboardInfo

type DashboardInfo struct {
	ID            int64           `json:"id,omitempty"` // internal ID
	UID           string          `json:"uid,omitempty"`
	Title         string          `json:"title"`
	Description   string          `json:"description,omitempty"`
	Tags          []string        `json:"tags"`
	TemplateVars  []string        `json:"templateVars,omitempty"` // the keys used
	Datasource    []DataSourceRef `json:"datasource,omitempty"`   // UIDs
	Panels        []PanelInfo     `json:"panels"`                 // nesed documents
	SchemaVersion int64           `json:"schemaVersion"`
	LinkCount     int64           `json:"linkCount"`
	TimeFrom      string          `json:"timeFrom"`
	TimeTo        string          `json:"timeTo"`
	TimeZone      string          `json:"timezone"`
	Refresh       string          `json:"refresh,omitempty"`
	ReadOnly      bool            `json:"readOnly,omitempty"` // editable = false
}

func ReadDashboard

func ReadDashboard(stream io.Reader, lookup DatasourceLookup) *DashboardInfo

nolint:gocyclo ReadDashboard will take a byte stream and return dashboard info

type DataSourceRef

type DataSourceRef struct {
	UID  string `json:"uid,omitempty"`
	Type string `json:"type,omitempty"`
}

type DatasourceLookup

type DatasourceLookup = func(ref *DataSourceRef) *DataSourceRef

empty everything will return the default

type PanelInfo

type PanelInfo struct {
	ID              int64           `json:"id"`
	Title           string          `json:"title"`
	Description     string          `json:"description,omitempty"`
	Type            string          `json:"type,omitempty"` // PluginID
	PluginVersion   string          `json:"pluginVersion,omitempty"`
	Datasource      []DataSourceRef `json:"datasource,omitempty"`      // UIDs
	Transformations []string        `json:"transformations,omitempty"` // ids of the transformation steps

	// Rows define panels as sub objects
	Collapsed []PanelInfo `json:"collapsed,omitempty"`
}

Jump to

Keyboard shortcuts

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