dashboardtypes

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DashboardParent

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

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

type DashboardTreeRun

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

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, error)

type ResolvedRuntimeDependency

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

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

func (*ResolvedRuntimeDependency) IsResolved

func (d *ResolvedRuntimeDependency) IsResolved() bool

func (*ResolvedRuntimeDependency) Resolve

func (d *ResolvedRuntimeDependency) Resolve() error

func (*ResolvedRuntimeDependency) ScopedName

func (d *ResolvedRuntimeDependency) ScopedName() string

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

type ResolvedRuntimeDependencyValue

type ResolvedRuntimeDependencyValue struct {
	Value any
	Error error
}

type RunStatus

type RunStatus string
const (
	RunInitialized RunStatus = "initialized"
	RunBlocked     RunStatus = "blocked"
	RunRunning     RunStatus = "running"
	RunComplete    RunStatus = "complete"
	RunError       RunStatus = "error"
	RunCanceled    RunStatus = "canceled"
)

func (RunStatus) IsError

func (s RunStatus) IsError() bool

func (RunStatus) IsFinished

func (s RunStatus) IsFinished() bool

Jump to

Keyboard shortcuts

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