dashboardtypes

package
v0.18.0-alpha.18 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SteampipeSnapshotSchemaVersion int64 = 20220929

Functions

func StripSnapshot added in v0.17.0

func StripSnapshot(snapshot *steampipecloud.WorkspaceSnapshotData) error

Types

type DashboardParent added in v0.19.0

type DashboardParent interface {
	DashboardTreeRun
	GetName() string
	ChildCompleteChan() chan DashboardTreeRun
	GetChildren() []DashboardTreeRun
	ChildrenComplete() bool
}

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

type DashboardRunStatus

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

type DashboardTreeRun added in v0.19.0

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

DashboardTreeRun is an interface implemented by all dashboard run nodes

type LeafData

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

func NewLeafData

func NewLeafData(result *queryresult.SyncQueryResult) *LeafData

type ResolvedRuntimeDependency added in v0.19.0

type ResolvedRuntimeDependency struct {
	Dependency *modconfig.RuntimeDependency

	Value any
	// contains filtered or unexported fields
}

ResolvedRuntimeDependency is a wrapper for RuntimeDependency which contains the resolved value we must wrap it so that we do not mutate the underlying workspace data when resolving dependency values

func NewResolvedRuntimeDependency added in v0.19.0

func NewResolvedRuntimeDependency(dep *modconfig.RuntimeDependency, valueChannel chan *ResolvedRuntimeDependencyValue, publisherName string) *ResolvedRuntimeDependency

func (*ResolvedRuntimeDependency) Resolve added in v0.19.0

func (d *ResolvedRuntimeDependency) Resolve() error

func (*ResolvedRuntimeDependency) ScopedName added in v0.19.0

func (d *ResolvedRuntimeDependency) ScopedName() string

ScopedName returns is a unique name for the depdency by prepending the publisher name this is used to uniquely identify which `with` is used - for the snapshot data

type ResolvedRuntimeDependencyValue added in v0.19.0

type ResolvedRuntimeDependencyValue struct {
	Value any
	Error error
}

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"`
	Panels        map[string]SnapshotPanel `json:"panels"`
	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"`
	FileNameRoot  string                   `json:"-"`
	Title         string                   `json:"-"`
}

func (*SteampipeSnapshot) AsCloudSnapshot added in v0.17.0

func (*SteampipeSnapshot) AsStrippedJson added in v0.17.0

func (s *SteampipeSnapshot) AsStrippedJson(indent bool) ([]byte, error)

func (*SteampipeSnapshot) IsExportSourceData added in v0.17.0

func (*SteampipeSnapshot) IsExportSourceData()

IsExportSourceData implements ExportSourceData

Jump to

Keyboard shortcuts

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