Documentation ¶
Index ¶
- Constants
- Variables
- func BuildFullResourceName(mod, blockType, name string) string
- func BuildModResourceName(blockType, name string) string
- func GetCtyTypes(item interface{}) map[string]cty.Type
- func GetMonotonicVersionString(v *semver.Version) string
- func IsValidResourceItemType(blockType string) bool
- func ModVersionFullName(name string, version *semver.Version) string
- func ParseModFullName(fullName string) (modName string, modVersion *semver.Version, err error)
- func PseudoResourceNameFromPath(modPath, filePath string) (string, error)
- func QueryProviderIsParameterised(queryProvider QueryProvider) bool
- func RegisteredFileExtensions() []string
- func ResolveArgsAsString(source QueryProvider, runtimeArgs *QueryArgs) (string, []string, error)
- func UnqualifiedResourceName(fullName string) string
- type Benchmark
- func (b *Benchmark) AddParent(parent ModTreeItem) error
- func (b *Benchmark) AddReference(ref *ResourceReference)
- func (*Benchmark) BlockType() string
- func (b *Benchmark) CtyValue() (cty.Value, error)
- func (b *Benchmark) Diff(other *Benchmark) *DashboardTreeItemDiffs
- func (b *Benchmark) Equals(other *Benchmark) bool
- func (b *Benchmark) GetChildControls() []*Control
- func (b *Benchmark) GetChildren() []ModTreeItem
- func (b *Benchmark) GetDeclRange() *hcl.Range
- func (b *Benchmark) GetDescription() string
- func (b *Benchmark) GetDisplay() string
- func (b *Benchmark) GetDocumentation() string
- func (b *Benchmark) GetMod() *Mod
- func (b *Benchmark) GetParents() []ModTreeItem
- func (b *Benchmark) GetPaths() []NodePath
- func (b *Benchmark) GetReferences() []*ResourceReference
- func (b *Benchmark) GetTags() map[string]string
- func (b *Benchmark) GetTitle() string
- func (b *Benchmark) GetType() string
- func (b *Benchmark) GetUnqualifiedName() string
- func (b *Benchmark) GetWidth() int
- func (b *Benchmark) Name() string
- func (b *Benchmark) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (b *Benchmark) SetPaths()
- func (b *Benchmark) String() string
- func (b *Benchmark) WalkResources(resourceFunc func(resource ModTreeItem) (bool, error)) error
- type ConfigMap
- type Connection
- func (c *Connection) Equals(other *Connection) bool
- func (c *Connection) FirstChild() *Connection
- func (c *Connection) GetResolveConnectionNames() []string
- func (c *Connection) MaintainLegacy()
- func (c *Connection) MigrateLegacy()
- func (c *Connection) PopulateChildren(connectionMap map[string]*Connection)
- func (c *Connection) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
- func (c *Connection) String() string
- func (c *Connection) Validate(connectionMap map[string]*Connection) []string
- func (c *Connection) ValidateAggregatorConnection(connectionMap map[string]*Connection) []string
- type Control
- func (c *Control) AddParent(parent ModTreeItem) error
- func (c *Control) AddReference(ref *ResourceReference)
- func (*Control) BlockType() string
- func (c *Control) CtyValue() (cty.Value, error)
- func (c *Control) Diff(other *Control) *DashboardTreeItemDiffs
- func (c *Control) Equals(other *Control) bool
- func (c *Control) GetArgs() *QueryArgs
- func (c *Control) GetChildren() []ModTreeItem
- func (c *Control) GetDeclRange() *hcl.Range
- func (c *Control) GetDescription() string
- func (c *Control) GetDisplay() string
- func (c *Control) GetDocumentation() string
- func (c *Control) GetMod() *Mod
- func (c *Control) GetParams() []*ParamDef
- func (c *Control) GetParentNames() []string
- func (c *Control) GetParents() []ModTreeItem
- func (c *Control) GetPaths() []NodePath
- func (c *Control) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (c *Control) GetPreparedStatementName() string
- func (c *Control) GetQuery() *Query
- func (c *Control) GetReferences() []*ResourceReference
- func (c *Control) GetSQL() *string
- func (c *Control) GetTags() map[string]string
- func (c *Control) GetTitle() string
- func (c *Control) GetType() string
- func (c *Control) GetUnqualifiedName() string
- func (c *Control) GetWidth() int
- func (c *Control) Name() string
- func (c *Control) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (c *Control) QualifiedNameWithVersion() string
- func (c *Control) SetArgs(args *QueryArgs)
- func (c *Control) SetParams(params []*ParamDef)
- func (c *Control) SetPaths()
- func (c *Control) String() string
- type Dashboard
- func (d *Dashboard) AddChild(child ModTreeItem)
- func (d *Dashboard) AddParent(parent ModTreeItem) error
- func (d *Dashboard) AddReference(ref *ResourceReference)
- func (*Dashboard) BlockType() string
- func (d *Dashboard) BuildRuntimeDependencyTree(workspace ResourceMapsProvider) error
- func (d *Dashboard) CtyValue() (cty.Value, error)
- func (d *Dashboard) Diff(other *Dashboard) *DashboardTreeItemDiffs
- func (d *Dashboard) Equals(other *Dashboard) bool
- func (d *Dashboard) GetChildren() []ModTreeItem
- func (d *Dashboard) GetDeclRange() *hcl.Range
- func (d *Dashboard) GetDescription() string
- func (d *Dashboard) GetDocumentation() string
- func (d *Dashboard) GetInput(name string) (*DashboardInput, bool)
- func (d *Dashboard) GetMod() *Mod
- func (d *Dashboard) GetParents() []ModTreeItem
- func (d *Dashboard) GetPaths() []NodePath
- func (d *Dashboard) GetReferences() []*ResourceReference
- func (d *Dashboard) GetTags() map[string]string
- func (d *Dashboard) GetTitle() string
- func (d *Dashboard) GetUnqualifiedName() string
- func (d *Dashboard) Name() string
- func (d *Dashboard) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (d *Dashboard) SetChildren(children []ModTreeItem)
- func (d *Dashboard) SetInputs(inputs []*DashboardInput) hcl.Diagnostics
- func (d *Dashboard) SetPaths()
- func (d *Dashboard) WalkResources(resourceFunc func(resource HclResource) (bool, error)) error
- type DashboardCard
- func (c *DashboardCard) AddParent(parent ModTreeItem) error
- func (c *DashboardCard) AddReference(ref *ResourceReference)
- func (*DashboardCard) BlockType() string
- func (c *DashboardCard) CtyValue() (cty.Value, error)
- func (c *DashboardCard) Diff(other *DashboardCard) *DashboardTreeItemDiffs
- func (c *DashboardCard) Equals(other *DashboardCard) bool
- func (c *DashboardCard) GetArgs() *QueryArgs
- func (c *DashboardCard) GetChildren() []ModTreeItem
- func (c *DashboardCard) GetDeclRange() *hcl.Range
- func (c *DashboardCard) GetDescription() string
- func (c *DashboardCard) GetDisplay() string
- func (c *DashboardCard) GetDocumentation() string
- func (c *DashboardCard) GetMod() *Mod
- func (c *DashboardCard) GetParams() []*ParamDef
- func (c *DashboardCard) GetParents() []ModTreeItem
- func (c *DashboardCard) GetPaths() []NodePath
- func (c *DashboardCard) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (c *DashboardCard) GetPreparedStatementName() string
- func (c *DashboardCard) GetQuery() *Query
- func (c *DashboardCard) GetReferences() []*ResourceReference
- func (c *DashboardCard) GetSQL() *string
- func (c *DashboardCard) GetTags() map[string]string
- func (c *DashboardCard) GetTitle() string
- func (c *DashboardCard) GetType() string
- func (c *DashboardCard) GetUnqualifiedName() string
- func (c *DashboardCard) GetWidth() int
- func (c *DashboardCard) Name() string
- func (c *DashboardCard) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (c *DashboardCard) SetArgs(args *QueryArgs)
- func (c *DashboardCard) SetParams(params []*ParamDef)
- func (c *DashboardCard) SetPaths()
- func (c *DashboardCard) VerifyQuery(QueryProvider) error
- type DashboardCategory
- func (c *DashboardCategory) AddParent(parent ModTreeItem) error
- func (c *DashboardCategory) AddReference(ref *ResourceReference)
- func (*DashboardCategory) BlockType() string
- func (c *DashboardCategory) CtyValue() (cty.Value, error)
- func (c *DashboardCategory) Diff(other *DashboardCategory) *DashboardTreeItemDiffs
- func (c *DashboardCategory) Equals(other *DashboardCategory) bool
- func (c *DashboardCategory) GetChildren() []ModTreeItem
- func (c *DashboardCategory) GetDeclRange() *hcl.Range
- func (c *DashboardCategory) GetDescription() string
- func (*DashboardCategory) GetDocumentation() string
- func (c *DashboardCategory) GetMod() *Mod
- func (c *DashboardCategory) GetParents() []ModTreeItem
- func (c *DashboardCategory) GetPaths() []NodePath
- func (c *DashboardCategory) GetReferences() []*ResourceReference
- func (c *DashboardCategory) GetTags() map[string]string
- func (c *DashboardCategory) GetTitle() string
- func (c *DashboardCategory) GetUnqualifiedName() string
- func (c *DashboardCategory) Name() string
- func (c *DashboardCategory) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (c *DashboardCategory) SetPaths()
- type DashboardCategoryField
- type DashboardCategoryFieldList
- type DashboardCategoryFold
- type DashboardCategoryList
- type DashboardChart
- func (c *DashboardChart) AddParent(parent ModTreeItem) error
- func (c *DashboardChart) AddReference(ref *ResourceReference)
- func (*DashboardChart) BlockType() string
- func (c *DashboardChart) CtyValue() (cty.Value, error)
- func (c *DashboardChart) Diff(other *DashboardChart) *DashboardTreeItemDiffs
- func (c *DashboardChart) Equals(other *DashboardChart) bool
- func (c *DashboardChart) GetArgs() *QueryArgs
- func (c *DashboardChart) GetChildren() []ModTreeItem
- func (c *DashboardChart) GetDeclRange() *hcl.Range
- func (c *DashboardChart) GetDescription() string
- func (c *DashboardChart) GetDisplay() string
- func (c *DashboardChart) GetDocumentation() string
- func (c *DashboardChart) GetMod() *Mod
- func (c *DashboardChart) GetParams() []*ParamDef
- func (c *DashboardChart) GetParents() []ModTreeItem
- func (c *DashboardChart) GetPaths() []NodePath
- func (c *DashboardChart) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (c *DashboardChart) GetPreparedStatementName() string
- func (c *DashboardChart) GetQuery() *Query
- func (c *DashboardChart) GetReferences() []*ResourceReference
- func (c *DashboardChart) GetSQL() *string
- func (c *DashboardChart) GetTags() map[string]string
- func (c *DashboardChart) GetTitle() string
- func (c *DashboardChart) GetType() string
- func (c *DashboardChart) GetUnqualifiedName() string
- func (c *DashboardChart) GetWidth() int
- func (c *DashboardChart) Name() string
- func (c *DashboardChart) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (c *DashboardChart) SetArgs(args *QueryArgs)
- func (c *DashboardChart) SetParams(params []*ParamDef)
- func (c *DashboardChart) SetPaths()
- type DashboardChartAxes
- type DashboardChartAxesX
- type DashboardChartAxesY
- type DashboardChartAxisTitle
- type DashboardChartLabels
- type DashboardChartLegend
- type DashboardChartSeries
- type DashboardChartSeriesList
- type DashboardChartSeriesPoint
- type DashboardContainer
- func (c *DashboardContainer) AddChild(child ModTreeItem)
- func (c *DashboardContainer) AddParent(parent ModTreeItem) error
- func (c *DashboardContainer) AddReference(ref *ResourceReference)
- func (*DashboardContainer) BlockType() string
- func (c *DashboardContainer) CtyValue() (cty.Value, error)
- func (c *DashboardContainer) Diff(other *DashboardContainer) *DashboardTreeItemDiffs
- func (c *DashboardContainer) Equals(other *DashboardContainer) bool
- func (c *DashboardContainer) GetChildren() []ModTreeItem
- func (c *DashboardContainer) GetDeclRange() *hcl.Range
- func (c *DashboardContainer) GetDescription() string
- func (*DashboardContainer) GetDocumentation() string
- func (c *DashboardContainer) GetMod() *Mod
- func (c *DashboardContainer) GetParents() []ModTreeItem
- func (c *DashboardContainer) GetPaths() []NodePath
- func (c *DashboardContainer) GetReferences() []*ResourceReference
- func (c *DashboardContainer) GetTags() map[string]string
- func (c *DashboardContainer) GetTitle() string
- func (c *DashboardContainer) GetUnqualifiedName() string
- func (c *DashboardContainer) Name() string
- func (c *DashboardContainer) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (c *DashboardContainer) SetChildren(children []ModTreeItem)
- func (c *DashboardContainer) SetPaths()
- func (c *DashboardContainer) WalkResources(resourceFunc func(resource HclResource) (bool, error)) error
- type DashboardEdge
- func (e *DashboardEdge) AddParent(parent ModTreeItem) error
- func (e *DashboardEdge) AddReference(ref *ResourceReference)
- func (*DashboardEdge) BlockType() string
- func (e *DashboardEdge) CtyValue() (cty.Value, error)
- func (e *DashboardEdge) Diff(other *DashboardEdge) *DashboardTreeItemDiffs
- func (e *DashboardEdge) Equals(other *DashboardEdge) bool
- func (e *DashboardEdge) GetArgs() *QueryArgs
- func (e *DashboardEdge) GetChildren() []ModTreeItem
- func (e *DashboardEdge) GetDeclRange() *hcl.Range
- func (e *DashboardEdge) GetDescription() string
- func (e *DashboardEdge) GetDisplay() string
- func (e *DashboardEdge) GetDocumentation() string
- func (e *DashboardEdge) GetMod() *Mod
- func (e *DashboardEdge) GetParams() []*ParamDef
- func (e *DashboardEdge) GetParents() []ModTreeItem
- func (e *DashboardEdge) GetPaths() []NodePath
- func (e *DashboardEdge) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (e *DashboardEdge) GetPreparedStatementName() string
- func (e *DashboardEdge) GetQuery() *Query
- func (e *DashboardEdge) GetReferences() []*ResourceReference
- func (e *DashboardEdge) GetSQL() *string
- func (e *DashboardEdge) GetTags() map[string]string
- func (e *DashboardEdge) GetTitle() string
- func (e *DashboardEdge) GetType() string
- func (e *DashboardEdge) GetUnqualifiedName() string
- func (e *DashboardEdge) GetWidth() int
- func (*DashboardEdge) IsSnapshotPanel()
- func (e *DashboardEdge) Name() string
- func (e *DashboardEdge) OnDecoded(_ *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (e *DashboardEdge) SetArgs(args *QueryArgs)
- func (e *DashboardEdge) SetParams(params []*ParamDef)
- func (e *DashboardEdge) SetPaths()
- type DashboardEdgeList
- type DashboardFlow
- func (f *DashboardFlow) AddCategory(category *DashboardCategory) hcl.Diagnostics
- func (f *DashboardFlow) AddParent(parent ModTreeItem) error
- func (f *DashboardFlow) AddReference(ref *ResourceReference)
- func (*DashboardFlow) BlockType() string
- func (f *DashboardFlow) CtyValue() (cty.Value, error)
- func (f *DashboardFlow) Diff(other *DashboardFlow) *DashboardTreeItemDiffs
- func (f *DashboardFlow) Equals(other *DashboardFlow) bool
- func (f *DashboardFlow) GetArgs() *QueryArgs
- func (f *DashboardFlow) GetChildren() []ModTreeItem
- func (f *DashboardFlow) GetDeclRange() *hcl.Range
- func (f *DashboardFlow) GetDescription() string
- func (f *DashboardFlow) GetDisplay() string
- func (f *DashboardFlow) GetDocumentation() string
- func (f *DashboardFlow) GetEdges() DashboardEdgeList
- func (f *DashboardFlow) GetMod() *Mod
- func (f *DashboardFlow) GetNodes() DashboardNodeList
- func (f *DashboardFlow) GetParams() []*ParamDef
- func (f *DashboardFlow) GetParents() []ModTreeItem
- func (f *DashboardFlow) GetPaths() []NodePath
- func (f *DashboardFlow) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (f *DashboardFlow) GetPreparedStatementName() string
- func (f *DashboardFlow) GetQuery() *Query
- func (f *DashboardFlow) GetReferences() []*ResourceReference
- func (f *DashboardFlow) GetSQL() *string
- func (f *DashboardFlow) GetTags() map[string]string
- func (f *DashboardFlow) GetTitle() string
- func (f *DashboardFlow) GetType() string
- func (f *DashboardFlow) GetUnqualifiedName() string
- func (f *DashboardFlow) GetWidth() int
- func (f *DashboardFlow) Name() string
- func (f *DashboardFlow) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (f *DashboardFlow) SetArgs(args *QueryArgs)
- func (f *DashboardFlow) SetEdges(edges DashboardEdgeList)
- func (f *DashboardFlow) SetNodes(nodes DashboardNodeList)
- func (f *DashboardFlow) SetParams(params []*ParamDef)
- func (f *DashboardFlow) SetPaths()
- func (*DashboardFlow) VerifyQuery(QueryProvider) error
- type DashboardGraph
- func (g *DashboardGraph) AddCategory(category *DashboardCategory) hcl.Diagnostics
- func (g *DashboardGraph) AddParent(parent ModTreeItem) error
- func (g *DashboardGraph) AddReference(ref *ResourceReference)
- func (*DashboardGraph) BlockType() string
- func (g *DashboardGraph) CtyValue() (cty.Value, error)
- func (g *DashboardGraph) Diff(other *DashboardGraph) *DashboardTreeItemDiffs
- func (g *DashboardGraph) Equals(other *DashboardGraph) bool
- func (g *DashboardGraph) GetArgs() *QueryArgs
- func (g *DashboardGraph) GetChildren() []ModTreeItem
- func (g *DashboardGraph) GetDeclRange() *hcl.Range
- func (g *DashboardGraph) GetDescription() string
- func (g *DashboardGraph) GetDisplay() string
- func (g *DashboardGraph) GetDocumentation() string
- func (g *DashboardGraph) GetEdges() DashboardEdgeList
- func (g *DashboardGraph) GetMod() *Mod
- func (g *DashboardGraph) GetNodes() DashboardNodeList
- func (g *DashboardGraph) GetParams() []*ParamDef
- func (g *DashboardGraph) GetParents() []ModTreeItem
- func (g *DashboardGraph) GetPaths() []NodePath
- func (g *DashboardGraph) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (g *DashboardGraph) GetPreparedStatementName() string
- func (g *DashboardGraph) GetQuery() *Query
- func (g *DashboardGraph) GetReferences() []*ResourceReference
- func (g *DashboardGraph) GetSQL() *string
- func (g *DashboardGraph) GetTags() map[string]string
- func (g *DashboardGraph) GetTitle() string
- func (g *DashboardGraph) GetType() string
- func (g *DashboardGraph) GetUnqualifiedName() string
- func (g *DashboardGraph) GetWidth() int
- func (g *DashboardGraph) Name() string
- func (g *DashboardGraph) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (g *DashboardGraph) SetArgs(args *QueryArgs)
- func (g *DashboardGraph) SetEdges(edges DashboardEdgeList)
- func (g *DashboardGraph) SetNodes(nodes DashboardNodeList)
- func (g *DashboardGraph) SetParams(params []*ParamDef)
- func (g *DashboardGraph) SetPaths()
- func (*DashboardGraph) VerifyQuery(QueryProvider) error
- type DashboardHierarchy
- func (h *DashboardHierarchy) AddCategory(category *DashboardCategory) hcl.Diagnostics
- func (h *DashboardHierarchy) AddParent(parent ModTreeItem) error
- func (h *DashboardHierarchy) AddReference(ref *ResourceReference)
- func (*DashboardHierarchy) BlockType() string
- func (h *DashboardHierarchy) CtyValue() (cty.Value, error)
- func (h *DashboardHierarchy) Diff(other *DashboardHierarchy) *DashboardTreeItemDiffs
- func (h *DashboardHierarchy) Equals(other *DashboardHierarchy) bool
- func (h *DashboardHierarchy) GetArgs() *QueryArgs
- func (h *DashboardHierarchy) GetChildren() []ModTreeItem
- func (h *DashboardHierarchy) GetDeclRange() *hcl.Range
- func (h *DashboardHierarchy) GetDescription() string
- func (h *DashboardHierarchy) GetDisplay() string
- func (h *DashboardHierarchy) GetDocumentation() string
- func (h *DashboardHierarchy) GetEdges() DashboardEdgeList
- func (h *DashboardHierarchy) GetMod() *Mod
- func (h *DashboardHierarchy) GetNodes() DashboardNodeList
- func (h *DashboardHierarchy) GetParams() []*ParamDef
- func (h *DashboardHierarchy) GetParents() []ModTreeItem
- func (h *DashboardHierarchy) GetPaths() []NodePath
- func (h *DashboardHierarchy) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (h *DashboardHierarchy) GetPreparedStatementName() string
- func (h *DashboardHierarchy) GetQuery() *Query
- func (h *DashboardHierarchy) GetReferences() []*ResourceReference
- func (h *DashboardHierarchy) GetSQL() *string
- func (h *DashboardHierarchy) GetTags() map[string]string
- func (h *DashboardHierarchy) GetTitle() string
- func (h *DashboardHierarchy) GetType() string
- func (h *DashboardHierarchy) GetUnqualifiedName() string
- func (h *DashboardHierarchy) GetWidth() int
- func (h *DashboardHierarchy) Name() string
- func (h *DashboardHierarchy) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (h *DashboardHierarchy) SetArgs(args *QueryArgs)
- func (h *DashboardHierarchy) SetEdges(edges DashboardEdgeList)
- func (h *DashboardHierarchy) SetNodes(nodes DashboardNodeList)
- func (h *DashboardHierarchy) SetParams(params []*ParamDef)
- func (h *DashboardHierarchy) SetPaths()
- func (*DashboardHierarchy) VerifyQuery(QueryProvider) error
- type DashboardImage
- func (i *DashboardImage) AddParent(parent ModTreeItem) error
- func (i *DashboardImage) AddReference(ref *ResourceReference)
- func (*DashboardImage) BlockType() string
- func (i *DashboardImage) CtyValue() (cty.Value, error)
- func (i *DashboardImage) Diff(other *DashboardImage) *DashboardTreeItemDiffs
- func (i *DashboardImage) Equals(other *DashboardImage) bool
- func (i *DashboardImage) GetArgs() *QueryArgs
- func (i *DashboardImage) GetChildren() []ModTreeItem
- func (i *DashboardImage) GetDeclRange() *hcl.Range
- func (i *DashboardImage) GetDescription() string
- func (i *DashboardImage) GetDisplay() string
- func (*DashboardImage) GetDocumentation() string
- func (i *DashboardImage) GetMod() *Mod
- func (i *DashboardImage) GetParams() []*ParamDef
- func (i *DashboardImage) GetParents() []ModTreeItem
- func (i *DashboardImage) GetPaths() []NodePath
- func (i *DashboardImage) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (i *DashboardImage) GetPreparedStatementName() string
- func (i *DashboardImage) GetQuery() *Query
- func (i *DashboardImage) GetReferences() []*ResourceReference
- func (i *DashboardImage) GetSQL() *string
- func (i *DashboardImage) GetTags() map[string]string
- func (i *DashboardImage) GetTitle() string
- func (*DashboardImage) GetType() string
- func (i *DashboardImage) GetUnqualifiedName() string
- func (i *DashboardImage) GetWidth() int
- func (i *DashboardImage) Name() string
- func (i *DashboardImage) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (i *DashboardImage) SetArgs(args *QueryArgs)
- func (i *DashboardImage) SetParams(params []*ParamDef)
- func (i *DashboardImage) SetPaths()
- func (i *DashboardImage) VerifyQuery(QueryProvider) error
- type DashboardInput
- func (i *DashboardInput) AddParent(parent ModTreeItem) error
- func (i *DashboardInput) AddReference(ref *ResourceReference)
- func (*DashboardInput) BlockType() string
- func (i *DashboardInput) Clone() *DashboardInput
- func (i *DashboardInput) CtyValue() (cty.Value, error)
- func (i *DashboardInput) DependsOnInput(changedInputName string) bool
- func (i *DashboardInput) Diff(other *DashboardInput) *DashboardTreeItemDiffs
- func (i *DashboardInput) Equals(other *DashboardInput) bool
- func (i *DashboardInput) GetArgs() *QueryArgs
- func (i *DashboardInput) GetChildren() []ModTreeItem
- func (i *DashboardInput) GetDeclRange() *hcl.Range
- func (i *DashboardInput) GetDescription() string
- func (i *DashboardInput) GetDisplay() string
- func (*DashboardInput) GetDocumentation() string
- func (i *DashboardInput) GetMod() *Mod
- func (i *DashboardInput) GetParams() []*ParamDef
- func (i *DashboardInput) GetParents() []ModTreeItem
- func (i *DashboardInput) GetPaths() []NodePath
- func (i *DashboardInput) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (i *DashboardInput) GetPreparedStatementName() string
- func (i *DashboardInput) GetQuery() *Query
- func (i *DashboardInput) GetReferences() []*ResourceReference
- func (i *DashboardInput) GetSQL() *string
- func (i *DashboardInput) GetTags() map[string]string
- func (i *DashboardInput) GetTitle() string
- func (i *DashboardInput) GetType() string
- func (i *DashboardInput) GetUnqualifiedName() string
- func (i *DashboardInput) GetWidth() int
- func (*DashboardInput) IsSnapshotPanel()
- func (i *DashboardInput) Name() string
- func (i *DashboardInput) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (i *DashboardInput) SetArgs(args *QueryArgs)
- func (i *DashboardInput) SetDashboard(dashboard *Dashboard)
- func (i *DashboardInput) SetParams(params []*ParamDef)
- func (i *DashboardInput) SetPaths()
- func (i *DashboardInput) VerifyQuery(QueryProvider) error
- type DashboardInputOption
- type DashboardLeafNode
- type DashboardNode
- func (n *DashboardNode) AddParent(parent ModTreeItem) error
- func (n *DashboardNode) AddReference(ref *ResourceReference)
- func (*DashboardNode) BlockType() string
- func (n *DashboardNode) CtyValue() (cty.Value, error)
- func (n *DashboardNode) Diff(other *DashboardNode) *DashboardTreeItemDiffs
- func (n *DashboardNode) Equals(other *DashboardNode) bool
- func (n *DashboardNode) GetArgs() *QueryArgs
- func (n *DashboardNode) GetChildren() []ModTreeItem
- func (n *DashboardNode) GetDeclRange() *hcl.Range
- func (n *DashboardNode) GetDescription() string
- func (n *DashboardNode) GetDisplay() string
- func (n *DashboardNode) GetDocumentation() string
- func (n *DashboardNode) GetMod() *Mod
- func (n *DashboardNode) GetParams() []*ParamDef
- func (n *DashboardNode) GetParents() []ModTreeItem
- func (n *DashboardNode) GetPaths() []NodePath
- func (n *DashboardNode) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (n *DashboardNode) GetPreparedStatementName() string
- func (n *DashboardNode) GetQuery() *Query
- func (n *DashboardNode) GetReferences() []*ResourceReference
- func (n *DashboardNode) GetSQL() *string
- func (n *DashboardNode) GetTags() map[string]string
- func (n *DashboardNode) GetTitle() string
- func (n *DashboardNode) GetType() string
- func (n *DashboardNode) GetUnqualifiedName() string
- func (n *DashboardNode) GetWidth() int
- func (*DashboardNode) IsSnapshotPanel()
- func (n *DashboardNode) Name() string
- func (n *DashboardNode) OnDecoded(_ *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (n *DashboardNode) SetArgs(args *QueryArgs)
- func (n *DashboardNode) SetParams(params []*ParamDef)
- func (n *DashboardNode) SetPaths()
- type DashboardNodeList
- type DashboardTable
- func (t *DashboardTable) AddParent(parent ModTreeItem) error
- func (t *DashboardTable) AddReference(ref *ResourceReference)
- func (*DashboardTable) BlockType() string
- func (t *DashboardTable) CtyValue() (cty.Value, error)
- func (t *DashboardTable) Diff(other *DashboardTable) *DashboardTreeItemDiffs
- func (t *DashboardTable) Equals(other *DashboardTable) bool
- func (t *DashboardTable) GetArgs() *QueryArgs
- func (t *DashboardTable) GetChildren() []ModTreeItem
- func (t *DashboardTable) GetDeclRange() *hcl.Range
- func (t *DashboardTable) GetDescription() string
- func (t *DashboardTable) GetDisplay() string
- func (*DashboardTable) GetDocumentation() string
- func (t *DashboardTable) GetMod() *Mod
- func (t *DashboardTable) GetParams() []*ParamDef
- func (t *DashboardTable) GetParents() []ModTreeItem
- func (t *DashboardTable) GetPaths() []NodePath
- func (t *DashboardTable) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (t *DashboardTable) GetPreparedStatementName() string
- func (t *DashboardTable) GetQuery() *Query
- func (t *DashboardTable) GetReferences() []*ResourceReference
- func (t *DashboardTable) GetSQL() *string
- func (t *DashboardTable) GetTags() map[string]string
- func (t *DashboardTable) GetTitle() string
- func (t *DashboardTable) GetType() string
- func (t *DashboardTable) GetUnqualifiedName() string
- func (t *DashboardTable) GetWidth() int
- func (t *DashboardTable) Name() string
- func (t *DashboardTable) OnDecoded(_ *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (t *DashboardTable) SetArgs(args *QueryArgs)
- func (t *DashboardTable) SetParams(params []*ParamDef)
- func (t *DashboardTable) SetPaths()
- type DashboardTableColumn
- type DashboardTableColumnList
- type DashboardText
- func (t *DashboardText) AddParent(parent ModTreeItem) error
- func (t *DashboardText) AddReference(ref *ResourceReference)
- func (*DashboardText) BlockType() string
- func (t *DashboardText) CtyValue() (cty.Value, error)
- func (t *DashboardText) Diff(other *DashboardText) *DashboardTreeItemDiffs
- func (t *DashboardText) Equals(other *DashboardText) bool
- func (t *DashboardText) GetChildren() []ModTreeItem
- func (t *DashboardText) GetDeclRange() *hcl.Range
- func (t *DashboardText) GetDescription() string
- func (t *DashboardText) GetDisplay() string
- func (*DashboardText) GetDocumentation() string
- func (t *DashboardText) GetMod() *Mod
- func (t *DashboardText) GetParents() []ModTreeItem
- func (t *DashboardText) GetPaths() []NodePath
- func (t *DashboardText) GetReferences() []*ResourceReference
- func (t *DashboardText) GetTags() map[string]string
- func (t *DashboardText) GetTitle() string
- func (t *DashboardText) GetType() string
- func (t *DashboardText) GetUnqualifiedName() string
- func (t *DashboardText) GetWidth() int
- func (t *DashboardText) Name() string
- func (t *DashboardText) OnDecoded(*hcl.Block, ResourceMapsProvider) hcl.Diagnostics
- func (t *DashboardText) SetPaths()
- type DashboardTreeItemDiffs
- type EdgeAndNodeProvider
- type HclResource
- func GetResource(provider ResourceMapsProvider, parsedName *ParsedResourceName) (resource HclResource, found bool)
- func NewBenchmark(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewControl(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboard(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardCard(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardCategory(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardChart(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardContainer(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardEdge(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardFlow(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardGraph(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardHierarchy(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardImage(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardInput(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardNode(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardTable(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewDashboardText(block *hcl.Block, mod *Mod, shortName string) HclResource
- func NewQuery(block *hcl.Block, mod *Mod, shortName string) HclResource
- type Local
- func (l *Local) AddParent(parent ModTreeItem) error
- func (*Local) BlockType() string
- func (l *Local) CtyValue() (cty.Value, error)
- func (l *Local) Diff(other *Local) *DashboardTreeItemDiffs
- func (l *Local) GetChildren() []ModTreeItem
- func (l *Local) GetDeclRange() *hcl.Range
- func (l *Local) GetDescription() string
- func (*Local) GetDocumentation() string
- func (l *Local) GetMod() *Mod
- func (l *Local) GetParents() []ModTreeItem
- func (l *Local) GetPaths() []NodePath
- func (l *Local) GetTags() map[string]string
- func (l *Local) GetTitle() string
- func (l *Local) GetUnqualifiedName() string
- func (l *Local) Name() string
- func (l *Local) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (l *Local) SetPaths()
- type MappableResource
- type MissingVariableError
- type Mod
- func (m *Mod) AddChild(child ModTreeItem) error
- func (m *Mod) AddModDependencies(modVersions map[string]*ModVersionConstraint)
- func (m *Mod) AddParent(ModTreeItem) error
- func (m *Mod) AddReference(ref *ResourceReference)
- func (m *Mod) AddResource(item HclResource) hcl.Diagnostics
- func (*Mod) BlockType() string
- func (m *Mod) BuildResourceTree(loadedDependencyMods ModMap) (err error)
- func (m *Mod) CtyValue() (cty.Value, error)
- func (m *Mod) Equals(other *Mod) bool
- func (m *Mod) GetChildren() []ModTreeItem
- func (m *Mod) GetDeclRange() *hcl.Range
- func (m *Mod) GetDescription() string
- func (m *Mod) GetDocumentation() string
- func (m *Mod) GetMod() *Mod
- func (m *Mod) GetModDependency(modName string) *ModVersionConstraint
- func (m *Mod) GetModDependencyPath() string
- func (m *Mod) GetParents() []ModTreeItem
- func (m *Mod) GetPaths() []NodePath
- func (m *Mod) GetReferences() []*ResourceReference
- func (m *Mod) GetResourceMaps() *ResourceMaps
- func (m *Mod) GetTags() map[string]string
- func (m *Mod) GetTitle() string
- func (m *Mod) GetUnqualifiedName() string
- func (m *Mod) HasDependentMods() bool
- func (m *Mod) IsDefaultMod() bool
- func (m *Mod) Name() string
- func (m *Mod) NameWithVersion() string
- func (m *Mod) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (m *Mod) RemoveAllModDependencies()
- func (m *Mod) RemoveModDependencies(modVersions map[string]*ModVersionConstraint)
- func (m *Mod) Save() error
- func (m *Mod) SetFilePath(modFilePath string)
- func (m *Mod) SetPaths()
- func (m *Mod) ValidateSteampipeVersion() error
- func (m *Mod) WalkResources(resourceFunc func(item HclResource) (bool, error)) error
- type ModMap
- type ModTreeItem
- type ModVariableMap
- type ModVersionConstraint
- type ModVersionConstraintCollection
- type NamedItem
- type NamedItemList
- type NodePath
- type OpenGraph
- type ParamDef
- type ParsedPropertyPath
- type ParsedResourceName
- type PluginVersion
- type Pos
- type Query
- func (q *Query) AddParent(parent ModTreeItem) error
- func (q *Query) AddReference(ref *ResourceReference)
- func (*Query) BlockType() string
- func (q *Query) CtyValue() (cty.Value, error)
- func (q *Query) Diff(other *Query) *DashboardTreeItemDiffs
- func (q *Query) Equals(other *Query) bool
- func (q *Query) GetArgs() *QueryArgs
- func (q *Query) GetChildren() []ModTreeItem
- func (q *Query) GetDeclRange() *hcl.Range
- func (q *Query) GetDescription() string
- func (q *Query) GetDocumentation() string
- func (q *Query) GetMod() *Mod
- func (q *Query) GetParams() []*ParamDef
- func (q *Query) GetParents() []ModTreeItem
- func (q *Query) GetPaths() []NodePath
- func (q *Query) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
- func (q *Query) GetPreparedStatementName() string
- func (q *Query) GetQuery() *Query
- func (q *Query) GetReferences() []*ResourceReference
- func (q *Query) GetSQL() *string
- func (q *Query) GetTags() map[string]string
- func (q *Query) GetTitle() string
- func (q *Query) GetUnqualifiedName() string
- func (q *Query) InitialiseFromFile(modPath, filePath string) (MappableResource, []byte, error)
- func (q *Query) Name() string
- func (q *Query) OnDecoded(*hcl.Block, ResourceMapsProvider) hcl.Diagnostics
- func (q *Query) SetArgs(args *QueryArgs)
- func (q *Query) SetParams(params []*ParamDef)
- func (q *Query) SetPaths()
- func (q *Query) String() string
- type QueryArgs
- type QueryProvider
- type QueryProviderBase
- func (b *QueryProviderBase) AddRuntimeDependencies(dependencies []*RuntimeDependency)
- func (*QueryProviderBase) GetDescription() string
- func (b *QueryProviderBase) GetRuntimeDependencies() map[string]*RuntimeDependency
- func (b *QueryProviderBase) MergeParentArgs(queryProvider QueryProvider, parent QueryProvider) (diags hcl.Diagnostics)
- func (b *QueryProviderBase) MergeRuntimeDependencies(other QueryProvider)
- func (b *QueryProviderBase) RequiresExecution(queryProvider QueryProvider) bool
- func (b *QueryProviderBase) VerifyQuery(queryProvider QueryProvider) error
- type Range
- type Require
- func (r *Require) AddModDependencies(newModVersions map[string]*ModVersionConstraint)
- func (r *Require) ContainsMod(requiredModVersion *ModVersionConstraint) bool
- func (r *Require) Empty() bool
- func (r *Require) GetModDependency(name string) *ModVersionConstraint
- func (r *Require) RemoveAllModDependencies()
- func (r *Require) RemoveModDependencies(versions map[string]*ModVersionConstraint)
- func (r *Require) ValidateSteampipeVersion(modName string) error
- type ResolvedQuery
- type ResourceDependency
- type ResourceMaps
- func (m *ResourceMaps) AddResource(item HclResource) hcl.Diagnostics
- func (m *ResourceMaps) AddSnapshots(snapshotPaths []string)
- func (m *ResourceMaps) Empty() bool
- func (m *ResourceMaps) Equals(other *ResourceMaps) bool
- func (m *ResourceMaps) Merge(others []*ResourceMaps) *ResourceMaps
- func (m *ResourceMaps) PopulateReferences()
- func (m *ResourceMaps) QueryProviders() []QueryProvider
- func (m *ResourceMaps) WalkResources(resourceFunc func(item HclResource) (bool, error)) error
- type ResourceMapsProvider
- type ResourceMetadata
- type ResourceReference
- type ResourceReferenceMap
- type ResourceWithMetadata
- type ResourceWithMetadataBase
- func (b *ResourceWithMetadataBase) AddReference(ref *ResourceReference)
- func (b *ResourceWithMetadataBase) GetMetadata() *ResourceMetadata
- func (b *ResourceWithMetadataBase) GetReferences() []*ResourceReference
- func (b *ResourceWithMetadataBase) IsAnonymous() bool
- func (b *ResourceWithMetadataBase) SetAnonymous(block *hcl.Block)
- func (b *ResourceWithMetadataBase) SetMetadata(metadata *ResourceMetadata)
- type RuntimeDependency
- type Variable
- func (v *Variable) AddParent(parent ModTreeItem) error
- func (v *Variable) AddReference(*ResourceReference)
- func (*Variable) BlockType() string
- func (v *Variable) CtyValue() (cty.Value, error)
- func (v *Variable) Diff(other *Variable) *DashboardTreeItemDiffs
- func (v *Variable) Equals(other *Variable) bool
- func (v *Variable) GetChildren() []ModTreeItem
- func (v *Variable) GetDeclRange() *hcl.Range
- func (v *Variable) GetDescription() string
- func (*Variable) GetDocumentation() string
- func (v *Variable) GetMod() *Mod
- func (v *Variable) GetParents() []ModTreeItem
- func (v *Variable) GetPaths() []NodePath
- func (v *Variable) GetReferences() []*ResourceReference
- func (v *Variable) GetTags() map[string]string
- func (v *Variable) GetTitle() string
- func (v *Variable) GetUnqualifiedName() string
- func (v *Variable) Name() string
- func (v *Variable) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
- func (v *Variable) Required() bool
- func (v *Variable) SetInputValue(value cty.Value, sourceType string, sourceRange tfdiags.SourceRange) error
- func (v *Variable) SetPaths()
- type VariableValidationFailedError
- type VersionConstrainCollection
- type WorkspaceProfile
- func (p *WorkspaceProfile) ConfigMap() map[string]interface{}
- func (p *WorkspaceProfile) CtyValue() (cty.Value, error)
- func (p *WorkspaceProfile) Name() string
- func (p *WorkspaceProfile) OnDecoded() hcl.Diagnostics
- func (p *WorkspaceProfile) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
- type WorkspaceResources
Constants ¶
const ( BlockTypeMod = "mod" BlockTypeQuery = "query" BlockTypeControl = "control" BlockTypeBenchmark = "benchmark" BlockTypeDashboard = "dashboard" BlockTypeContainer = "container" BlockTypeChart = "chart" BlockTypeCard = "card" BlockTypeFlow = "flow" BlockTypeGraph = "graph" BlockTypeHierarchy = "hierarchy" BlockTypeImage = "image" BlockTypeInput = "input" BlockTypeTable = "table" BlockTypeText = "text" BlockTypeLocals = "locals" BlockTypeVariable = "variable" BlockTypeParam = "param" BlockTypeRequire = "require" BlockTypeNode = "node" BlockTypeEdge = "edge" BlockTypeLegacyRequires = "requires" BlockTypeCategory = "category" // config blocks BlockTypeConnection = "connection" BlockTypeOptions = "options" BlockTypeWorkspaceProfile = "workspace" ResourceTypeSnapshot = "snapshot" )
NOTE: when adding a block type, be sure to update QueryProviderBlocks/ReferenceBlocks/AllBlockTypes as needed
const (
ConnectionTypeAggregator = "aggregator"
)
Variables ¶
var EdgeAndNodeProviderBlocks = []string{ BlockTypeHierarchy, BlockTypeFlow, BlockTypeGraph, }
EdgeAndNodeProvider is a list of block types which implement EdgeAndNodeProvider
var QueryProviderBlocks = []string{ BlockTypeCard, BlockTypeChart, BlockTypeControl, BlockTypeEdge, BlockTypeFlow, BlockTypeGraph, BlockTypeHierarchy, BlockTypeImage, BlockTypeInput, BlockTypeQuery, BlockTypeNode, BlockTypeTable, }
QueryProviderBlocks is a list of block types which implement QueryProvider
var ReferenceBlocks = []string{ BlockTypeMod, BlockTypeQuery, BlockTypeControl, BlockTypeBenchmark, BlockTypeDashboard, BlockTypeContainer, BlockTypeCard, BlockTypeChart, BlockTypeFlow, BlockTypeGraph, BlockTypeHierarchy, BlockTypeImage, BlockTypeInput, BlockTypeTable, BlockTypeText, BlockTypeParam, BlockTypeCategory, }
ReferenceBlocks is a list of block types we store references for
var ResourceTypeMap = map[string]factoryFunc{ constants.SqlExtension: func(modPath, filePath string, mod *Mod) (MappableResource, []byte, error) { return QueryFromFile(modPath, filePath, mod) }, }
var ValidResourceItemTypes = []string{ BlockTypeMod, BlockTypeQuery, BlockTypeControl, BlockTypeBenchmark, BlockTypeDashboard, BlockTypeContainer, BlockTypeChart, BlockTypeCard, BlockTypeFlow, BlockTypeGraph, BlockTypeHierarchy, BlockTypeImage, BlockTypeInput, BlockTypeTable, BlockTypeText, BlockTypeLocals, BlockTypeVariable, BlockTypeParam, BlockTypeRequire, BlockTypeNode, BlockTypeEdge, BlockTypeLegacyRequires, BlockTypeCategory, BlockTypeConnection, BlockTypeOptions, BlockTypeWorkspaceProfile, "local", "ref", "var", }
Functions ¶
func BuildFullResourceName ¶ added in v0.17.0
func BuildModResourceName ¶
func GetCtyTypes ¶
GetCtyTypes builds a map of cty types for all tagged properties. It is used to convert the struct to a cty value
func IsValidResourceItemType ¶ added in v0.17.0
func ParseModFullName ¶
func PseudoResourceNameFromPath ¶
PseudoResourceNameFromPath converts a filepath into a resource name
It operates as follows:
- get filename
- remove extension
- sluggify, with '_' as the divider
func QueryProviderIsParameterised ¶
func QueryProviderIsParameterised(queryProvider QueryProvider) bool
QueryProviderIsParameterised returns whether the query provider has a parameterised query the query is parameterised if either there are any param defintions, or any positional arguments passed, or it has runtime dependencies (which must be args)
func RegisteredFileExtensions ¶
func RegisteredFileExtensions() []string
func ResolveArgsAsString ¶
func ResolveArgsAsString(source QueryProvider, runtimeArgs *QueryArgs) (string, []string, error)
ResolveArgsAsString resolves the argument values, falling back on defaults from param definitions in the source (if present) it returns the arg values as a csv string which can be used in a prepared statement invocation (the arg values and param defaults will already have been converted to postgres format)
func UnqualifiedResourceName ¶
UnqualifiedResourceName removes the mod prefix from the given name
Types ¶
type Benchmark ¶
type Benchmark struct { ResourceWithMetadataBase ShortName string `json:"-"` FullName string `cty:"name" json:"-"` UnqualifiedName string `json:"-"` // child names as NamedItem structs - used to allow setting children via the 'children' property ChildNames NamedItemList `cty:"child_names" json:"-"` // used for introspection tables ChildNameStrings []string `cty:"child_name_strings" column:"children,jsonb" json:"-"` // the actual children Children []ModTreeItem `json:"-"` Description *string `cty:"description" hcl:"description" column:"description,text" json:"-"` Documentation *string `cty:"documentation" hcl:"documentation" column:"documentation,text" json:"-"` Tags map[string]string `cty:"tags" hcl:"tags,optional" column:"tags,jsonb" json:"-"` Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` // dashboard specific properties Base *Benchmark `hcl:"base" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` DeclRange hcl.Range `json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` Parents []ModTreeItem `json:"-"` }
Benchmark is a struct representing the Benchmark resource
func (*Benchmark) AddParent ¶
func (b *Benchmark) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*Benchmark) AddReference ¶
func (b *Benchmark) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*Benchmark) Diff ¶
func (b *Benchmark) Diff(other *Benchmark) *DashboardTreeItemDiffs
func (*Benchmark) GetChildControls ¶
GetChildControls return a flat list of controls underneath the benchmark in the tree
func (*Benchmark) GetChildren ¶
func (b *Benchmark) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Benchmark) GetDeclRange ¶
func (b *Benchmark) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Benchmark) GetDescription ¶
GetDescription implements ModTreeItem, DashboardLeafNode
func (*Benchmark) GetDisplay ¶
GetDisplay implements DashboardLeafNode
func (*Benchmark) GetDocumentation ¶
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*Benchmark) GetParents ¶
func (b *Benchmark) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*Benchmark) GetReferences ¶
func (b *Benchmark) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*Benchmark) GetUnqualifiedName ¶
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*Benchmark) Name ¶
Name implements ModTreeItem, HclResource, ResourceWithMetadata return name in format: '<modname>.control.<shortName>'
func (*Benchmark) OnDecoded ¶
func (b *Benchmark) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*Benchmark) WalkResources ¶ added in v0.16.0
func (b *Benchmark) WalkResources(resourceFunc func(resource ModTreeItem) (bool, error)) error
type ConfigMap ¶ added in v0.17.0
type ConfigMap map[string]interface{}
func (ConfigMap) PopulateConfigMapForOptions ¶ added in v0.17.0
PopulateConfigMapForOptions populates the config map for a given options object NOTE: this mutates configMap
func (ConfigMap) SetIntItem ¶ added in v0.17.0
SetIntItem checks is int pointer is non-nul and if so, add to map with given key
func (ConfigMap) SetStringItem ¶ added in v0.17.0
SetStringItem checks is string pointer is non-nul and if so, add to map with given key
type Connection ¶
type Connection struct { // connection name Name string `json:"name,omitempty"` // The name of plugin as mentioned in config PluginShortName string `json:"plugin_short_name,omitempty"` // The fully qualified name of the plugin. derived from the short name Plugin string `json:"plugin,omitempty"` // Type - supported values: "aggregator" Type string `json:"type,omitempty"` // this is a list of names or wildcards which are resolved to connections // (only valid for "aggregator" type) ConnectionNames []string `json:"connections,omitempty"` // a list of the resolved child connections // (only valid for "aggregator" type) Connections map[string]*Connection `json:"-"` // unparsed HCL of plugin specific connection config Config string `json:"config,omitempty"` // options Options *options.Connection `json:"options,omitempty"` DeclRange Range `json:"decl_range,omitempty"` // legacy properties included for backwards compatibility with v0.13 LegacyName string `json:"Name,omitempty"` LegacyPluginShortName string `json:"PluginShortName,omitempty"` LegacyPlugin string `json:"Plugin,omitempty"` LegacyType string `json:"Type,omitempty"` LegacyConnectionNames []string `json:"Connections,omitempty"` LegacyConfig string `json:"Config,omitempty"` LegacyOptions *options.Connection `json:"Options,omitempty"` LegacyDeclRange hcl.Range `json:"DeclRange,omitempty"` }
Connection is a struct representing the partially parsed connection
(Partial as the connection config, which is plugin specific, is stored as raw HCL. This will be parsed by the plugin) json tags needed as this is stored in the connection state file
func NewConnection ¶
func NewConnection(block *hcl.Block) *Connection
func (*Connection) Equals ¶
func (c *Connection) Equals(other *Connection) bool
func (*Connection) FirstChild ¶
func (c *Connection) FirstChild() *Connection
FirstChild returns our first child (if we are an aggregator) as children are stored in a map we first sort the map keys then return the first
func (*Connection) GetResolveConnectionNames ¶ added in v0.16.0
func (c *Connection) GetResolveConnectionNames() []string
GetResolveConnectionNames return the names of all child connections (will only be non-empty for aggregator connections)
func (*Connection) MaintainLegacy ¶
func (c *Connection) MaintainLegacy()
MaintainLegacy keeps the values of the legacy properties intact while refreshing connections
func (*Connection) MigrateLegacy ¶
func (c *Connection) MigrateLegacy()
MigrateLegacy migrates the legacy properties into new properties
func (*Connection) PopulateChildren ¶
func (c *Connection) PopulateChildren(connectionMap map[string]*Connection)
func (*Connection) SetOptions ¶
func (c *Connection) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
SetOptions sets the options on the connection verify the options object is a valid options type (only options.Connection currently supported)
func (*Connection) String ¶
func (c *Connection) String() string
func (*Connection) Validate ¶
func (c *Connection) Validate(connectionMap map[string]*Connection) []string
Validate verifies the Type property is valid, if this is an aggregator connection, there must be at least one child, and no duplicates if this is NOT an aggregator, there must be no children
func (*Connection) ValidateAggregatorConnection ¶
func (c *Connection) ValidateAggregatorConnection(connectionMap map[string]*Connection) []string
type Control ¶
type Control struct { ResourceWithMetadataBase QueryProviderBase // required to allow partial decoding Remain hcl.Body `hcl:",remain" json:"-"` ShortName string `json:"-"` FullName string `cty:"name" json:"-"` Description *string `cty:"description" hcl:"description" column:"description,text" json:"-"` Documentation *string `cty:"documentation" hcl:"documentation" column:"documentation,text" json:"-"` SearchPath *string `cty:"search_path" hcl:"search_path" column:"search_path,text" json:"search_path,omitempty"` SearchPathPrefix *string `cty:"search_path_prefix" hcl:"search_path_prefix" column:"search_path_prefix,text" json:"search_path_prefix,omitempty"` Severity *string `cty:"severity" hcl:"severity" column:"severity,text" json:"severity,omitempty"` Tags map[string]string `cty:"tags" hcl:"tags,optional" column:"tags,jsonb" json:"-"` Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"sql,omitempty"` Query *Query `hcl:"query" json:"query,omitempty"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb" json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` References []*ResourceReference ` json:"-"` Mod *Mod `cty:"mod" json:"-"` DeclRange hcl.Range `json:"-"` UnqualifiedName string `json:"-"` Paths []NodePath `json:"-"` // dashboard specific properties Base *Control `hcl:"base" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` // contains filtered or unexported fields }
Control is a struct representing the Control resource
func (*Control) AddParent ¶
func (c *Control) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*Control) AddReference ¶
func (c *Control) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*Control) Diff ¶
func (c *Control) Diff(other *Control) *DashboardTreeItemDiffs
func (*Control) GetChildren ¶
func (c *Control) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Control) GetDeclRange ¶
func (c *Control) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Control) GetDescription ¶
GetDescription implements ModTreeItem
func (*Control) GetDisplay ¶
GetDisplay implements DashboardLeafNode
func (*Control) GetDocumentation ¶
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*Control) GetParentNames ¶
func (*Control) GetParents ¶
func (c *Control) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*Control) GetPreparedStatementExecuteSQL ¶
func (c *Control) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*Control) GetPreparedStatementName ¶
GetPreparedStatementName implements QueryProvider
func (*Control) GetReferences ¶
func (c *Control) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*Control) GetUnqualifiedName ¶
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*Control) Name ¶
Name implements ModTreeItem, HclResource return name in format: 'control.<shortName>'
func (*Control) OnDecoded ¶
func (c *Control) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*Control) QualifiedNameWithVersion ¶
QualifiedNameWithVersion returns the name in format: '<modName>@version.control.<shortName>'
type Dashboard ¶
type Dashboard struct { ResourceWithMetadataBase // required to allow partial decoding Remain hcl.Body `hcl:",remain"` ShortName string FullName string `cty:"name"` UnqualifiedName string `cty:"unqualified_name"` Title *string `cty:"title" hcl:"title" column:"title,text"` Width *int `cty:"width" hcl:"width" column:"width,text"` Display *string `cty:"display" hcl:"display" column:"display,text"` Inputs []*DashboardInput `cty:"inputs" column:"inputs,jsonb"` Description *string `cty:"description" hcl:"description" column:"description,text"` Documentation *string `cty:"documentation" hcl:"documentation" column:"documentation,text"` Tags map[string]string `cty:"tags" hcl:"tags,optional" column:"tags,jsonb"` UrlPath string `cty:"url_path" column:"url_path,jsonb"` Base *Dashboard `hcl:"base"` References []*ResourceReference Mod *Mod `cty:"mod"` DeclRange hcl.Range Paths []NodePath `column:"path,jsonb"` // store children in a way which can be serialised via cty ChildNames []string `cty:"children" column:"children,jsonb"` // contains filtered or unexported fields }
Dashboard is a struct representing the Dashboard resource
func NewQueryDashboard ¶ added in v0.17.0
func NewQueryDashboard(q ModTreeItem) (*Dashboard, error)
NewQueryDashboard creates a dashboard to wrap a query/control this is used for snapshot generation
func (*Dashboard) AddChild ¶
func (d *Dashboard) AddChild(child ModTreeItem)
func (*Dashboard) AddParent ¶
func (d *Dashboard) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*Dashboard) AddReference ¶
func (d *Dashboard) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*Dashboard) BuildRuntimeDependencyTree ¶
func (d *Dashboard) BuildRuntimeDependencyTree(workspace ResourceMapsProvider) error
func (*Dashboard) Diff ¶
func (d *Dashboard) Diff(other *Dashboard) *DashboardTreeItemDiffs
func (*Dashboard) GetChildren ¶
func (d *Dashboard) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Dashboard) GetDeclRange ¶
func (d *Dashboard) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Dashboard) GetDescription ¶
GetDescription implements ModTreeItem
func (*Dashboard) GetDocumentation ¶ added in v0.17.0
GetDocumentation implement ModTreeItem
func (*Dashboard) GetParents ¶
func (d *Dashboard) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*Dashboard) GetReferences ¶
func (d *Dashboard) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*Dashboard) GetUnqualifiedName ¶
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*Dashboard) OnDecoded ¶
func (d *Dashboard) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*Dashboard) SetChildren ¶
func (d *Dashboard) SetChildren(children []ModTreeItem)
func (*Dashboard) SetInputs ¶
func (d *Dashboard) SetInputs(inputs []*DashboardInput) hcl.Diagnostics
func (*Dashboard) WalkResources ¶
func (d *Dashboard) WalkResources(resourceFunc func(resource HclResource) (bool, error)) error
type DashboardCard ¶
type DashboardCard struct { ResourceWithMetadataBase QueryProviderBase FullName string `cty:"name" json:"-"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` Label *string `cty:"label" hcl:"label" column:"label,text" json:"label,omitempty"` Value *string `cty:"value" hcl:"value" column:"value,text" json:"value,omitempty"` Icon *string `cty:"icon" hcl:"icon" column:"icon,text" json:"icon,omitempty"` HREF *string `cty:"href" hcl:"href" json:"href,omitempty"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb" json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardCard `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardCard is a struct representing a leaf dashboard node
func (*DashboardCard) AddParent ¶
func (c *DashboardCard) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardCard) AddReference ¶
func (c *DashboardCard) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardCard) BlockType ¶ added in v0.17.0
func (*DashboardCard) BlockType() string
BlockType implements HclResource
func (*DashboardCard) CtyValue ¶
func (c *DashboardCard) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardCard) Diff ¶
func (c *DashboardCard) Diff(other *DashboardCard) *DashboardTreeItemDiffs
func (*DashboardCard) Equals ¶
func (c *DashboardCard) Equals(other *DashboardCard) bool
func (*DashboardCard) GetArgs ¶
func (c *DashboardCard) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardCard) GetChildren ¶
func (c *DashboardCard) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardCard) GetDeclRange ¶
func (c *DashboardCard) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardCard) GetDescription ¶
func (c *DashboardCard) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardCard) GetDisplay ¶
func (c *DashboardCard) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardCard) GetDocumentation ¶
func (c *DashboardCard) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardCard) GetParams ¶
func (c *DashboardCard) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardCard) GetParents ¶
func (c *DashboardCard) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardCard) GetPaths ¶
func (c *DashboardCard) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardCard) GetPreparedStatementExecuteSQL ¶
func (c *DashboardCard) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardCard) GetPreparedStatementName ¶
func (c *DashboardCard) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardCard) GetQuery ¶
func (c *DashboardCard) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardCard) GetReferences ¶
func (c *DashboardCard) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardCard) GetSQL ¶
func (c *DashboardCard) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardCard) GetTags ¶
func (c *DashboardCard) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardCard) GetTitle ¶
func (c *DashboardCard) GetTitle() string
GetTitle implements HclResource
func (*DashboardCard) GetType ¶
func (c *DashboardCard) GetType() string
GetType implements DashboardLeafNode
func (*DashboardCard) GetUnqualifiedName ¶
func (c *DashboardCard) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode
func (*DashboardCard) GetWidth ¶
func (c *DashboardCard) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardCard) Name ¶
func (c *DashboardCard) Name() string
Name implements HclResource, ModTreeItem return name in format: 'card.<shortName>'
func (*DashboardCard) OnDecoded ¶
func (c *DashboardCard) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardCard) SetArgs ¶
func (c *DashboardCard) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardCard) SetParams ¶
func (c *DashboardCard) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardCard) VerifyQuery ¶
func (c *DashboardCard) VerifyQuery(QueryProvider) error
VerifyQuery implements QueryProvider
type DashboardCategory ¶ added in v0.17.0
type DashboardCategory struct { ResourceWithMetadataBase ShortName string `hcl:"name,label" json:"name"` FullName string `cty:"name" json:"-"` UnqualifiedName string `json:"-"` Title *string `cty:"title" hcl:"title" json:"title,omitempty"` Color *string `cty:"color" hcl:"color" json:"color,omitempty"` Depth *int `cty:"depth" hcl:"depth" json:"depth,omitempty"` Icon *string `cty:"icon" hcl:"icon" json:"icon,omitempty"` HREF *string `cty:"href" hcl:"href" json:"href,omitempty"` Fold *DashboardCategoryFold `cty:"fold" hcl:"fold,block" json:"fold,omitempty"` Fields DashboardCategoryFieldList `cty:"fields" hcl:"field,block" json:"fields,omitempty"` Base *DashboardCategory `hcl:"base" json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` DeclRange hcl.Range `json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` Parents []ModTreeItem `json:"-"` }
func (*DashboardCategory) AddParent ¶ added in v0.17.0
func (c *DashboardCategory) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardCategory) AddReference ¶ added in v0.17.0
func (c *DashboardCategory) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardCategory) BlockType ¶ added in v0.17.0
func (*DashboardCategory) BlockType() string
BlockType implements HclResource
func (*DashboardCategory) CtyValue ¶ added in v0.17.0
func (c *DashboardCategory) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardCategory) Diff ¶ added in v0.17.0
func (c *DashboardCategory) Diff(other *DashboardCategory) *DashboardTreeItemDiffs
func (*DashboardCategory) Equals ¶ added in v0.17.0
func (c *DashboardCategory) Equals(other *DashboardCategory) bool
func (*DashboardCategory) GetChildren ¶ added in v0.17.0
func (c *DashboardCategory) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardCategory) GetDeclRange ¶ added in v0.17.0
func (c *DashboardCategory) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardCategory) GetDescription ¶ added in v0.17.0
func (c *DashboardCategory) GetDescription() string
GetDescription implements ModTreeItem, DashboardLeafNode
func (*DashboardCategory) GetDocumentation ¶ added in v0.17.0
func (*DashboardCategory) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardCategory) GetMod ¶ added in v0.17.0
func (c *DashboardCategory) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardCategory) GetParents ¶ added in v0.17.0
func (c *DashboardCategory) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardCategory) GetPaths ¶ added in v0.17.0
func (c *DashboardCategory) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardCategory) GetReferences ¶ added in v0.17.0
func (c *DashboardCategory) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardCategory) GetTags ¶ added in v0.17.0
func (c *DashboardCategory) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardCategory) GetTitle ¶ added in v0.17.0
func (c *DashboardCategory) GetTitle() string
GetTitle implements HclResource
func (*DashboardCategory) GetUnqualifiedName ¶ added in v0.17.0
func (c *DashboardCategory) GetUnqualifiedName() string
GetUnqualifiedName implements HclResource
func (*DashboardCategory) Name ¶ added in v0.17.0
func (c *DashboardCategory) Name() string
Name implements HclResource return name in format: '<modname>.control.<shortName>'
func (*DashboardCategory) OnDecoded ¶ added in v0.17.0
func (c *DashboardCategory) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardCategory) SetPaths ¶ added in v0.17.0
func (c *DashboardCategory) SetPaths()
SetPaths implements ModTreeItem
type DashboardCategoryField ¶ added in v0.17.0
type DashboardCategoryField struct { Name string `hcl:"name,label" json:"name"` Display *string `cty:"display" hcl:"display" json:"display,omitempty"` Wrap *string `cty:"wrap" hcl:"wrap" json:"wrap,omitempty"` HREF *string `cty:"href" hcl:"href" json:"href,omitempty"` }
func (DashboardCategoryField) Equals ¶ added in v0.17.0
func (c DashboardCategoryField) Equals(other *DashboardCategoryField) bool
type DashboardCategoryFieldList ¶ added in v0.17.0
type DashboardCategoryFieldList []*DashboardCategoryField
func (*DashboardCategoryFieldList) Merge ¶ added in v0.17.0
func (c *DashboardCategoryFieldList) Merge(other DashboardCategoryFieldList)
type DashboardCategoryFold ¶ added in v0.17.0
type DashboardCategoryFold struct { Title *string `cty:"title" hcl:"title" json:"title,omitempty"` Threshold *int `cty:"threshold" hcl:"threshold" json:"threshold,omitempty"` Icon *string `cty:"icon" hcl:"icon" json:"icon,omitempty"` }
func (DashboardCategoryFold) Equals ¶ added in v0.17.0
func (f DashboardCategoryFold) Equals(other *DashboardCategoryFold) bool
type DashboardCategoryList ¶ added in v0.17.0
type DashboardCategoryList []*DashboardCategory
func (*DashboardCategoryList) Merge ¶ added in v0.17.0
func (c *DashboardCategoryList) Merge(other DashboardCategoryList)
type DashboardChart ¶
type DashboardChart struct { ResourceWithMetadataBase QueryProviderBase // required to allow partial decoding Remain hcl.Body `hcl:",remain" json:"-"` FullName string `cty:"name" json:"-"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` Legend *DashboardChartLegend `cty:"legend" hcl:"legend,block" column:"legend,jsonb" json:"legend,omitempty"` SeriesList DashboardChartSeriesList `cty:"series_list" hcl:"series,block" column:"series,jsonb" json:"-"` Axes *DashboardChartAxes `cty:"axes" hcl:"axes,block" column:"axes,jsonb" json:"axes,omitempty"` Grouping *string `cty:"grouping" hcl:"grouping" json:"grouping,omitempty"` Transform *string `cty:"transform" hcl:"transform" json:"transform,omitempty"` Series map[string]*DashboardChartSeries `cty:"series" json:"series,omitempty"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb" json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardChart `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardChart is a struct representing a leaf dashboard node
func (*DashboardChart) AddParent ¶
func (c *DashboardChart) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardChart) AddReference ¶
func (c *DashboardChart) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardChart) BlockType ¶ added in v0.17.0
func (*DashboardChart) BlockType() string
BlockType implements HclResource
func (*DashboardChart) CtyValue ¶
func (c *DashboardChart) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardChart) Diff ¶
func (c *DashboardChart) Diff(other *DashboardChart) *DashboardTreeItemDiffs
func (*DashboardChart) Equals ¶
func (c *DashboardChart) Equals(other *DashboardChart) bool
func (*DashboardChart) GetArgs ¶
func (c *DashboardChart) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardChart) GetChildren ¶
func (c *DashboardChart) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardChart) GetDeclRange ¶
func (c *DashboardChart) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardChart) GetDescription ¶
func (c *DashboardChart) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardChart) GetDisplay ¶
func (c *DashboardChart) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardChart) GetDocumentation ¶
func (c *DashboardChart) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardChart) GetMod ¶
func (c *DashboardChart) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardChart) GetParams ¶
func (c *DashboardChart) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardChart) GetParents ¶
func (c *DashboardChart) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardChart) GetPaths ¶
func (c *DashboardChart) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardChart) GetPreparedStatementExecuteSQL ¶
func (c *DashboardChart) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardChart) GetPreparedStatementName ¶
func (c *DashboardChart) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardChart) GetQuery ¶
func (c *DashboardChart) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardChart) GetReferences ¶
func (c *DashboardChart) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardChart) GetSQL ¶
func (c *DashboardChart) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardChart) GetTags ¶
func (c *DashboardChart) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardChart) GetTitle ¶
func (c *DashboardChart) GetTitle() string
GetTitle implements HclResource
func (*DashboardChart) GetType ¶
func (c *DashboardChart) GetType() string
GetType implements DashboardLeafNode
func (*DashboardChart) GetUnqualifiedName ¶
func (c *DashboardChart) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardChart) GetWidth ¶
func (c *DashboardChart) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardChart) Name ¶
func (c *DashboardChart) Name() string
Name implements HclResource, ModTreeItem return name in format: 'chart.<shortName>'
func (*DashboardChart) OnDecoded ¶
func (c *DashboardChart) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardChart) SetArgs ¶
func (c *DashboardChart) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardChart) SetParams ¶
func (c *DashboardChart) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardChart) SetPaths ¶
func (c *DashboardChart) SetPaths()
SetPaths implements ModTreeItem
type DashboardChartAxes ¶
type DashboardChartAxes struct { X *DashboardChartAxesX `cty:"x" hcl:"x,block" json:"x,omitempty"` Y *DashboardChartAxesY `cty:"y" hcl:"y,block" json:"y,omitempty"` }
func (*DashboardChartAxes) Equals ¶
func (a *DashboardChartAxes) Equals(other *DashboardChartAxes) bool
func (*DashboardChartAxes) Merge ¶
func (a *DashboardChartAxes) Merge(other *DashboardChartAxes)
type DashboardChartAxesX ¶
type DashboardChartAxesX struct { Title *DashboardChartAxisTitle `cty:"title" hcl:"title,block" json:"title,omitempty"` Labels *DashboardChartLabels `cty:"labels" hcl:"labels,block" json:"labels,omitempty"` Min *int `cty:"min" hcl:"min" json:"min,omitempty"` Max *int `cty:"max" hcl:"max" json:"max,omitempty"` }
func (*DashboardChartAxesX) Equals ¶
func (x *DashboardChartAxesX) Equals(other *DashboardChartAxesX) bool
func (*DashboardChartAxesX) Merge ¶
func (x *DashboardChartAxesX) Merge(other *DashboardChartAxesX)
type DashboardChartAxesY ¶
type DashboardChartAxesY struct { Title *DashboardChartAxisTitle `cty:"title" hcl:"title,block" json:"title,omitempty"` Labels *DashboardChartLabels `cty:"labels" hcl:"labels,block" json:"labels,omitempty"` Min *int `cty:"min" hcl:"min" json:"min,omitempty"` Max *int `cty:"max" hcl:"max" json:"max,omitempty"` }
func (*DashboardChartAxesY) Equals ¶
func (y *DashboardChartAxesY) Equals(other *DashboardChartAxesY) bool
func (*DashboardChartAxesY) Merge ¶
func (y *DashboardChartAxesY) Merge(other *DashboardChartAxesY)
type DashboardChartAxisTitle ¶
type DashboardChartAxisTitle struct { Display *string `cty:"display" hcl:"display" json:"display,omitempty"` Align *string `cty:"align" hcl:"align" json:"align,omitempty"` Value *string `cty:"value" hcl:"value" json:"value,omitempty"` }
func (*DashboardChartAxisTitle) Equals ¶
func (t *DashboardChartAxisTitle) Equals(other *DashboardChartAxisTitle) bool
func (*DashboardChartAxisTitle) Merge ¶
func (t *DashboardChartAxisTitle) Merge(other *DashboardChartAxisTitle)
type DashboardChartLabels ¶
type DashboardChartLabels struct { Display *string `cty:"display" hcl:"display" json:"display,omitempty"` Format *string `cty:"format" hcl:"format" json:"format,omitempty"` }
func (*DashboardChartLabels) Equals ¶
func (l *DashboardChartLabels) Equals(other *DashboardChartLabels) bool
func (*DashboardChartLabels) Merge ¶
func (l *DashboardChartLabels) Merge(other *DashboardChartLabels)
type DashboardChartLegend ¶
type DashboardChartLegend struct { Display *string `cty:"display" hcl:"display" json:"display,omitempty"` Position *string `cty:"position" hcl:"position" json:"position,omitempty"` }
func (*DashboardChartLegend) Equals ¶
func (l *DashboardChartLegend) Equals(other *DashboardChartLegend) bool
func (*DashboardChartLegend) Merge ¶
func (l *DashboardChartLegend) Merge(other *DashboardChartLegend)
type DashboardChartSeries ¶
type DashboardChartSeries struct { Name string `hcl:"name,label" json:"name"` Title *string `cty:"title" hcl:"title" json:"title,omitempty"` Color *string `cty:"color" hcl:"color" json:"color,omitempty"` Points map[string]*DashboardChartSeriesPoint `cty:"points" json:"points,omitempty"` PointsList []*DashboardChartSeriesPoint `hcl:"point,block" json:"-"` }
func (DashboardChartSeries) Equals ¶
func (s DashboardChartSeries) Equals(other *DashboardChartSeries) bool
func (*DashboardChartSeries) OnDecoded ¶
func (s *DashboardChartSeries) OnDecoded()
type DashboardChartSeriesList ¶
type DashboardChartSeriesList []*DashboardChartSeries
func (*DashboardChartSeriesList) Merge ¶
func (s *DashboardChartSeriesList) Merge(other DashboardChartSeriesList)
type DashboardChartSeriesPoint ¶
type DashboardChartSeriesPoint struct { Name string `hcl:"name,label" json:"-"` Color *string `cty:"color" hcl:"color" json:"color,omitempty"` }
func (DashboardChartSeriesPoint) Equals ¶
func (s DashboardChartSeriesPoint) Equals(other *DashboardChartSeriesPoint) bool
type DashboardContainer ¶
type DashboardContainer struct { ResourceWithMetadataBase // required to allow partial decoding Remain hcl.Body `hcl:",remain"` ShortName string FullName string `cty:"name"` UnqualifiedName string `cty:"unqualified_name"` Title *string `cty:"title" hcl:"title" column:"title,text"` Width *int `cty:"width" hcl:"width" column:"width,text"` Display *string `cty:"display" hcl:"display"` Inputs []*DashboardInput `cty:"inputs" column:"inputs,jsonb"` References []*ResourceReference Mod *Mod `cty:"mod"` DeclRange hcl.Range Paths []NodePath `column:"path,jsonb"` // store children in a way which can be serialised via cty ChildNames []string `cty:"children" column:"children,jsonb"` // contains filtered or unexported fields }
DashboardContainer is a struct representing the Dashboard and Container resource
func (*DashboardContainer) AddChild ¶
func (c *DashboardContainer) AddChild(child ModTreeItem)
func (*DashboardContainer) AddParent ¶
func (c *DashboardContainer) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardContainer) AddReference ¶
func (c *DashboardContainer) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardContainer) BlockType ¶ added in v0.17.0
func (*DashboardContainer) BlockType() string
BlockType implements HclResource
func (*DashboardContainer) CtyValue ¶
func (c *DashboardContainer) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardContainer) Diff ¶
func (c *DashboardContainer) Diff(other *DashboardContainer) *DashboardTreeItemDiffs
func (*DashboardContainer) Equals ¶
func (c *DashboardContainer) Equals(other *DashboardContainer) bool
func (*DashboardContainer) GetChildren ¶
func (c *DashboardContainer) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardContainer) GetDeclRange ¶
func (c *DashboardContainer) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardContainer) GetDescription ¶
func (c *DashboardContainer) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardContainer) GetDocumentation ¶ added in v0.17.0
func (*DashboardContainer) GetDocumentation() string
GetDocumentation implement ModTreeItem
func (*DashboardContainer) GetMod ¶
func (c *DashboardContainer) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardContainer) GetParents ¶
func (c *DashboardContainer) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardContainer) GetPaths ¶
func (c *DashboardContainer) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardContainer) GetReferences ¶
func (c *DashboardContainer) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardContainer) GetTags ¶
func (c *DashboardContainer) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardContainer) GetTitle ¶
func (c *DashboardContainer) GetTitle() string
GetTitle implements HclResource
func (*DashboardContainer) GetUnqualifiedName ¶
func (c *DashboardContainer) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardContainer) Name ¶
func (c *DashboardContainer) Name() string
Name implements HclResource, ModTreeItem
func (*DashboardContainer) OnDecoded ¶
func (c *DashboardContainer) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardContainer) SetChildren ¶
func (c *DashboardContainer) SetChildren(children []ModTreeItem)
func (*DashboardContainer) SetPaths ¶
func (c *DashboardContainer) SetPaths()
SetPaths implements ModTreeItem
func (*DashboardContainer) WalkResources ¶
func (c *DashboardContainer) WalkResources(resourceFunc func(resource HclResource) (bool, error)) error
type DashboardEdge ¶ added in v0.17.0
type DashboardEdge struct { ResourceWithMetadataBase QueryProviderBase // required to allow partial decoding Remain hcl.Body `hcl:",remain" json:"-"` FullName string `cty:"name" json:"name"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` Category *DashboardCategory `cty:"category" hcl:"category" column:"category,jsonb" json:"category,omitempty"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb" json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardEdge `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardEdge is a struct representing a leaf dashboard node
func (*DashboardEdge) AddParent ¶ added in v0.17.0
func (e *DashboardEdge) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardEdge) AddReference ¶ added in v0.17.0
func (e *DashboardEdge) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardEdge) BlockType ¶ added in v0.17.0
func (*DashboardEdge) BlockType() string
BlockType implements HclResource
func (*DashboardEdge) CtyValue ¶ added in v0.17.0
func (e *DashboardEdge) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardEdge) Diff ¶ added in v0.17.0
func (e *DashboardEdge) Diff(other *DashboardEdge) *DashboardTreeItemDiffs
func (*DashboardEdge) Equals ¶ added in v0.17.0
func (e *DashboardEdge) Equals(other *DashboardEdge) bool
func (*DashboardEdge) GetArgs ¶ added in v0.17.0
func (e *DashboardEdge) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardEdge) GetChildren ¶ added in v0.17.0
func (e *DashboardEdge) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardEdge) GetDeclRange ¶ added in v0.17.0
func (e *DashboardEdge) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardEdge) GetDescription ¶ added in v0.17.0
func (e *DashboardEdge) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardEdge) GetDisplay ¶ added in v0.17.0
func (e *DashboardEdge) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardEdge) GetDocumentation ¶ added in v0.17.0
func (e *DashboardEdge) GetDocumentation() string
GetDocumentation implements DashboardLeafNode
func (*DashboardEdge) GetMod ¶ added in v0.17.0
func (e *DashboardEdge) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardEdge) GetParams ¶ added in v0.17.0
func (e *DashboardEdge) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardEdge) GetParents ¶ added in v0.17.0
func (e *DashboardEdge) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardEdge) GetPaths ¶ added in v0.17.0
func (e *DashboardEdge) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardEdge) GetPreparedStatementExecuteSQL ¶ added in v0.17.0
func (e *DashboardEdge) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardEdge) GetPreparedStatementName ¶ added in v0.17.0
func (e *DashboardEdge) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardEdge) GetQuery ¶ added in v0.17.0
func (e *DashboardEdge) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardEdge) GetReferences ¶ added in v0.17.0
func (e *DashboardEdge) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardEdge) GetSQL ¶ added in v0.17.0
func (e *DashboardEdge) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardEdge) GetTags ¶ added in v0.17.0
func (e *DashboardEdge) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardEdge) GetTitle ¶ added in v0.17.0
func (e *DashboardEdge) GetTitle() string
GetTitle implements HclResource
func (*DashboardEdge) GetType ¶ added in v0.17.0
func (e *DashboardEdge) GetType() string
GetType implements DashboardLeafNode
func (*DashboardEdge) GetUnqualifiedName ¶ added in v0.17.0
func (e *DashboardEdge) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardEdge) GetWidth ¶ added in v0.17.0
func (e *DashboardEdge) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardEdge) IsSnapshotPanel ¶ added in v0.17.0
func (*DashboardEdge) IsSnapshotPanel()
IsSnapshotPanel implements SnapshotPanel
func (*DashboardEdge) Name ¶ added in v0.17.0
func (e *DashboardEdge) Name() string
Name implements HclResource, ModTreeItem return name in format: 'edge.<shortName>'
func (*DashboardEdge) OnDecoded ¶ added in v0.17.0
func (e *DashboardEdge) OnDecoded(_ *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardEdge) SetArgs ¶ added in v0.17.0
func (e *DashboardEdge) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardEdge) SetParams ¶ added in v0.17.0
func (e *DashboardEdge) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardEdge) SetPaths ¶ added in v0.17.0
func (e *DashboardEdge) SetPaths()
SetPaths implements ModTreeItem
type DashboardEdgeList ¶ added in v0.17.0
type DashboardEdgeList []*DashboardEdge
func (*DashboardEdgeList) Merge ¶ added in v0.17.0
func (l *DashboardEdgeList) Merge(other DashboardEdgeList)
func (*DashboardEdgeList) Names ¶ added in v0.17.0
func (l *DashboardEdgeList) Names() []string
type DashboardFlow ¶
type DashboardFlow struct { ResourceWithMetadataBase QueryProviderBase // required to allow partial decoding Remain hcl.Body `hcl:",remain" json:"-"` FullName string `cty:"name" json:"-"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` Nodes DashboardNodeList `cty:"node_list" hcl:"nodes,optional" column:"nodes,jsonb" json:"-"` Edges DashboardEdgeList `cty:"edge_list" hcl:"edges,optional" column:"edges,jsonb" json:"-"` // for the snapshot we just serialise the names of nodes and edges NodeNames []string `json:"nodes"` EdgeNames []string ` json:"edges"` Categories map[string]*DashboardCategory `cty:"categories" json:"categories"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb" json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardFlow `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardFlow is a struct representing a leaf dashboard node
func (*DashboardFlow) AddCategory ¶ added in v0.17.0
func (f *DashboardFlow) AddCategory(category *DashboardCategory) hcl.Diagnostics
AddCategory implements EdgeAndNodeProvider
func (*DashboardFlow) AddParent ¶
func (f *DashboardFlow) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardFlow) AddReference ¶
func (f *DashboardFlow) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardFlow) BlockType ¶ added in v0.17.0
func (*DashboardFlow) BlockType() string
BlockType implements HclResource
func (*DashboardFlow) CtyValue ¶
func (f *DashboardFlow) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardFlow) Diff ¶
func (f *DashboardFlow) Diff(other *DashboardFlow) *DashboardTreeItemDiffs
func (*DashboardFlow) Equals ¶
func (f *DashboardFlow) Equals(other *DashboardFlow) bool
func (*DashboardFlow) GetArgs ¶
func (f *DashboardFlow) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardFlow) GetChildren ¶
func (f *DashboardFlow) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardFlow) GetDeclRange ¶
func (f *DashboardFlow) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardFlow) GetDescription ¶
func (f *DashboardFlow) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardFlow) GetDisplay ¶
func (f *DashboardFlow) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardFlow) GetDocumentation ¶
func (f *DashboardFlow) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardFlow) GetEdges ¶ added in v0.17.0
func (f *DashboardFlow) GetEdges() DashboardEdgeList
GetEdges implements EdgeAndNodeProvider
func (*DashboardFlow) GetNodes ¶ added in v0.17.0
func (f *DashboardFlow) GetNodes() DashboardNodeList
GetNodes implements EdgeAndNodeProvider
func (*DashboardFlow) GetParams ¶
func (f *DashboardFlow) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardFlow) GetParents ¶
func (f *DashboardFlow) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardFlow) GetPaths ¶
func (f *DashboardFlow) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardFlow) GetPreparedStatementExecuteSQL ¶
func (f *DashboardFlow) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardFlow) GetPreparedStatementName ¶
func (f *DashboardFlow) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardFlow) GetQuery ¶
func (f *DashboardFlow) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardFlow) GetReferences ¶
func (f *DashboardFlow) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardFlow) GetSQL ¶
func (f *DashboardFlow) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardFlow) GetTags ¶
func (f *DashboardFlow) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardFlow) GetTitle ¶
func (f *DashboardFlow) GetTitle() string
GetTitle implements HclResource
func (*DashboardFlow) GetType ¶
func (f *DashboardFlow) GetType() string
GetType implements DashboardLeafNode
func (*DashboardFlow) GetUnqualifiedName ¶
func (f *DashboardFlow) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardFlow) GetWidth ¶
func (f *DashboardFlow) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardFlow) Name ¶
func (f *DashboardFlow) Name() string
Name implements HclResource, ModTreeItem return name in format: 'chart.<shortName>'
func (*DashboardFlow) OnDecoded ¶
func (f *DashboardFlow) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardFlow) SetArgs ¶
func (f *DashboardFlow) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardFlow) SetEdges ¶ added in v0.17.0
func (f *DashboardFlow) SetEdges(edges DashboardEdgeList)
SetEdges implements EdgeAndNodeProvider
func (*DashboardFlow) SetNodes ¶ added in v0.17.0
func (f *DashboardFlow) SetNodes(nodes DashboardNodeList)
SetNodes implements EdgeAndNodeProvider
func (*DashboardFlow) SetParams ¶
func (f *DashboardFlow) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardFlow) VerifyQuery ¶ added in v0.17.0
func (*DashboardFlow) VerifyQuery(QueryProvider) error
VerifyQuery implements QueryProvider
type DashboardGraph ¶ added in v0.17.0
type DashboardGraph struct { ResourceWithMetadataBase QueryProviderBase // required to allow partial decoding Remain hcl.Body `hcl:",remain" json:"-"` FullName string `cty:"name" json:"-"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` Nodes DashboardNodeList `cty:"node_list" hcl:"nodes,optional" column:"nodes,jsonb" json:"-"` Edges DashboardEdgeList `cty:"edge_list" hcl:"edges,optional" column:"edges,jsonb" json:"-"` // for the snapshot we just serialise the names of nodes and edges NodeNames []string `json:"nodes"` EdgeNames []string ` json:"edges"` Categories map[string]*DashboardCategory `cty:"categories" json:"categories"` Direction *string `cty:"direction" hcl:"direction" column:"direction,text" json:"direction"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb" json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardGraph `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardGraph is a struct representing a leaf dashboard node
func (*DashboardGraph) AddCategory ¶ added in v0.17.0
func (g *DashboardGraph) AddCategory(category *DashboardCategory) hcl.Diagnostics
AddCategory implements EdgeAndNodeProvider
func (*DashboardGraph) AddParent ¶ added in v0.17.0
func (g *DashboardGraph) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardGraph) AddReference ¶ added in v0.17.0
func (g *DashboardGraph) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardGraph) BlockType ¶ added in v0.17.0
func (*DashboardGraph) BlockType() string
BlockType implements HclResource
func (*DashboardGraph) CtyValue ¶ added in v0.17.0
func (g *DashboardGraph) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardGraph) Diff ¶ added in v0.17.0
func (g *DashboardGraph) Diff(other *DashboardGraph) *DashboardTreeItemDiffs
func (*DashboardGraph) Equals ¶ added in v0.17.0
func (g *DashboardGraph) Equals(other *DashboardGraph) bool
func (*DashboardGraph) GetArgs ¶ added in v0.17.0
func (g *DashboardGraph) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardGraph) GetChildren ¶ added in v0.17.0
func (g *DashboardGraph) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardGraph) GetDeclRange ¶ added in v0.17.0
func (g *DashboardGraph) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardGraph) GetDescription ¶ added in v0.17.0
func (g *DashboardGraph) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardGraph) GetDisplay ¶ added in v0.17.0
func (g *DashboardGraph) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardGraph) GetDocumentation ¶ added in v0.17.0
func (g *DashboardGraph) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardGraph) GetEdges ¶ added in v0.17.0
func (g *DashboardGraph) GetEdges() DashboardEdgeList
GetEdges implements EdgeAndNodeProvider
func (*DashboardGraph) GetMod ¶ added in v0.17.0
func (g *DashboardGraph) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardGraph) GetNodes ¶ added in v0.17.0
func (g *DashboardGraph) GetNodes() DashboardNodeList
GetNodes implements EdgeAndNodeProvider
func (*DashboardGraph) GetParams ¶ added in v0.17.0
func (g *DashboardGraph) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardGraph) GetParents ¶ added in v0.17.0
func (g *DashboardGraph) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardGraph) GetPaths ¶ added in v0.17.0
func (g *DashboardGraph) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardGraph) GetPreparedStatementExecuteSQL ¶ added in v0.17.0
func (g *DashboardGraph) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardGraph) GetPreparedStatementName ¶ added in v0.17.0
func (g *DashboardGraph) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardGraph) GetQuery ¶ added in v0.17.0
func (g *DashboardGraph) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardGraph) GetReferences ¶ added in v0.17.0
func (g *DashboardGraph) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardGraph) GetSQL ¶ added in v0.17.0
func (g *DashboardGraph) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardGraph) GetTags ¶ added in v0.17.0
func (g *DashboardGraph) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardGraph) GetTitle ¶ added in v0.17.0
func (g *DashboardGraph) GetTitle() string
GetTitle implements HclResource
func (*DashboardGraph) GetType ¶ added in v0.17.0
func (g *DashboardGraph) GetType() string
GetType implements DashboardLeafNode
func (*DashboardGraph) GetUnqualifiedName ¶ added in v0.17.0
func (g *DashboardGraph) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardGraph) GetWidth ¶ added in v0.17.0
func (g *DashboardGraph) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardGraph) Name ¶ added in v0.17.0
func (g *DashboardGraph) Name() string
Name implements HclResource, ModTreeItem return name in format: 'chart.<shortName>'
func (*DashboardGraph) OnDecoded ¶ added in v0.17.0
func (g *DashboardGraph) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardGraph) SetArgs ¶ added in v0.17.0
func (g *DashboardGraph) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardGraph) SetEdges ¶ added in v0.17.0
func (g *DashboardGraph) SetEdges(edges DashboardEdgeList)
SetEdges implements EdgeAndNodeProvider
func (*DashboardGraph) SetNodes ¶ added in v0.17.0
func (g *DashboardGraph) SetNodes(nodes DashboardNodeList)
SetNodes implements EdgeAndNodeProvider
func (*DashboardGraph) SetParams ¶ added in v0.17.0
func (g *DashboardGraph) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardGraph) SetPaths ¶ added in v0.17.0
func (g *DashboardGraph) SetPaths()
SetPaths implements ModTreeItem
func (*DashboardGraph) VerifyQuery ¶ added in v0.17.0
func (*DashboardGraph) VerifyQuery(QueryProvider) error
VerifyQuery implements QueryProvider
type DashboardHierarchy ¶
type DashboardHierarchy struct { ResourceWithMetadataBase QueryProviderBase // required to allow partial decoding Remain hcl.Body `hcl:",remain" json:"-"` FullName string `cty:"name" json:"-"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` Nodes DashboardNodeList `cty:"node_list" hcl:"nodes,optional" column:"nodes,jsonb" json:"-"` Edges DashboardEdgeList `cty:"edge_list" hcl:"edges,optional" column:"edges,jsonb" json:"-"` NodeNames []string `json:"nodes"` EdgeNames []string ` json:"edges"` Categories map[string]*DashboardCategory `cty:"categories" json:"categories"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb" json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardHierarchy `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardHierarchy is a struct representing a leaf dashboard node
func (*DashboardHierarchy) AddCategory ¶ added in v0.17.0
func (h *DashboardHierarchy) AddCategory(category *DashboardCategory) hcl.Diagnostics
AddCategory implements EdgeAndNodeProvider
func (*DashboardHierarchy) AddParent ¶
func (h *DashboardHierarchy) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardHierarchy) AddReference ¶
func (h *DashboardHierarchy) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardHierarchy) BlockType ¶ added in v0.17.0
func (*DashboardHierarchy) BlockType() string
BlockType implements HclResource
func (*DashboardHierarchy) CtyValue ¶
func (h *DashboardHierarchy) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardHierarchy) Diff ¶
func (h *DashboardHierarchy) Diff(other *DashboardHierarchy) *DashboardTreeItemDiffs
func (*DashboardHierarchy) Equals ¶
func (h *DashboardHierarchy) Equals(other *DashboardHierarchy) bool
func (*DashboardHierarchy) GetArgs ¶
func (h *DashboardHierarchy) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardHierarchy) GetChildren ¶
func (h *DashboardHierarchy) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardHierarchy) GetDeclRange ¶
func (h *DashboardHierarchy) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardHierarchy) GetDescription ¶
func (h *DashboardHierarchy) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardHierarchy) GetDisplay ¶
func (h *DashboardHierarchy) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardHierarchy) GetDocumentation ¶
func (h *DashboardHierarchy) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardHierarchy) GetEdges ¶ added in v0.17.0
func (h *DashboardHierarchy) GetEdges() DashboardEdgeList
GetEdges implements EdgeAndNodeProvider
func (*DashboardHierarchy) GetMod ¶
func (h *DashboardHierarchy) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardHierarchy) GetNodes ¶ added in v0.17.0
func (h *DashboardHierarchy) GetNodes() DashboardNodeList
GetNodes implements EdgeAndNodeProvider
func (*DashboardHierarchy) GetParams ¶
func (h *DashboardHierarchy) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardHierarchy) GetParents ¶
func (h *DashboardHierarchy) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardHierarchy) GetPaths ¶
func (h *DashboardHierarchy) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardHierarchy) GetPreparedStatementExecuteSQL ¶
func (h *DashboardHierarchy) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardHierarchy) GetPreparedStatementName ¶
func (h *DashboardHierarchy) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardHierarchy) GetQuery ¶
func (h *DashboardHierarchy) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardHierarchy) GetReferences ¶
func (h *DashboardHierarchy) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardHierarchy) GetSQL ¶
func (h *DashboardHierarchy) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardHierarchy) GetTags ¶
func (h *DashboardHierarchy) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardHierarchy) GetTitle ¶
func (h *DashboardHierarchy) GetTitle() string
GetTitle implements HclResource
func (*DashboardHierarchy) GetType ¶
func (h *DashboardHierarchy) GetType() string
GetType implements DashboardLeafNode
func (*DashboardHierarchy) GetUnqualifiedName ¶
func (h *DashboardHierarchy) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardHierarchy) GetWidth ¶
func (h *DashboardHierarchy) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardHierarchy) Name ¶
func (h *DashboardHierarchy) Name() string
Name implements HclResource, ModTreeItem return name in format: 'chart.<shortName>'
func (*DashboardHierarchy) OnDecoded ¶
func (h *DashboardHierarchy) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardHierarchy) SetArgs ¶
func (h *DashboardHierarchy) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardHierarchy) SetEdges ¶ added in v0.17.0
func (h *DashboardHierarchy) SetEdges(edges DashboardEdgeList)
SetEdges implements EdgeAndNodeProvider
func (*DashboardHierarchy) SetNodes ¶ added in v0.17.0
func (h *DashboardHierarchy) SetNodes(nodes DashboardNodeList)
SetNodes implements EdgeAndNodeProvider
func (*DashboardHierarchy) SetParams ¶
func (h *DashboardHierarchy) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardHierarchy) SetPaths ¶
func (h *DashboardHierarchy) SetPaths()
SetPaths implements ModTreeItem
func (*DashboardHierarchy) VerifyQuery ¶ added in v0.17.0
func (*DashboardHierarchy) VerifyQuery(QueryProvider) error
VerifyQuery implements QueryProvider
type DashboardImage ¶
type DashboardImage struct { ResourceWithMetadataBase QueryProviderBase FullName string `cty:"name" json:"-"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` Src *string `cty:"src" hcl:"src" column:"src,text" json:"src,omitempty"` Alt *string `cty:"alt" hcl:"alt" column:"alt,text" json:"alt,omitempty"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb" json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardImage `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardImage is a struct representing a leaf dashboard node
func (*DashboardImage) AddParent ¶
func (i *DashboardImage) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardImage) AddReference ¶
func (i *DashboardImage) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardImage) BlockType ¶ added in v0.17.0
func (*DashboardImage) BlockType() string
BlockType implements HclResource
func (*DashboardImage) CtyValue ¶
func (i *DashboardImage) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardImage) Diff ¶
func (i *DashboardImage) Diff(other *DashboardImage) *DashboardTreeItemDiffs
func (*DashboardImage) Equals ¶
func (i *DashboardImage) Equals(other *DashboardImage) bool
func (*DashboardImage) GetArgs ¶
func (i *DashboardImage) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardImage) GetChildren ¶
func (i *DashboardImage) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardImage) GetDeclRange ¶
func (i *DashboardImage) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardImage) GetDescription ¶
func (i *DashboardImage) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardImage) GetDisplay ¶
func (i *DashboardImage) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardImage) GetDocumentation ¶
func (*DashboardImage) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardImage) GetMod ¶
func (i *DashboardImage) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardImage) GetParams ¶
func (i *DashboardImage) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardImage) GetParents ¶
func (i *DashboardImage) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardImage) GetPaths ¶
func (i *DashboardImage) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardImage) GetPreparedStatementExecuteSQL ¶
func (i *DashboardImage) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardImage) GetPreparedStatementName ¶
func (i *DashboardImage) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardImage) GetQuery ¶
func (i *DashboardImage) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardImage) GetReferences ¶
func (i *DashboardImage) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardImage) GetSQL ¶
func (i *DashboardImage) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardImage) GetTags ¶
func (i *DashboardImage) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardImage) GetTitle ¶
func (i *DashboardImage) GetTitle() string
GetTitle implements HclResource
func (*DashboardImage) GetType ¶
func (*DashboardImage) GetType() string
GetType implements DashboardLeafNode
func (*DashboardImage) GetUnqualifiedName ¶
func (i *DashboardImage) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardImage) GetWidth ¶
func (i *DashboardImage) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardImage) Name ¶
func (i *DashboardImage) Name() string
Name implements HclResource, ModTreeItem return name in format: 'image.<shortName>'
func (*DashboardImage) OnDecoded ¶
func (i *DashboardImage) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardImage) SetArgs ¶
func (i *DashboardImage) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardImage) SetParams ¶
func (i *DashboardImage) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardImage) SetPaths ¶
func (i *DashboardImage) SetPaths()
SetPaths implements ModTreeItem
func (*DashboardImage) VerifyQuery ¶
func (i *DashboardImage) VerifyQuery(QueryProvider) error
VerifyQuery implements QueryProvider
type DashboardInput ¶
type DashboardInput struct { ResourceWithMetadataBase QueryProviderBase FullName string `cty:"name" json:"-"` ShortName string `json:"-"` UnqualifiedName string `cty:"unqualified_name" json:"unqualified_name"` DashboardName string `column:"dashboard,text" json:"-"` Label *string `cty:"label" hcl:"label" column:"label,text" json:"label,omitempty"` Placeholder *string `cty:"placeholder" hcl:"placeholder" column:"placeholder,text" json:"placeholder,omitempty"` Options []*DashboardInputOption `cty:"options" hcl:"option,block" json:"options,omitempty"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb"json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardInput `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardInput is a struct representing a leaf dashboard node
func GetDashboardInput ¶
func GetDashboardInput(provider ResourceMapsProvider, inputName, dashboardName string) (*DashboardInput, bool)
GetDashboardInput looks for an input with a given parent dashboard this is required as GetResource does not support Inputs
func (*DashboardInput) AddParent ¶
func (i *DashboardInput) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardInput) AddReference ¶
func (i *DashboardInput) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardInput) BlockType ¶ added in v0.17.0
func (*DashboardInput) BlockType() string
BlockType implements HclResource
func (*DashboardInput) Clone ¶
func (i *DashboardInput) Clone() *DashboardInput
func (*DashboardInput) CtyValue ¶
func (i *DashboardInput) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardInput) DependsOnInput ¶
func (i *DashboardInput) DependsOnInput(changedInputName string) bool
DependsOnInput returns whether this input has a runtime dependency on the given input
func (*DashboardInput) Diff ¶
func (i *DashboardInput) Diff(other *DashboardInput) *DashboardTreeItemDiffs
func (*DashboardInput) Equals ¶
func (i *DashboardInput) Equals(other *DashboardInput) bool
func (*DashboardInput) GetArgs ¶
func (i *DashboardInput) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardInput) GetChildren ¶
func (i *DashboardInput) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardInput) GetDeclRange ¶
func (i *DashboardInput) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardInput) GetDescription ¶
func (i *DashboardInput) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardInput) GetDisplay ¶
func (i *DashboardInput) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardInput) GetDocumentation ¶
func (*DashboardInput) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardInput) GetMod ¶
func (i *DashboardInput) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardInput) GetParams ¶
func (i *DashboardInput) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardInput) GetParents ¶
func (i *DashboardInput) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardInput) GetPaths ¶
func (i *DashboardInput) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardInput) GetPreparedStatementExecuteSQL ¶
func (i *DashboardInput) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardInput) GetPreparedStatementName ¶
func (i *DashboardInput) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardInput) GetQuery ¶
func (i *DashboardInput) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardInput) GetReferences ¶
func (i *DashboardInput) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardInput) GetSQL ¶
func (i *DashboardInput) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardInput) GetTags ¶
func (i *DashboardInput) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardInput) GetTitle ¶
func (i *DashboardInput) GetTitle() string
GetTitle implements HclResource
func (*DashboardInput) GetType ¶
func (i *DashboardInput) GetType() string
GetType implements DashboardLeafNode
func (*DashboardInput) GetUnqualifiedName ¶
func (i *DashboardInput) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardInput) GetWidth ¶
func (i *DashboardInput) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardInput) IsSnapshotPanel ¶
func (*DashboardInput) IsSnapshotPanel()
IsSnapshotPanel implements SnapshotPanel
func (*DashboardInput) Name ¶
func (i *DashboardInput) Name() string
Name implements HclResource, ModTreeItem return name in format: 'chart.<shortName>'
func (*DashboardInput) OnDecoded ¶
func (i *DashboardInput) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardInput) SetArgs ¶
func (i *DashboardInput) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardInput) SetDashboard ¶
func (i *DashboardInput) SetDashboard(dashboard *Dashboard)
SetDashboard sets the parent dashboard container
func (*DashboardInput) SetParams ¶
func (i *DashboardInput) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardInput) SetPaths ¶
func (i *DashboardInput) SetPaths()
SetPaths implements ModTreeItem
func (*DashboardInput) VerifyQuery ¶
func (i *DashboardInput) VerifyQuery(QueryProvider) error
VerifyQuery implements QueryProvider
type DashboardInputOption ¶
type DashboardInputOption struct { Name string `hcl:"name,label" json:"name"` Label *string `cty:"label" hcl:"label" json:"label,omitempty"` }
DashboardInputOption is a struct representing dashboard input option
func (DashboardInputOption) Equals ¶
func (o DashboardInputOption) Equals(other *DashboardInputOption) bool
type DashboardLeafNode ¶
type DashboardLeafNode interface { HclResource GetTitle() string GetDisplay() string GetDescription() string GetDocumentation() string GetType() string GetTags() map[string]string GetWidth() int GetPaths() []NodePath GetMetadata() *ResourceMetadata GetChildren() []ModTreeItem }
DashboardLeafNode must be implemented by resources may be a leaf node in the dashboard execution tree
type DashboardNode ¶ added in v0.17.0
type DashboardNode struct { ResourceWithMetadataBase QueryProviderBase // required to allow partial decoding Remain hcl.Body `hcl:",remain" json:"-"` FullName string `cty:"name" json:"name"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` Category *DashboardCategory `cty:"category" hcl:"category" column:"category,jsonb" json:"category,omitempty"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb" json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardNode `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardNode is a struct representing a leaf dashboard node
func (*DashboardNode) AddParent ¶ added in v0.17.0
func (n *DashboardNode) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardNode) AddReference ¶ added in v0.17.0
func (n *DashboardNode) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardNode) BlockType ¶ added in v0.17.0
func (*DashboardNode) BlockType() string
BlockType implements HclResource
func (*DashboardNode) CtyValue ¶ added in v0.17.0
func (n *DashboardNode) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardNode) Diff ¶ added in v0.17.0
func (n *DashboardNode) Diff(other *DashboardNode) *DashboardTreeItemDiffs
func (*DashboardNode) Equals ¶ added in v0.17.0
func (n *DashboardNode) Equals(other *DashboardNode) bool
func (*DashboardNode) GetArgs ¶ added in v0.17.0
func (n *DashboardNode) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardNode) GetChildren ¶ added in v0.17.0
func (n *DashboardNode) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardNode) GetDeclRange ¶ added in v0.17.0
func (n *DashboardNode) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardNode) GetDescription ¶ added in v0.17.0
func (n *DashboardNode) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardNode) GetDisplay ¶ added in v0.17.0
func (n *DashboardNode) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardNode) GetDocumentation ¶ added in v0.17.0
func (n *DashboardNode) GetDocumentation() string
GetDocumentation implements DashboardLeafNode
func (*DashboardNode) GetMod ¶ added in v0.17.0
func (n *DashboardNode) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardNode) GetParams ¶ added in v0.17.0
func (n *DashboardNode) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardNode) GetParents ¶ added in v0.17.0
func (n *DashboardNode) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardNode) GetPaths ¶ added in v0.17.0
func (n *DashboardNode) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardNode) GetPreparedStatementExecuteSQL ¶ added in v0.17.0
func (n *DashboardNode) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardNode) GetPreparedStatementName ¶ added in v0.17.0
func (n *DashboardNode) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardNode) GetQuery ¶ added in v0.17.0
func (n *DashboardNode) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardNode) GetReferences ¶ added in v0.17.0
func (n *DashboardNode) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardNode) GetSQL ¶ added in v0.17.0
func (n *DashboardNode) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardNode) GetTags ¶ added in v0.17.0
func (n *DashboardNode) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardNode) GetTitle ¶ added in v0.17.0
func (n *DashboardNode) GetTitle() string
GetTitle implements HclResource
func (*DashboardNode) GetType ¶ added in v0.17.0
func (n *DashboardNode) GetType() string
GetType implements DashboardLeafNode
func (*DashboardNode) GetUnqualifiedName ¶ added in v0.17.0
func (n *DashboardNode) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardNode) GetWidth ¶ added in v0.17.0
func (n *DashboardNode) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardNode) IsSnapshotPanel ¶ added in v0.17.0
func (*DashboardNode) IsSnapshotPanel()
IsSnapshotPanel implements SnapshotPanel
func (*DashboardNode) Name ¶ added in v0.17.0
func (n *DashboardNode) Name() string
Name implements HclResource, ModTreeItem return name in format: 'edge.<shortName>'
func (*DashboardNode) OnDecoded ¶ added in v0.17.0
func (n *DashboardNode) OnDecoded(_ *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardNode) SetArgs ¶ added in v0.17.0
func (n *DashboardNode) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardNode) SetParams ¶ added in v0.17.0
func (n *DashboardNode) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardNode) SetPaths ¶ added in v0.17.0
func (n *DashboardNode) SetPaths()
SetPaths implements ModTreeItem
type DashboardNodeList ¶ added in v0.17.0
type DashboardNodeList []*DashboardNode
func (*DashboardNodeList) Merge ¶ added in v0.17.0
func (l *DashboardNodeList) Merge(other DashboardNodeList)
func (*DashboardNodeList) Names ¶ added in v0.17.0
func (l *DashboardNodeList) Names() []string
type DashboardTable ¶
type DashboardTable struct { ResourceWithMetadataBase QueryProviderBase // required to allow partial decoding Remain hcl.Body `hcl:",remain" json:"-"` FullName string `cty:"name" json:"-"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` ColumnList DashboardTableColumnList `cty:"column_list" hcl:"column,block" column:"columns,jsonb" json:"-"` Columns map[string]*DashboardTableColumn `cty:"columns" json:"columns,omitempty"` Display *string `cty:"display" hcl:"display" json:"display,omitempty"` // QueryProvider SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Query *Query `hcl:"query" json:"-"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` Args *QueryArgs `cty:"args" column:"args,jsonb"json:"-"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"-"` Base *DashboardTable `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardTable is a struct representing a leaf dashboard node
func NewQueryDashboardTable ¶ added in v0.17.0
func NewQueryDashboardTable(q ModTreeItem) (*DashboardTable, error)
NewQueryDashboardTable creates a Table to wrap a query. This is used in order to execute queries as dashboards
func (*DashboardTable) AddParent ¶
func (t *DashboardTable) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardTable) AddReference ¶
func (t *DashboardTable) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardTable) BlockType ¶ added in v0.17.0
func (*DashboardTable) BlockType() string
BlockType implements HclResource
func (*DashboardTable) CtyValue ¶
func (t *DashboardTable) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardTable) Diff ¶
func (t *DashboardTable) Diff(other *DashboardTable) *DashboardTreeItemDiffs
func (*DashboardTable) Equals ¶
func (t *DashboardTable) Equals(other *DashboardTable) bool
func (*DashboardTable) GetArgs ¶
func (t *DashboardTable) GetArgs() *QueryArgs
GetArgs implements QueryProvider
func (*DashboardTable) GetChildren ¶
func (t *DashboardTable) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardTable) GetDeclRange ¶
func (t *DashboardTable) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardTable) GetDescription ¶
func (t *DashboardTable) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardTable) GetDisplay ¶
func (t *DashboardTable) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardTable) GetDocumentation ¶
func (*DashboardTable) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardTable) GetMod ¶
func (t *DashboardTable) GetMod() *Mod
GetMod implements ModTreeItem
func (*DashboardTable) GetParams ¶
func (t *DashboardTable) GetParams() []*ParamDef
GetParams implements QueryProvider
func (*DashboardTable) GetParents ¶
func (t *DashboardTable) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardTable) GetPaths ¶
func (t *DashboardTable) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardTable) GetPreparedStatementExecuteSQL ¶
func (t *DashboardTable) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*DashboardTable) GetPreparedStatementName ¶
func (t *DashboardTable) GetPreparedStatementName() string
GetPreparedStatementName implements QueryProvider
func (*DashboardTable) GetQuery ¶
func (t *DashboardTable) GetQuery() *Query
GetQuery implements QueryProvider
func (*DashboardTable) GetReferences ¶
func (t *DashboardTable) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardTable) GetSQL ¶
func (t *DashboardTable) GetSQL() *string
GetSQL implements QueryProvider
func (*DashboardTable) GetTags ¶
func (t *DashboardTable) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardTable) GetTitle ¶
func (t *DashboardTable) GetTitle() string
GetTitle implements HclResource, DashboardLeafNode
func (*DashboardTable) GetType ¶
func (t *DashboardTable) GetType() string
GetType implements DashboardLeafNode
func (*DashboardTable) GetUnqualifiedName ¶
func (t *DashboardTable) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardTable) GetWidth ¶
func (t *DashboardTable) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardTable) Name ¶
func (t *DashboardTable) Name() string
Name implements HclResource, ModTreeItem return name in format: 'table.<shortName>'
func (*DashboardTable) OnDecoded ¶
func (t *DashboardTable) OnDecoded(_ *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*DashboardTable) SetArgs ¶
func (t *DashboardTable) SetArgs(args *QueryArgs)
SetArgs implements QueryProvider
func (*DashboardTable) SetParams ¶
func (t *DashboardTable) SetParams(params []*ParamDef)
SetParams implements QueryProvider
func (*DashboardTable) SetPaths ¶
func (t *DashboardTable) SetPaths()
SetPaths implements ModTreeItem
type DashboardTableColumn ¶
type DashboardTableColumn struct { Name string `hcl:"name,label" json:"name"` Display *string `cty:"display" hcl:"display" json:"display,omitempty"` Wrap *string `cty:"wrap" hcl:"wrap" json:"wrap,omitempty"` HREF *string `cty:"href" hcl:"href" json:"href,omitempty"` }
func (DashboardTableColumn) Equals ¶
func (c DashboardTableColumn) Equals(other *DashboardTableColumn) bool
type DashboardTableColumnList ¶
type DashboardTableColumnList []*DashboardTableColumn
func (*DashboardTableColumnList) Merge ¶
func (c *DashboardTableColumnList) Merge(other DashboardTableColumnList)
type DashboardText ¶
type DashboardText struct { ResourceWithMetadataBase FullName string `cty:"name" json:"-"` ShortName string `json:"-"` UnqualifiedName string `json:"-"` Value *string `cty:"value" hcl:"value" column:"value,text" json:"value,omitempty"` // these properties are JSON serialised by the parent LeafRun Title *string `cty:"title" hcl:"title" column:"title,text" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"-"` Display *string `cty:"display" hcl:"display" json:"-"` Base *DashboardText `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` References []*ResourceReference `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
DashboardText is a struct representing a leaf dashboard node
func (*DashboardText) AddParent ¶
func (t *DashboardText) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*DashboardText) AddReference ¶
func (t *DashboardText) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*DashboardText) BlockType ¶ added in v0.17.0
func (*DashboardText) BlockType() string
BlockType implements HclResource
func (*DashboardText) CtyValue ¶
func (t *DashboardText) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*DashboardText) Diff ¶
func (t *DashboardText) Diff(other *DashboardText) *DashboardTreeItemDiffs
func (*DashboardText) Equals ¶
func (t *DashboardText) Equals(other *DashboardText) bool
func (*DashboardText) GetChildren ¶
func (t *DashboardText) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*DashboardText) GetDeclRange ¶
func (t *DashboardText) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*DashboardText) GetDescription ¶
func (t *DashboardText) GetDescription() string
GetDescription implements ModTreeItem
func (*DashboardText) GetDisplay ¶
func (t *DashboardText) GetDisplay() string
GetDisplay implements DashboardLeafNode
func (*DashboardText) GetDocumentation ¶
func (*DashboardText) GetDocumentation() string
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*DashboardText) GetParents ¶
func (t *DashboardText) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*DashboardText) GetPaths ¶
func (t *DashboardText) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*DashboardText) GetReferences ¶
func (t *DashboardText) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*DashboardText) GetTags ¶
func (t *DashboardText) GetTags() map[string]string
GetTags implements HclResource
func (*DashboardText) GetTitle ¶
func (t *DashboardText) GetTitle() string
GetTitle implements HclResource
func (*DashboardText) GetType ¶
func (t *DashboardText) GetType() string
GetType implements DashboardLeafNode
func (*DashboardText) GetUnqualifiedName ¶
func (t *DashboardText) GetUnqualifiedName() string
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*DashboardText) GetWidth ¶
func (t *DashboardText) GetWidth() int
GetWidth implements DashboardLeafNode
func (*DashboardText) Name ¶
func (t *DashboardText) Name() string
Name implements HclResource, ModTreeItem, DashboardLeafNode return name in format: 'text.<shortName>'
func (*DashboardText) OnDecoded ¶
func (t *DashboardText) OnDecoded(*hcl.Block, ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
type DashboardTreeItemDiffs ¶
type DashboardTreeItemDiffs struct { Name string Item ModTreeItem ChangedProperties []string AddedItems []string RemovedItems []string }
DashboardTreeItemDiffs is a struct representing the differences between 2 DashboardTreeItems (of same type)
func (*DashboardTreeItemDiffs) AddAddedItem ¶
func (d *DashboardTreeItemDiffs) AddAddedItem(name string)
func (*DashboardTreeItemDiffs) AddPropertyDiff ¶
func (d *DashboardTreeItemDiffs) AddPropertyDiff(propertyName string)
func (*DashboardTreeItemDiffs) AddRemovedItem ¶
func (d *DashboardTreeItemDiffs) AddRemovedItem(name string)
func (*DashboardTreeItemDiffs) HasChanges ¶
func (d *DashboardTreeItemDiffs) HasChanges() bool
type EdgeAndNodeProvider ¶ added in v0.17.0
type EdgeAndNodeProvider interface { QueryProvider GetEdges() DashboardEdgeList SetEdges(DashboardEdgeList) GetNodes() DashboardNodeList SetNodes(DashboardNodeList) AddCategory(category *DashboardCategory) hcl.Diagnostics }
EdgeAndNodeProvider must be implemented by any dashboard leaf node which supports edges and nodes (DashboardGraph, DashboardFlow, DashboardHierarchy)
type HclResource ¶
type HclResource interface { Name() string GetTitle() string GetUnqualifiedName() string CtyValue() (cty.Value, error) OnDecoded(*hcl.Block, ResourceMapsProvider) hcl.Diagnostics GetDeclRange() *hcl.Range BlockType() string GetDescription() string GetTags() map[string]string }
HclResource must be implemented by resources defined in HCL
func GetResource ¶
func GetResource(provider ResourceMapsProvider, parsedName *ParsedResourceName) (resource HclResource, found bool)
GetResource tries to find a resource with the given name in the ResourceMapsProvider NOTE: this does NOT support inputs, which are NOT uniquely named in a mod
func NewBenchmark ¶
func NewBenchmark(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewControl ¶
func NewControl(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboard ¶
func NewDashboard(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardCard ¶
func NewDashboardCard(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardCategory ¶ added in v0.17.0
func NewDashboardCategory(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardChart ¶
func NewDashboardChart(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardContainer ¶
func NewDashboardContainer(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardEdge ¶ added in v0.17.0
func NewDashboardEdge(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardFlow ¶
func NewDashboardFlow(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardGraph ¶ added in v0.17.0
func NewDashboardGraph(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardHierarchy ¶
func NewDashboardHierarchy(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardImage ¶
func NewDashboardImage(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardInput ¶
func NewDashboardInput(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardNode ¶ added in v0.17.0
func NewDashboardNode(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardTable ¶
func NewDashboardTable(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewDashboardText ¶
func NewDashboardText(block *hcl.Block, mod *Mod, shortName string) HclResource
func NewQuery ¶
func NewQuery(block *hcl.Block, mod *Mod, shortName string) HclResource
type Local ¶
type Local struct { ShortName string FullName string `cty:"name"` UnqualifiedName string Value cty.Value DeclRange hcl.Range Mod *Mod `cty:"mod"` Paths []NodePath `column:"path,jsonb"` // contains filtered or unexported fields }
Local is a struct representing a Local resource
func (*Local) AddParent ¶
func (l *Local) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*Local) Diff ¶
func (l *Local) Diff(other *Local) *DashboardTreeItemDiffs
func (*Local) GetChildren ¶
func (l *Local) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Local) GetDeclRange ¶
func (l *Local) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Local) GetDescription ¶
GetDescription implements ModTreeItem
func (*Local) GetDocumentation ¶ added in v0.17.0
GetDocumentation implement ModTreeItem
func (*Local) GetParents ¶
func (l *Local) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*Local) GetUnqualifiedName ¶
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*Local) OnDecoded ¶
func (l *Local) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
type MappableResource ¶
type MappableResource interface { // InitialiseFromFile creates a mappable resource from a file path // It returns the resource, and the raw file data InitialiseFromFile(modPath, filePath string) (MappableResource, []byte, error) Name() string GetUnqualifiedName() string GetMetadata() *ResourceMetadata SetMetadata(*ResourceMetadata) GetDeclRange() *hcl.Range }
MappableResource must be implemented by resources which can be created directly from a content file (e.g. sql, markdown)
func QueryFromFile ¶
func QueryFromFile(modPath, filePath string, mod *Mod) (MappableResource, []byte, error)
type MissingVariableError ¶
type MissingVariableError struct {
MissingVariables []*Variable
}
func (MissingVariableError) Error ¶
func (m MissingVariableError) Error() string
type Mod ¶
type Mod struct { ResourceWithMetadataBase // ShortName is the mod name, e.g. azure_thrifty ShortName string `cty:"short_name" hcl:"name,label"` // FullName is the mod name prefixed with 'mod', e.g. mod.azure_thrifty FullName string `cty:"name"` // ModDependencyPath is the fully qualified mod name, which can be used to 'require' the mod, // e.g. github.com/turbot/steampipe-mod-azure-thrifty // This is only set if the mod is installed as a dependency ModDependencyPath string `cty:"mod_dependency_path"` // attributes Categories []string `cty:"categories" hcl:"categories,optional" column:"categories,jsonb"` Color *string `cty:"color" hcl:"color" column:"color,text"` Description *string `cty:"description" hcl:"description" column:"description,text"` Documentation *string `cty:"documentation" hcl:"documentation" column:"documentation,text"` Icon *string `cty:"icon" hcl:"icon" column:"icon,text"` Tags map[string]string `cty:"tags" hcl:"tags,optional" column:"tags,jsonb"` Title *string `cty:"title" hcl:"title" column:"title,text"` // blocks Require *Require LegacyRequire *Require `hcl:"requires,block"` OpenGraph *OpenGraph `hcl:"opengraph,block" column:"open_graph,jsonb"` VersionString string `cty:"version"` Version *semver.Version // ModPath is the installation location of the mod ModPath string DeclRange hcl.Range // convenient aggregation of all resources // NOTE: this resource map object references the same set of resources ResourceMaps *ResourceMaps // contains filtered or unexported fields }
Mod is a struct representing a Mod resource
func CreateDefaultMod ¶
CreateDefaultMod creates a default mod created for a workspace with no mod definition
func (*Mod) AddChild ¶
func (m *Mod) AddChild(child ModTreeItem) error
AddChild implements ModTreeItem
func (*Mod) AddModDependencies ¶
func (m *Mod) AddModDependencies(modVersions map[string]*ModVersionConstraint)
func (*Mod) AddReference ¶
func (m *Mod) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*Mod) AddResource ¶
func (m *Mod) AddResource(item HclResource) hcl.Diagnostics
func (*Mod) BuildResourceTree ¶
BuildResourceTree builds the control tree structure by setting the parent property for each control and benchmark NOTE: this also builds the sorted benchmark list
func (*Mod) GetChildren ¶
func (m *Mod) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Mod) GetDeclRange ¶
func (m *Mod) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Mod) GetDescription ¶
GetDescription implements ModTreeItem
func (*Mod) GetDocumentation ¶ added in v0.17.0
GetDocumentation implements DashboardLeafNode, ModTreeItem
func (*Mod) GetModDependency ¶
func (m *Mod) GetModDependency(modName string) *ModVersionConstraint
func (*Mod) GetModDependencyPath ¶
GetModDependencyPath ModDependencyPath if it is set. If not it returns NameWithVersion()
func (*Mod) GetReferences ¶
func (m *Mod) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*Mod) GetResourceMaps ¶
func (m *Mod) GetResourceMaps() *ResourceMaps
GetResourceMaps implements ResourceMapsProvider
func (*Mod) GetUnqualifiedName ¶
GetUnqualifiedName implements ModTreeItem
func (*Mod) HasDependentMods ¶
func (*Mod) IsDefaultMod ¶
IsDefaultMod returns whether this mod is a default mod created for a workspace with no mod definition
func (*Mod) NameWithVersion ¶
func (*Mod) OnDecoded ¶
func (m *Mod) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*Mod) RemoveAllModDependencies ¶
func (m *Mod) RemoveAllModDependencies()
func (*Mod) RemoveModDependencies ¶
func (m *Mod) RemoveModDependencies(modVersions map[string]*ModVersionConstraint)
func (*Mod) SetFilePath ¶
func (*Mod) ValidateSteampipeVersion ¶
func (*Mod) WalkResources ¶
func (m *Mod) WalkResources(resourceFunc func(item HclResource) (bool, error)) error
type ModTreeItem ¶
type ModTreeItem interface { HclResource AddParent(ModTreeItem) error GetParents() []ModTreeItem GetChildren() []ModTreeItem GetDocumentation() string // GetPaths returns an array resource paths GetPaths() []NodePath SetPaths() GetMod() *Mod }
ModTreeItem must be implemented by elements of the mod resource hierarchy i.e. Control, Benchmark, Dashboard
type ModVariableMap ¶
type ModVariableMap struct { RootVariables map[string]*Variable DependencyVariables map[string]map[string]*Variable // a map of top level AND dependency variables // used to set variable values from inputVariables AllVariables map[string]*Variable // the input variables evaluated in the parse VariableValues map[string]string }
ModVariableMap is a struct containins maps of variable definitions
func NewModVariableMap ¶
func NewModVariableMap(mod *Mod, dependencyMods ModMap) *ModVariableMap
NewModVariableMap builds a ModVariableMap using the variables from a mod and its dependencies
func (ModVariableMap) ToArray ¶
func (m ModVariableMap) ToArray() []*Variable
type ModVersionConstraint ¶
type ModVersionConstraint struct { // the fully qualified mod name, e.g. github.com/turbot/mod1 Name string `cty:"name" hcl:"name,label"` VersionString string `cty:"version" hcl:"version"` // variable values to be set on the dependency mod Args map[string]cty.Value `cty:"args"` // only one of Constraint, Branch and FilePath will be set Constraint *versionhelpers.Constraints // // NOTE: aliases will be supported in the future //Alias string `cty:"alias" hcl:"alias"` // the branch to use Branch string // the local file location to use FilePath string DeclRange hcl.Range }
func NewModVersionConstraint ¶
func NewModVersionConstraint(modFullName string) (*ModVersionConstraint, error)
func (*ModVersionConstraint) Equals ¶
func (m *ModVersionConstraint) Equals(other *ModVersionConstraint) bool
func (*ModVersionConstraint) FullName ¶
func (m *ModVersionConstraint) FullName() string
func (*ModVersionConstraint) HasVersion ¶
func (m *ModVersionConstraint) HasVersion() bool
HasVersion returns whether the mod has a version specified, or is the latest if no version is specified, or the version is "latest", this is the latest version
func (*ModVersionConstraint) Initialise ¶
func (m *ModVersionConstraint) Initialise() hcl.Diagnostics
Initialise parses the version and name properties
func (*ModVersionConstraint) String ¶
func (m *ModVersionConstraint) String() string
type ModVersionConstraintCollection ¶
type ModVersionConstraintCollection []*ModVersionConstraint
ModVersionConstraintCollection is a collection of ModVersionConstraint instances and implements the sort interface. See the sort package for more details. https://golang.org/pkg/sort/
func (ModVersionConstraintCollection) Len ¶
func (c ModVersionConstraintCollection) Len() int
Len returns the length of a collection. The number of Version instances on the slice.
func (ModVersionConstraintCollection) Less ¶
func (c ModVersionConstraintCollection) Less(i, j int) bool
Less is needed for the sort interface to compare two Version objects on the slice. If checks if one is less than the other.
func (ModVersionConstraintCollection) Swap ¶
func (c ModVersionConstraintCollection) Swap(i, j int)
Swap is needed for the sort interface to replace the Version objects at two different positions in the slice.
type NamedItem ¶
type NamedItem struct {
Name string `cty:"name"`
}
NamedItem is a struct used by benchmark, container and dashboard to specify children of different types
type NamedItemList ¶
type NamedItemList []NamedItem
func (NamedItemList) StringList ¶
func (l NamedItemList) StringList() []string
type NodePath ¶
type NodePath []string
NodePath is a string array representing the parentage of a ModTreeItem
type OpenGraph ¶
type OpenGraph struct { // The opengraph description (og:description) of the mod, for use in social media applications Description *string `cty:"description" hcl:"description" json:"description"` // The opengraph display title (og:title) of the mod, for use in social media applications. Title *string `cty:"title" hcl:"title" json:"title"` Image *string `cty:"image" hcl:"image" json:"image"` DeclRange hcl.Range `json:"-"` }
OpenGraph is a struct representing the OpenGraph group mod resource
type ParamDef ¶
type ParamDef struct { Name string `cty:"name" json:"name"` FullName string `cty:"full_name" json:"-"` Description *string `cty:"description" json:"description"` RawDefault interface{} `json:"-"` Default *string `cty:"default" json:"default"` // list of all blocks referenced by the resource References []*ResourceReference `json:"-"` DeclRange hcl.Range `json:"-"` }
func NewParamDef ¶
func NewParamDef(block *hcl.Block) *ParamDef
type ParsedPropertyPath ¶
type ParsedPropertyPath struct { Mod string ItemType string Name string PropertyPath []string // optional scope of this property path ("root or parent") Scope string // contains filtered or unexported fields }
func ParseResourcePropertyPath ¶
func ParseResourcePropertyPath(propertyPath string) (res *ParsedPropertyPath, err error)
func (*ParsedPropertyPath) PropertyPathString ¶
func (p *ParsedPropertyPath) PropertyPathString() string
func (*ParsedPropertyPath) String ¶
func (p *ParsedPropertyPath) String() string
func (*ParsedPropertyPath) ToParsedResourceName ¶
func (p *ParsedPropertyPath) ToParsedResourceName() *ParsedResourceName
func (*ParsedPropertyPath) ToResourceName ¶
func (p *ParsedPropertyPath) ToResourceName() string
type ParsedResourceName ¶
func ParseResourceName ¶
func ParseResourceName(fullName string) (res *ParsedResourceName, err error)
func (*ParsedResourceName) ToFullName ¶ added in v0.17.0
func (p *ParsedResourceName) ToFullName() string
func (*ParsedResourceName) ToFullNameWithMod ¶ added in v0.17.0
func (p *ParsedResourceName) ToFullNameWithMod(mod string) string
func (*ParsedResourceName) ToResourceName ¶
func (p *ParsedResourceName) ToResourceName() string
type PluginVersion ¶
type PluginVersion struct { // the plugin name, as specified in the mod requires block. , e.g. turbot/mod1, aws RawName string `cty:"name" hcl:"name,label"` // the version STREAM, can be either a major or minor version stream i.e. 1 or 1.1 VersionString string `cty:"version" hcl:"version,optional"` Version *semver.Version // the org and name which are parsed from the raw name Org string Name string DeclRange hcl.Range `json:"-"` }
func (*PluginVersion) FullName ¶
func (p *PluginVersion) FullName() string
func (*PluginVersion) Initialise ¶
func (p *PluginVersion) Initialise() hcl.Diagnostics
Initialise parses the version and name properties
func (*PluginVersion) ShortName ¶
func (p *PluginVersion) ShortName() string
func (*PluginVersion) String ¶
func (p *PluginVersion) String() string
type Pos ¶
Pos represents a single position in a source file This is a direct re-implementation of hcl.Pos, allowing us to control JSON serialization
type Query ¶
type Query struct { ResourceWithMetadataBase QueryProviderBase // required to allow partial decoding Remain hcl.Body `hcl:",remain" json:"-"` ShortName string `cty:"short_name" json:"name"` FullName string `cty:"name" json:"-"` Description *string `cty:"description" hcl:"description" column:"description,text" json:"description,omitempty"` Documentation *string `cty:"documentation" hcl:"documentation" column:"documentation,text" json:"documentation,omitempty"` SearchPath *string `cty:"search_path" hcl:"search_path" column:"search_path,text" json:"seatch_path,omitempty"` SearchPathPrefix *string `cty:"search_path_prefix" hcl:"search_path_prefix" column:"search_path_prefix,text" json:"search_path_prefix,omitempty"` Tags map[string]string `cty:"tags" hcl:"tags,optional" column:"tags,jsonb" json:"-"` Title *string `cty:"title" hcl:"title" column:"title,text" json:"tags,omitempty"` PreparedStatementName string `column:"prepared_statement_name,text" json:"-"` SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"sql"` Params []*ParamDef `cty:"params" column:"params,jsonb" json:"params,omitempty"` // list of all blocks referenced by the resource References []*ResourceReference ` json:"-"` Mod *Mod `cty:"mod" json:"-"` DeclRange hcl.Range `json:"-"` UnqualifiedName string `json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
Query is a struct representing the Query resource
func (*Query) AddParent ¶
func (q *Query) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*Query) AddReference ¶
func (q *Query) AddReference(ref *ResourceReference)
AddReference implements ResourceWithMetadata
func (*Query) Diff ¶
func (q *Query) Diff(other *Query) *DashboardTreeItemDiffs
func (*Query) GetChildren ¶
func (q *Query) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Query) GetDeclRange ¶
func (q *Query) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Query) GetDescription ¶
GetDescription implements ModTreeItem
func (*Query) GetDocumentation ¶ added in v0.17.0
GetDocumentation implement ModTreeItem
func (*Query) GetParents ¶
func (q *Query) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*Query) GetPreparedStatementExecuteSQL ¶
func (q *Query) GetPreparedStatementExecuteSQL(runtimeArgs *QueryArgs) (*ResolvedQuery, error)
GetPreparedStatementExecuteSQL implements QueryProvider
func (*Query) GetPreparedStatementName ¶
GetPreparedStatementName implements QueryProvider
func (*Query) GetReferences ¶
func (q *Query) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*Query) GetUnqualifiedName ¶
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*Query) InitialiseFromFile ¶
func (q *Query) InitialiseFromFile(modPath, filePath string) (MappableResource, []byte, error)
InitialiseFromFile implements MappableResource
func (*Query) OnDecoded ¶
func (q *Query) OnDecoded(*hcl.Block, ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
type QueryArgs ¶
type QueryArgs struct { ArgMap map[string]string `cty:"args" json:"args,omitempty"` // args list may be sparsely populated (in case of runtime dependencies) // so use *string ArgList []*string `cty:"args_list" json:"args_list"` References []*ResourceReference `cty:"refs" json:"refs"` }
QueryArgs is a struct which contains the arguments used to invoke a prepared statement these may either be passed by name, in a map, or as a list of positional args NOTE: if both are present the named parameters are used
func MergeArgs ¶
func MergeArgs(queryProvider QueryProvider, runtimeArgs *QueryArgs) (*QueryArgs, error)
MergeArgs ensures base and runtime args are non nil and merges them into single args
func NewQueryArgs ¶
func NewQueryArgs() *QueryArgs
func (*QueryArgs) ArgsStringList ¶
ArgsStringList convert ArgLists into list of strings
type QueryProvider ¶
type QueryProvider interface { HclResource GetArgs() *QueryArgs GetParams() []*ParamDef GetSQL() *string GetQuery() *Query SetArgs(*QueryArgs) SetParams([]*ParamDef) GetMod() *Mod GetDescription() string GetPreparedStatementName() string GetPreparedStatementExecuteSQL(*QueryArgs) (*ResolvedQuery, error) // implemented by QueryProviderBase AddRuntimeDependencies([]*RuntimeDependency) GetRuntimeDependencies() map[string]*RuntimeDependency RequiresExecution(QueryProvider) bool VerifyQuery(QueryProvider) error MergeParentArgs(QueryProvider, QueryProvider) (diags hcl.Diagnostics) }
QueryProvider must be implemented by resources which supports prepared statements, i.e. Control and Query
type QueryProviderBase ¶
type QueryProviderBase struct {
// contains filtered or unexported fields
}
func (*QueryProviderBase) AddRuntimeDependencies ¶
func (b *QueryProviderBase) AddRuntimeDependencies(dependencies []*RuntimeDependency)
func (*QueryProviderBase) GetDescription ¶ added in v0.17.0
func (*QueryProviderBase) GetDescription() string
func (*QueryProviderBase) GetRuntimeDependencies ¶
func (b *QueryProviderBase) GetRuntimeDependencies() map[string]*RuntimeDependency
func (*QueryProviderBase) MergeParentArgs ¶ added in v0.17.0
func (b *QueryProviderBase) MergeParentArgs(queryProvider QueryProvider, parent QueryProvider) (diags hcl.Diagnostics)
MergeParentArgs merges our args with our parent args (ours take precedence)
func (*QueryProviderBase) MergeRuntimeDependencies ¶
func (b *QueryProviderBase) MergeRuntimeDependencies(other QueryProvider)
func (*QueryProviderBase) RequiresExecution ¶
func (b *QueryProviderBase) RequiresExecution(queryProvider QueryProvider) bool
func (*QueryProviderBase) VerifyQuery ¶
func (b *QueryProviderBase) VerifyQuery(queryProvider QueryProvider) error
VerifyQuery returns an error if neither sql or query are set it is overidden by resource types for which sql is optional
type Range ¶
type Range struct { // Filename is the name of the file into which this range's positions point. Filename string `json:"filename,omitempty"` // Start and End represent the bounds of this range. Start is inclusive and End is exclusive. Start Pos `json:"start,omitempty"` End Pos `json:"end,omitempty"` }
Range represents a span of characters between two positions in a source file. This is a direct re-implementation of hcl.Range, allowing us to control JSON serialization
type Require ¶
type Require struct { SteampipeVersion *semver.Version SteampipeVersionString string `hcl:"steampipe,optional"` Plugins []*PluginVersion `hcl:"plugin,block"` Mods []*ModVersionConstraint DeclRange hcl.Range // contains filtered or unexported fields }
Require is a struct representing mod dependencies
func NewRequire ¶
func NewRequire() *Require
func (*Require) AddModDependencies ¶
func (r *Require) AddModDependencies(newModVersions map[string]*ModVersionConstraint)
AddModDependencies adds all the mod in newModVersions to our list of mods, using the following logic - if a mod with same name, [alias] and constraint exists, it is not added - if a mod with same name [and alias] and different constraint exist, it is replaced
func (*Require) ContainsMod ¶
func (r *Require) ContainsMod(requiredModVersion *ModVersionConstraint) bool
func (*Require) GetModDependency ¶
func (r *Require) GetModDependency(name string) *ModVersionConstraint
func (*Require) RemoveAllModDependencies ¶
func (r *Require) RemoveAllModDependencies()
func (*Require) RemoveModDependencies ¶
func (r *Require) RemoveModDependencies(versions map[string]*ModVersionConstraint)
func (*Require) ValidateSteampipeVersion ¶
type ResolvedQuery ¶
ResolvedQuery contains the execute SQL, raw SQL and args string used to execute a query
type ResourceDependency ¶
type ResourceDependency struct { Range hcl.Range Traversals []hcl.Traversal }
func (*ResourceDependency) IsRuntimeDependency ¶
func (d *ResourceDependency) IsRuntimeDependency() bool
func (*ResourceDependency) String ¶
func (d *ResourceDependency) String() string
type ResourceMaps ¶ added in v0.17.0
type ResourceMaps struct { // the parent mod Mod *Mod // all mods (including deps) Benchmarks map[string]*Benchmark Controls map[string]*Control Dashboards map[string]*Dashboard DashboardCategories map[string]*DashboardCategory DashboardCards map[string]*DashboardCard DashboardCharts map[string]*DashboardChart DashboardContainers map[string]*DashboardContainer DashboardEdges map[string]*DashboardEdge DashboardFlows map[string]*DashboardFlow DashboardGraphs map[string]*DashboardGraph DashboardHierarchies map[string]*DashboardHierarchy DashboardImages map[string]*DashboardImage DashboardInputs map[string]map[string]*DashboardInput DashboardTables map[string]*DashboardTable DashboardTexts map[string]*DashboardText DashboardNodes map[string]*DashboardNode GlobalDashboardInputs map[string]*DashboardInput Locals map[string]*Local Mods map[string]*Mod Queries map[string]*Query References map[string]*ResourceReference // map of snapshot paths, keyed by snapshot name Snapshots map[string]string Variables map[string]*Variable }
ResourceMaps is a struct containing maps of all mod resource types This is provided to avoid db needing to reference workspace package
func ModResourcesForQueries ¶ added in v0.17.0
func ModResourcesForQueries(queryProviders []QueryProvider, mod *Mod) *ResourceMaps
ModResourcesForQueries creates a ResourceMaps object containing just the specified queries This is used to just create necessary prepared statements when executing batch queries
func NewModResources ¶ added in v0.17.0
func NewModResources(mod *Mod) *ResourceMaps
func NewSourceSnapshotModResources ¶ added in v0.17.0
func NewSourceSnapshotModResources(snapshotPaths []string) *ResourceMaps
func (*ResourceMaps) AddResource ¶ added in v0.17.0
func (m *ResourceMaps) AddResource(item HclResource) hcl.Diagnostics
func (*ResourceMaps) AddSnapshots ¶ added in v0.17.0
func (m *ResourceMaps) AddSnapshots(snapshotPaths []string)
func (*ResourceMaps) Empty ¶ added in v0.17.0
func (m *ResourceMaps) Empty() bool
func (*ResourceMaps) Equals ¶ added in v0.17.0
func (m *ResourceMaps) Equals(other *ResourceMaps) bool
func (*ResourceMaps) Merge ¶ added in v0.17.0
func (m *ResourceMaps) Merge(others []*ResourceMaps) *ResourceMaps
func (*ResourceMaps) PopulateReferences ¶ added in v0.17.0
func (m *ResourceMaps) PopulateReferences()
func (*ResourceMaps) QueryProviders ¶ added in v0.17.0
func (m *ResourceMaps) QueryProviders() []QueryProvider
QueryProviders returns a slice of all QueryProviders
func (*ResourceMaps) WalkResources ¶ added in v0.17.0
func (m *ResourceMaps) WalkResources(resourceFunc func(item HclResource) (bool, error)) error
WalkResources calls resourceFunc for every resource in the mod if any resourceFunc returns false or an error, return immediately
type ResourceMapsProvider ¶ added in v0.17.0
type ResourceMapsProvider interface {
GetResourceMaps() *ResourceMaps
}
type ResourceMetadata ¶
type ResourceMetadata struct { ResourceName string `column:"resource_name,text"` // mod short name ModName string `column:"mod_name,text"` FileName string `column:"file_name,text"` StartLineNumber int `column:"start_line_number,integer"` EndLineNumber int `column:"end_line_number,integer"` IsAutoGenerated bool `column:"auto_generated,bool"` SourceDefinition string `column:"source_definition,text"` ModFullName string Anonymous bool `column:"is_anonymous,bool"` }
ResourceMetadata ius a struct containing additional data about each resource, used to populate the introspection tables
func (*ResourceMetadata) SetMod ¶
func (m *ResourceMetadata) SetMod(mod *Mod)
SetMod sets the mod name and mod short name
type ResourceReference ¶
type ResourceReference struct { ResourceWithMetadataBase To string `cty:"reference_to" column:"reference_to,text"` From string `cty:"reference_from" column:"reference_from,text"` BlockType string `cty:"from_block_type" column:"from_block_type,text"` BlockName string `cty:"from_block_name" column:"from_block_name,text"` Attribute string `cty:"from_attribute" column:"from_attribute,text"` }
func (*ResourceReference) Equals ¶
func (r *ResourceReference) Equals(other *ResourceReference) bool
func (*ResourceReference) Name ¶
func (r *ResourceReference) Name() string
Name implements ResourceWithMetadata the name must start with the 'resource type' as we parse it and use just the 'name' segment
func (*ResourceReference) String ¶
func (r *ResourceReference) String() string
type ResourceReferenceMap ¶
type ResourceReferenceMap map[string][]*ResourceReference
ResourceReferenceMap is a map of references keyed by 'ref' This is to handle the same reference being made more than once by a resource for example the reference var.v1 might be referenced several times
func (ResourceReferenceMap) Add ¶
func (m ResourceReferenceMap) Add(reference *ResourceReference)
type ResourceWithMetadata ¶
type ResourceWithMetadata interface { Name() string GetMetadata() *ResourceMetadata SetMetadata(metadata *ResourceMetadata) SetAnonymous(block *hcl.Block) IsAnonymous() bool AddReference(ref *ResourceReference) GetReferences() []*ResourceReference }
ResourceWithMetadata must be implemented by resources which supports reflection metadata
type ResourceWithMetadataBase ¶
type ResourceWithMetadataBase struct {
// contains filtered or unexported fields
}
func (*ResourceWithMetadataBase) AddReference ¶ added in v0.17.0
func (b *ResourceWithMetadataBase) AddReference(ref *ResourceReference)
func (*ResourceWithMetadataBase) GetMetadata ¶
func (b *ResourceWithMetadataBase) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ResourceWithMetadataBase) GetReferences ¶ added in v0.17.0
func (b *ResourceWithMetadataBase) GetReferences() []*ResourceReference
func (*ResourceWithMetadataBase) IsAnonymous ¶
func (b *ResourceWithMetadataBase) IsAnonymous() bool
IsAnonymous implements ResourceWithMetadata
func (*ResourceWithMetadataBase) SetAnonymous ¶
func (b *ResourceWithMetadataBase) SetAnonymous(block *hcl.Block)
SetAnonymous implements ResourceWithMetadata
func (*ResourceWithMetadataBase) SetMetadata ¶
func (b *ResourceWithMetadataBase) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type RuntimeDependency ¶
type RuntimeDependency struct { PropertyPath *ParsedPropertyPath SourceResource HclResource ArgName *string ArgIndex *int }
func (*RuntimeDependency) Equals ¶
func (d *RuntimeDependency) Equals(other *RuntimeDependency) bool
func (*RuntimeDependency) ResolveSource ¶
func (d *RuntimeDependency) ResolveSource(dashboard *Dashboard, workspace ResourceMapsProvider) error
func (*RuntimeDependency) String ¶
func (d *RuntimeDependency) String() string
type Variable ¶
type Variable struct { ResourceWithMetadataBase ShortName string `json:"name"` FullName string `column:"name,text" json:"-"` Description string `column:"description,text" json:"description"` Default cty.Value `column:"default_value,jsonb" json:"-"` Type cty.Type `column:"var_type,text" json:"-"` DescriptionSet bool ` json:"-"` TypeString string `json:"type"` DefaultGo interface{} `json:"value_default"` ValueGo interface{} `json:"value"` ModName string `json:"mod_name"` // set after value resolution `column:"value,jsonb"` Value cty.Value `column:"value,jsonb" json:"-"` ValueSourceType string `column:"value_source,text" json:"-"` ValueSourceFileName string `column:"value_source_file_name,text" json:"-"` ValueSourceStartLineNumber int `column:"value_source_start_line_number,integer" json:"-"` ValueSourceEndLineNumber int `column:"value_source_end_line_number,integer" json:"-"` DeclRange hcl.Range `json:"-"` ParsingMode var_config.VariableParsingMode `json:"-"` Mod *Mod `json:"-"` UnqualifiedName string `json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
Variable is a struct representing a Variable resource
func NewVariable ¶
func NewVariable(v *var_config.Variable, mod *Mod) *Variable
func (*Variable) AddParent ¶
func (v *Variable) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*Variable) AddReference ¶
func (v *Variable) AddReference(*ResourceReference)
AddReference implements ResourceWithMetadata
func (*Variable) Diff ¶
func (v *Variable) Diff(other *Variable) *DashboardTreeItemDiffs
func (*Variable) GetChildren ¶
func (v *Variable) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Variable) GetDeclRange ¶
func (v *Variable) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Variable) GetDescription ¶
GetDescription implements ModTreeItem
func (*Variable) GetDocumentation ¶ added in v0.17.0
GetDocumentation implement ModTreeItem
func (*Variable) GetParents ¶
func (v *Variable) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*Variable) GetReferences ¶
func (v *Variable) GetReferences() []*ResourceReference
GetReferences implements ResourceWithMetadata
func (*Variable) GetUnqualifiedName ¶
GetUnqualifiedName implements DashboardLeafNode, ModTreeItem
func (*Variable) OnDecoded ¶
func (v *Variable) OnDecoded(block *hcl.Block, resourceMapProvider ResourceMapsProvider) hcl.Diagnostics
OnDecoded implements HclResource
func (*Variable) Required ¶
Required returns true if this variable is required to be set by the caller, or false if there is a default value that will be used when it isn't set.
func (*Variable) SetInputValue ¶
type VariableValidationFailedError ¶
type VariableValidationFailedError struct { }
func (VariableValidationFailedError) Error ¶
func (m VariableValidationFailedError) Error() string
type VersionConstrainCollection ¶
type VersionConstrainCollection []*ModVersionConstraint
type WorkspaceProfile ¶ added in v0.17.0
type WorkspaceProfile struct { ProfileName string `hcl:"name,label" cty:"name"` CloudHost *string `hcl:"cloud_host,optional" cty:"cloud_host"` CloudToken *string `hcl:"cloud_token,optional" cty:"cloud_token"` InstallDir *string `hcl:"install_dir,optional" cty:"install_dir"` ModLocation *string `hcl:"mod_location,optional" cty:"mod_location"` SnapshotLocation *string `hcl:"snapshot_location,optional" cty:"snapshot_location"` WorkspaceDatabase *string `hcl:"workspace_database,optional" cty:"workspace_database"` QueryTimeout *int `hcl:"query_timeout,optional" cty:"query_timeout"` Base *WorkspaceProfile `hcl:"base"` // options GeneralOptions *options.General TerminalOptions *options.Terminal ConnectionOptions *options.Connection DeclRange hcl.Range }
func NewWorkspaceProfile ¶ added in v0.17.0
func NewWorkspaceProfile(block *hcl.Block) *WorkspaceProfile
func (*WorkspaceProfile) ConfigMap ¶ added in v0.17.0
func (p *WorkspaceProfile) ConfigMap() map[string]interface{}
ConfigMap creates a config map containing all options to pass to viper
func (*WorkspaceProfile) CtyValue ¶ added in v0.17.0
func (p *WorkspaceProfile) CtyValue() (cty.Value, error)
func (*WorkspaceProfile) Name ¶ added in v0.17.0
func (p *WorkspaceProfile) Name() string
func (*WorkspaceProfile) OnDecoded ¶ added in v0.17.0
func (p *WorkspaceProfile) OnDecoded() hcl.Diagnostics
func (*WorkspaceProfile) SetOptions ¶ added in v0.17.0
func (p *WorkspaceProfile) SetOptions(opts options.Options, block *hcl.Block) hcl.Diagnostics
SetOptions sets the options on the connection verify the options object is a valid options type (only options.Connection currently supported)
type WorkspaceResources ¶
type WorkspaceResources struct { Query map[string]bool Control map[string]bool Benchmark map[string]bool }
WorkspaceResources is used exclusively for the query/check command completion TODO to be refactored
func NewWorkspaceResources ¶
func NewWorkspaceResources() *WorkspaceResources
func (*WorkspaceResources) GetSortedBenchmarksAndControlNames ¶
func (w *WorkspaceResources) GetSortedBenchmarksAndControlNames() []string
GetSortedBenchmarksAndControlNames gives back a list of the benchmarks and controls in the current workspace. The list is sorted alphabetically - with the benchmarks first
func (*WorkspaceResources) GetSortedNamedQueryNames ¶
func (w *WorkspaceResources) GetSortedNamedQueryNames() []string
func (*WorkspaceResources) Merge ¶
func (r *WorkspaceResources) Merge(other *WorkspaceResources) *WorkspaceResources
Source Files ¶
- attributes.go
- base_resources.go
- benchmark.go
- block_type.go
- config_map.go
- connection.go
- control.go
- dashboard.go
- dashboard_card.go
- dashboard_category.go
- dashboard_category_field.go
- dashboard_category_field_list.go
- dashboard_category_fold.go
- dashboard_category_helpers.go
- dashboard_category_list.go
- dashboard_chart.go
- dashboard_chart_axes.go
- dashboard_chart_labels.go
- dashboard_chart_legend.go
- dashboard_chart_series.go
- dashboard_chart_series_list.go
- dashboard_chart_series_point.go
- dashboard_container.go
- dashboard_edge.go
- dashboard_edge_list.go
- dashboard_flow.go
- dashboard_graph.go
- dashboard_hierarchy.go
- dashboard_image.go
- dashboard_input.go
- dashboard_node.go
- dashboard_node_list.go
- dashboard_option.go
- dashboard_table.go
- dashboard_table_column.go
- dashboard_table_column_list.go
- dashboard_text.go
- dashboard_tree_item_diffs.go
- errors.go
- initialise_edges_and_nodes.go
- interfaces.go
- local.go
- mod.go
- mod_map.go
- mod_name.go
- mod_resource_tree.go
- mod_resource_walk.go
- mod_resources.go
- mod_validate.go
- mod_variable_map.go
- mod_version_constrain_collection.go
- mod_version_constraint.go
- named_item.go
- nodepath.go
- open_graph.go
- param_def.go
- parsed_name.go
- parsed_property_path.go
- plugin_version.go
- query.go
- query_args.go
- query_args_helpers.go
- query_provider_base.go
- require.go
- resolved_query.go
- resource_dependency.go
- resource_maps_provider.go
- resource_metadata.go
- resource_reference.go
- resource_type_map.go
- resource_with_metadata_base.go
- runtime_dependency.go
- variable.go
- workspace_profile.go
- workspace_resources.go