snapshot

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryResultToSnapshot

func QueryResultToSnapshot[T queryresult.TimingContainer](ctx context.Context, result *queryresult.Result[T], resolvedQuery *modconfig.ResolvedQuery, searchPath []string, startTime time.Time) (*steampipeconfig.SteampipeSnapshot, error)

QueryResultToSnapshot function to generate a snapshot from a query result

func SnapshotToQueryResult

func SnapshotToQueryResult[T queryresult.TimingContainer](snap *steampipeconfig.SteampipeSnapshot, startTime time.Time) (*queryresult.Result[T], error)

SnapshotToQueryResult function to generate a queryresult with streamed rows from a snapshot

Types

type LeafData

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

type PanelData

type PanelData struct {
	Dashboard        string            `json:"dashboard"`
	Name             string            `json:"name"`
	PanelType        string            `json:"panel_type"`
	SourceDefinition string            `json:"source_definition"`
	Status           string            `json:"status,omitempty"`
	Title            string            `json:"title,omitempty"`
	SQL              string            `json:"sql,omitempty"`
	Properties       map[string]string `json:"properties,omitempty"`
	Data             LeafData          `json:"data,omitempty"`
}

PanelData implements SnapshotPanel in the pipe-fittings SteampipeSnapshot struct We cannot use the SnapshotPanel interface directly in this package as it references powerpipe types that are not available in this package

func (*PanelData) IsSnapshotPanel

func (*PanelData) IsSnapshotPanel()

IsSnapshotPanel implements SnapshotPanel

Jump to

Keyboard shortcuts

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