dashboardtypes

package
v0.17.0-alpha.16 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SteampipeSnapshotSchemaVersion int64 = 20220614

Functions

This section is empty.

Types

type ColumnSchema

type ColumnSchema struct {
	Name     string `json:"name"`
	DataType string `json:"data_type"`
}

func NewLeafDataColumnType

func NewLeafDataColumnType(sqlType *sql.ColumnType) *ColumnSchema

type DashboardNodeParent

type DashboardNodeParent interface {
	GetName() string
	ChildCompleteChan() chan DashboardNodeRun
}

DashboardNodeParent is an interface implemented by all dashboard run nodes which have children

type DashboardNodeRun

type DashboardNodeRun interface {
	Initialise(ctx context.Context)
	Execute(ctx context.Context)
	GetName() string
	GetRunStatus() DashboardRunStatus
	SetError(context.Context, error)
	GetError() error
	SetComplete(context.Context)
	RunComplete() bool
	GetChildren() []DashboardNodeRun
	ChildrenComplete() bool
	GetInputsDependingOn(string) []string
	AsTreeNode() *SnapshotTreeNode
}

DashboardNodeRun is an interface implemented by all dashboard run nodes

type DashboardRunStatus

type DashboardRunStatus string
const (
	DashboardRunReady    DashboardRunStatus = "ready"
	DashboardRunComplete DashboardRunStatus = "complete"
	DashboardRunError    DashboardRunStatus = "error"
)

type LeafData

type LeafData struct {
	Columns []*ColumnSchema          `json:"columns"`
	Rows    []map[string]interface{} `json:"rows"`
}

func NewLeafData

func NewLeafData(result *queryresult.SyncQueryResult) *LeafData

type SnapshotPanel

type SnapshotPanel interface {
	IsSnapshotPanel()
}

SnapshotPanel is an interface implemented by all nodes which are to be included in the Snapshot Panels map

type SnapshotTreeNode

type SnapshotTreeNode struct {
	Name     string              `json:"name"`
	Children []*SnapshotTreeNode `json:"children,omitempty"`
	NodeType string              `json:"panel_type"`
}

SnapshotTreeNode is a struct used to store the dashboard structure in the snapshot

type SteampipeSnapshot added in v0.17.0

type SteampipeSnapshot struct {
	SchemaVersion string                   `json:"schema_version"`
	Action        string                   `json:"action"`
	DashboardNode DashboardNodeRun         `json:"dashboard_node"`
	Panels        map[string]SnapshotPanel `json:"panels"`
	ExecutionId   string                   `json:"execution_id"`
	Inputs        map[string]interface{}   `json:"inputs"`
	Variables     map[string]string        `json:"variables"`
	SearchPath    []string                 `json:"search_path"`
	StartTime     time.Time                `json:"start_time"`
	EndTime       time.Time                `json:"end_time"`
	Layout        *SnapshotTreeNode        `json:"layout"`
}

Jump to

Keyboard shortcuts

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