Documentation ¶
Index ¶
- Constants
- Variables
- func BuildModResourceName(blockType string, name string) string
- func GetCtyTypes(item interface{}) map[string]cty.Type
- func GetMonotonicVersionString(v *semver.Version) string
- func GetPreparedStatementExecuteSQL(source QueryProvider, args *QueryArgs) (string, error)
- func ModVersionFullName(name string, version *semver.Version) string
- func ParseModFullName(fullName string) (modName string, modVersion *semver.Version, err error)
- func PropertyPathToResourceName(propertyPath string) (string, error)
- func PseudoResourceNameFromPath(modPath, filePath string) (string, error)
- func RegisteredFileExtensions() []string
- func UnqualifiedResourceName(fullName string) string
- type Base
- type Benchmark
- func (b *Benchmark) AddParent(parent ModTreeItem) error
- func (b *Benchmark) AddReference(ref *ResourceReference)
- func (b *Benchmark) CtyValue() (cty.Value, error)
- func (b *Benchmark) Diff(other *Benchmark) *ReportTreeItemDiffs
- 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) GetMetadata() *ResourceMetadata
- func (b *Benchmark) GetMod() *Mod
- func (b *Benchmark) GetParents() []ModTreeItem
- func (b *Benchmark) GetPaths() []NodePath
- func (b *Benchmark) GetSQL() string
- func (b *Benchmark) GetTags() map[string]string
- func (b *Benchmark) GetTitle() string
- func (b *Benchmark) GetUnqualifiedName() string
- func (b *Benchmark) GetWidth() int
- func (b *Benchmark) Name() string
- func (b *Benchmark) OnDecoded(block *hcl.Block) hcl.Diagnostics
- func (b *Benchmark) SetMetadata(metadata *ResourceMetadata)
- func (b *Benchmark) SetMod(mod *Mod)
- func (b *Benchmark) SetPaths()
- func (b *Benchmark) String() string
- type Connection
- func (c *Connection) Equals(other *Connection) bool
- 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 (c *Control) CtyValue() (cty.Value, error)
- func (c *Control) Diff(other *Control) *ReportTreeItemDiffs
- func (c *Control) Equals(other *Control) bool
- func (c *Control) GetChildren() []ModTreeItem
- func (c *Control) GetDeclRange() *hcl.Range
- func (c *Control) GetDescription() string
- func (c *Control) GetMetadata() *ResourceMetadata
- 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) GetPreparedStatementName() string
- func (c *Control) GetSQL() string
- func (c *Control) GetTags() map[string]string
- func (c *Control) GetTitle() string
- func (c *Control) GetUnqualifiedName() string
- func (c *Control) GetWidth() int
- func (c *Control) ModName() string
- func (c *Control) Name() string
- func (c *Control) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (c *Control) QualifiedNameWithVersion() string
- func (c *Control) SetMetadata(metadata *ResourceMetadata)
- func (c *Control) SetMod(mod *Mod)
- func (c *Control) SetPaths()
- func (c *Control) String() string
- type HclResource
- type Local
- func (l *Local) AddReference(*ResourceReference)
- func (l *Local) CtyValue() (cty.Value, error)
- func (l *Local) GetDeclRange() *hcl.Range
- func (l *Local) GetMetadata() *ResourceMetadata
- func (l *Local) GetMod() *Mod
- func (l *Local) Name() string
- func (l *Local) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (l *Local) SetMetadata(metadata *ResourceMetadata)
- func (l *Local) SetMod(mod *Mod)
- 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) AddPseudoResource(resource MappableResource)
- func (m *Mod) AddReference(ref *ResourceReference)
- func (m *Mod) AddResource(item HclResource) hcl.Diagnostics
- func (m *Mod) BuildResourceTree(loadedDependencyMods ModMap) 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) GetMetadata() *ResourceMetadata
- 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) GetResourceMaps() *WorkspaceResourceMaps
- func (m *Mod) GetTags() map[string]string
- func (m *Mod) GetTitle() 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) hcl.Diagnostics
- func (m *Mod) PopulateResourceMaps()
- func (m *Mod) RemoveAllModDependencies()
- func (m *Mod) RemoveModDependencies(modVersions map[string]*ModVersionConstraint)
- func (m *Mod) Save() error
- func (m *Mod) SetMetadata(metadata *ResourceMetadata)
- func (m *Mod) SetMod(*Mod)
- func (m *Mod) SetPaths()
- func (m *Mod) String() string
- func (m *Mod) WalkResources(resourceFunc func(item HclResource) bool)
- type ModMap
- type ModTreeItem
- type ModVersionConstraint
- type ModVersionConstraintCollection
- type NamedItem
- type NamedItemList
- type NodePath
- type OpenGraph
- type ParamDef
- type ParsedPropertyPath
- type ParsedResourceName
- type PluginVersion
- type Query
- func (q *Query) AddReference(ref *ResourceReference)
- func (q *Query) CtyValue() (cty.Value, error)
- func (q *Query) Equals(other *Query) bool
- func (q *Query) GetDeclRange() *hcl.Range
- func (q *Query) GetMetadata() *ResourceMetadata
- func (q *Query) GetMod() *Mod
- func (q *Query) GetParams() []*ParamDef
- func (q *Query) GetPreparedStatementName() string
- func (q *Query) InitialiseFromFile(modPath, filePath string) (MappableResource, []byte, error)
- func (q *Query) ModName() string
- func (q *Query) Name() string
- func (q *Query) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (q *Query) SetMetadata(metadata *ResourceMetadata)
- func (q *Query) SetMod(mod *Mod)
- func (q *Query) String() string
- type QueryArgs
- type QueryProvider
- type ReportCard
- func (c *ReportCard) AddParent(parent ModTreeItem) error
- func (c *ReportCard) AddReference(*ResourceReference)
- func (c *ReportCard) CtyValue() (cty.Value, error)
- func (c *ReportCard) Diff(other *ReportCard) *ReportTreeItemDiffs
- func (c *ReportCard) Equals(other *ReportCard) bool
- func (c *ReportCard) GetChildren() []ModTreeItem
- func (c *ReportCard) GetDeclRange() *hcl.Range
- func (c *ReportCard) GetDescription() string
- func (c *ReportCard) GetMetadata() *ResourceMetadata
- func (c *ReportCard) GetMod() *Mod
- func (c *ReportCard) GetParents() []ModTreeItem
- func (c *ReportCard) GetPaths() []NodePath
- func (c *ReportCard) GetSQL() string
- func (c *ReportCard) GetTags() map[string]string
- func (c *ReportCard) GetTitle() string
- func (c *ReportCard) GetUnqualifiedName() string
- func (c *ReportCard) GetWidth() int
- func (c *ReportCard) Name() string
- func (c *ReportCard) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (c *ReportCard) SetMetadata(metadata *ResourceMetadata)
- func (c *ReportCard) SetMod(mod *Mod)
- func (c *ReportCard) SetPaths()
- type ReportChart
- func (c *ReportChart) AddParent(parent ModTreeItem) error
- func (c *ReportChart) AddReference(*ResourceReference)
- func (c *ReportChart) CtyValue() (cty.Value, error)
- func (c *ReportChart) Diff(other *ReportChart) *ReportTreeItemDiffs
- func (c *ReportChart) Equals(other *ReportChart) bool
- func (c *ReportChart) GetChildren() []ModTreeItem
- func (c *ReportChart) GetDeclRange() *hcl.Range
- func (c *ReportChart) GetDescription() string
- func (c *ReportChart) GetMetadata() *ResourceMetadata
- func (c *ReportChart) GetMod() *Mod
- func (c *ReportChart) GetParents() []ModTreeItem
- func (c *ReportChart) GetPaths() []NodePath
- func (c *ReportChart) GetSQL() string
- func (c *ReportChart) GetTags() map[string]string
- func (c *ReportChart) GetTitle() string
- func (c *ReportChart) GetUnqualifiedName() string
- func (c *ReportChart) GetWidth() int
- func (c *ReportChart) Name() string
- func (c *ReportChart) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (c *ReportChart) SetMetadata(metadata *ResourceMetadata)
- func (c *ReportChart) SetMod(mod *Mod)
- func (c *ReportChart) SetPaths()
- type ReportChartAxes
- type ReportChartAxesX
- type ReportChartAxesY
- type ReportChartAxisTitle
- type ReportChartLabels
- type ReportChartLegend
- type ReportChartSeries
- type ReportChartSeriesList
- type ReportContainer
- func (c *ReportContainer) AddParent(parent ModTreeItem) error
- func (c *ReportContainer) AddReference(*ResourceReference)
- func (c *ReportContainer) CtyValue() (cty.Value, error)
- func (c *ReportContainer) Diff(other *ReportContainer) *ReportTreeItemDiffs
- func (c *ReportContainer) Equals(other *ReportContainer) bool
- func (c *ReportContainer) GetChildren() []ModTreeItem
- func (c *ReportContainer) GetDeclRange() *hcl.Range
- func (c *ReportContainer) GetDescription() string
- func (c *ReportContainer) GetMetadata() *ResourceMetadata
- func (c *ReportContainer) GetMod() *Mod
- func (c *ReportContainer) GetParents() []ModTreeItem
- func (c *ReportContainer) GetPaths() []NodePath
- func (c *ReportContainer) GetTags() map[string]string
- func (c *ReportContainer) GetTitle() string
- func (c *ReportContainer) GetUnqualifiedName() string
- func (c *ReportContainer) IsReport() bool
- func (c *ReportContainer) Name() string
- func (c *ReportContainer) OnDecoded(block *hcl.Block) hcl.Diagnostics
- func (c *ReportContainer) SetChildren(children []ModTreeItem)
- func (c *ReportContainer) SetMetadata(metadata *ResourceMetadata)
- func (c *ReportContainer) SetMod(mod *Mod)
- func (c *ReportContainer) SetPaths()
- type ReportHierarchy
- func (h *ReportHierarchy) AddParent(parent ModTreeItem) error
- func (h *ReportHierarchy) AddReference(*ResourceReference)
- func (h *ReportHierarchy) CtyValue() (cty.Value, error)
- func (h *ReportHierarchy) Diff(other *ReportHierarchy) *ReportTreeItemDiffs
- func (h *ReportHierarchy) Equals(other *ReportHierarchy) bool
- func (h *ReportHierarchy) GetChildren() []ModTreeItem
- func (h *ReportHierarchy) GetDeclRange() *hcl.Range
- func (h *ReportHierarchy) GetDescription() string
- func (h *ReportHierarchy) GetMetadata() *ResourceMetadata
- func (h *ReportHierarchy) GetMod() *Mod
- func (h *ReportHierarchy) GetParents() []ModTreeItem
- func (h *ReportHierarchy) GetPaths() []NodePath
- func (h *ReportHierarchy) GetSQL() string
- func (h *ReportHierarchy) GetTags() map[string]string
- func (h *ReportHierarchy) GetTitle() string
- func (h *ReportHierarchy) GetUnqualifiedName() string
- func (h *ReportHierarchy) GetWidth() int
- func (h *ReportHierarchy) Name() string
- func (h *ReportHierarchy) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (h *ReportHierarchy) SetMetadata(metadata *ResourceMetadata)
- func (h *ReportHierarchy) SetMod(mod *Mod)
- func (h *ReportHierarchy) SetPaths()
- type ReportHierarchyCategory
- type ReportHierarchyCategoryList
- type ReportImage
- func (c *ReportImage) AddParent(parent ModTreeItem) error
- func (c *ReportImage) AddReference(*ResourceReference)
- func (c *ReportImage) CtyValue() (cty.Value, error)
- func (c *ReportImage) Diff(other *ReportImage) *ReportTreeItemDiffs
- func (c *ReportImage) Equals(other *ReportImage) bool
- func (c *ReportImage) GetChildren() []ModTreeItem
- func (c *ReportImage) GetDeclRange() *hcl.Range
- func (c *ReportImage) GetDescription() string
- func (c *ReportImage) GetMetadata() *ResourceMetadata
- func (c *ReportImage) GetMod() *Mod
- func (c *ReportImage) GetParents() []ModTreeItem
- func (c *ReportImage) GetPaths() []NodePath
- func (c *ReportImage) GetSQL() string
- func (c *ReportImage) GetTags() map[string]string
- func (c *ReportImage) GetTitle() string
- func (c *ReportImage) GetUnqualifiedName() string
- func (c *ReportImage) GetWidth() int
- func (c *ReportImage) Name() string
- func (c *ReportImage) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (c *ReportImage) SetMetadata(metadata *ResourceMetadata)
- func (c *ReportImage) SetMod(mod *Mod)
- func (c *ReportImage) SetPaths()
- type ReportInput
- func (c *ReportInput) AddParent(parent ModTreeItem) error
- func (c *ReportInput) AddReference(*ResourceReference)
- func (c *ReportInput) CtyValue() (cty.Value, error)
- func (c *ReportInput) Diff(other *ReportInput) *ReportTreeItemDiffs
- func (c *ReportInput) Equals(other *ReportInput) bool
- func (c *ReportInput) GetChildren() []ModTreeItem
- func (c *ReportInput) GetDeclRange() *hcl.Range
- func (c *ReportInput) GetDescription() string
- func (c *ReportInput) GetMetadata() *ResourceMetadata
- func (c *ReportInput) GetMod() *Mod
- func (c *ReportInput) GetParents() []ModTreeItem
- func (c *ReportInput) GetPaths() []NodePath
- func (c *ReportInput) GetSQL() string
- func (c *ReportInput) GetTags() map[string]string
- func (c *ReportInput) GetTitle() string
- func (c *ReportInput) GetUnqualifiedName() string
- func (c *ReportInput) GetWidth() int
- func (c *ReportInput) Name() string
- func (c *ReportInput) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (c *ReportInput) SetMetadata(metadata *ResourceMetadata)
- func (c *ReportInput) SetMod(mod *Mod)
- func (c *ReportInput) SetPaths()
- type ReportTable
- func (t *ReportTable) AddParent(parent ModTreeItem) error
- func (t *ReportTable) AddReference(*ResourceReference)
- func (t *ReportTable) CtyValue() (cty.Value, error)
- func (t *ReportTable) Diff(other *ReportTable) *ReportTreeItemDiffs
- func (t *ReportTable) Equals(other *ReportTable) bool
- func (t *ReportTable) GetChildren() []ModTreeItem
- func (t *ReportTable) GetDeclRange() *hcl.Range
- func (t *ReportTable) GetDescription() string
- func (t *ReportTable) GetMetadata() *ResourceMetadata
- func (t *ReportTable) GetMod() *Mod
- func (t *ReportTable) GetParents() []ModTreeItem
- func (t *ReportTable) GetPaths() []NodePath
- func (t *ReportTable) GetSQL() string
- func (t *ReportTable) GetTags() map[string]string
- func (t *ReportTable) GetTitle() string
- func (t *ReportTable) GetUnqualifiedName() string
- func (t *ReportTable) GetWidth() int
- func (t *ReportTable) Name() string
- func (t *ReportTable) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (t *ReportTable) SetMetadata(metadata *ResourceMetadata)
- func (t *ReportTable) SetMod(mod *Mod)
- func (t *ReportTable) SetPaths()
- type ReportTableColumn
- type ReportTableColumnList
- type ReportText
- func (t *ReportText) AddParent(parent ModTreeItem) error
- func (t *ReportText) AddReference(*ResourceReference)
- func (t *ReportText) CtyValue() (cty.Value, error)
- func (t *ReportText) Diff(other *ReportText) *ReportTreeItemDiffs
- func (t *ReportText) Equals(other *ReportText) bool
- func (t *ReportText) GetChildren() []ModTreeItem
- func (t *ReportText) GetDeclRange() *hcl.Range
- func (t *ReportText) GetDescription() string
- func (t *ReportText) GetMetadata() *ResourceMetadata
- func (t *ReportText) GetMod() *Mod
- func (t *ReportText) GetParents() []ModTreeItem
- func (t *ReportText) GetPaths() []NodePath
- func (t *ReportText) GetSQL() string
- func (t *ReportText) GetTags() map[string]string
- func (t *ReportText) GetTitle() string
- func (t *ReportText) GetUnqualifiedName() string
- func (t *ReportText) GetWidth() int
- func (t *ReportText) Name() string
- func (t *ReportText) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (t *ReportText) SetMetadata(metadata *ResourceMetadata)
- func (t *ReportText) SetMod(mod *Mod)
- func (t *ReportText) SetPaths()
- type ReportTreeItemDiffs
- type ReportingLeafNode
- 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 ResourceMapsProvider
- type ResourceMetadata
- type ResourceReference
- type ResourceReferenceMap
- type ResourceWithMetadata
- type Variable
- func (v *Variable) AddReference(*ResourceReference)
- func (v *Variable) CtyValue() (cty.Value, error)
- func (v *Variable) Equals(other *Variable) bool
- func (v *Variable) GetDeclRange() *hcl.Range
- func (v *Variable) GetMetadata() *ResourceMetadata
- func (v *Variable) GetMod() *Mod
- func (v *Variable) Name() string
- func (v *Variable) OnDecoded(*hcl.Block) hcl.Diagnostics
- func (v *Variable) Required() bool
- func (v *Variable) SetInputValue(value cty.Value, sourceType string, sourceRange tfdiags.SourceRange)
- func (v *Variable) SetMetadata(metadata *ResourceMetadata)
- func (v *Variable) SetMod(mod *Mod)
- type VariableValidationFailedError
- type VersionConstrainCollection
- type WorkspaceResourceMaps
- type WorkspaceResources
Constants ¶
const ( BlockTypeMod = "mod" BlockTypeQuery = "query" BlockTypeControl = "control" BlockTypeBenchmark = "benchmark" BlockTypeReport = "report" BlockTypeContainer = "container" BlockTypeCard = "card" BlockTypeChart = "chart" BlockTypeHierarchy = "hierarchy" BlockTypeImage = "image" BlockTypeInput = "input" BlockTypeTable = "table" BlockTypeText = "text" BlockTypeLocals = "locals" BlockTypeVariable = "variable" BlockTypeParam = "param" )
const (
ConnectionTypeAggregator = "aggregator"
)
Variables ¶
var ResourceTypeMap = map[string]factoryFunc{ constants.SqlExtension: func(modPath, filePath string) (MappableResource, []byte, error) { return QueryFromFile(modPath, filePath) }, }
Functions ¶
func BuildModResourceName ¶ added in v0.5.0
func GetCtyTypes ¶ added in v0.5.0
GetCtyTypes builds a map of cty types for all tagged properties. It is used to convert the struct to a cty value
func GetMonotonicVersionString ¶ added in v0.11.0
func GetPreparedStatementExecuteSQL ¶ added in v0.8.0
func GetPreparedStatementExecuteSQL(source QueryProvider, args *QueryArgs) (string, error)
GetPreparedStatementExecuteSQL return the SQLs to run the query as a prepared statement
func ModVersionFullName ¶ added in v0.11.0
func ParseModFullName ¶ added in v0.11.0
func PropertyPathToResourceName ¶ added in v0.5.0
func PseudoResourceNameFromPath ¶
PseudoResourceNameFromPath converts a filepath into a resource name
It operates as follows:
- get filename
- remove extension
- sluggify, with '_' as the divider
func RegisteredFileExtensions ¶
func RegisteredFileExtensions() []string
func UnqualifiedResourceName ¶ added in v0.11.0
UnqualifiedResourceName removes the mod prefix from the given name
Types ¶
type Benchmark ¶ added in v0.5.0
type Benchmark struct { ShortName string FullName string `cty:"name"` UnqualifiedName string // child names as NamedItem structs - used to allow setting children via the 'children' property ChildNames NamedItemList `cty:"child_names"` // used for introspection tables ChildNameStrings []string `cty:"child_name_strings" column:"children,jsonb"` // the actual children Children []ModTreeItem 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"` Title *string `cty:"title" hcl:"title" column:"title,text"` References []*ResourceReference Mod *Mod `cty:"mod"` DeclRange hcl.Range Paths []NodePath `column:"path,jsonb"` // report specific properties Base *Benchmark `hcl:"base" json:"-"` Width *int `cty:"width" hcl:"width" column:"width,text" json:"-"` // contains filtered or unexported fields }
Benchmark is a struct representing the Benchmark resource
func NewBenchmark ¶ added in v0.5.0
func NewBenchmark(block *hcl.Block) *Benchmark
func (*Benchmark) AddParent ¶ added in v0.5.0
func (b *Benchmark) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*Benchmark) AddReference ¶ added in v0.5.0
func (b *Benchmark) AddReference(ref *ResourceReference)
AddReference implements HclResource
func (*Benchmark) Diff ¶ added in v0.13.0
func (b *Benchmark) Diff(other *Benchmark) *ReportTreeItemDiffs
func (*Benchmark) GetChildControls ¶ added in v0.5.0
GetChildControls return a flat list of controls underneath the benchmark in the tree
func (*Benchmark) GetChildren ¶ added in v0.5.0
func (b *Benchmark) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Benchmark) GetDeclRange ¶ added in v0.9.0
func (b *Benchmark) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Benchmark) GetDescription ¶ added in v0.5.0
GetDescription implements ModTreeItem
func (*Benchmark) GetMetadata ¶ added in v0.5.0
func (b *Benchmark) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*Benchmark) GetParents ¶ added in v0.5.0
func (b *Benchmark) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*Benchmark) GetUnqualifiedName ¶ added in v0.13.0
GetUnqualifiedName implements ReportLeafNode
func (*Benchmark) Name ¶ added in v0.5.0
Name implements ModTreeItem, HclResource, ResourceWithMetadata return name in format: '<modname>.control.<shortName>'
func (*Benchmark) OnDecoded ¶ added in v0.5.0
func (b *Benchmark) OnDecoded(block *hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*Benchmark) SetMetadata ¶ added in v0.5.0
func (b *Benchmark) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type Connection ¶ added in v0.5.0
type Connection struct { // connection name Name string // The name of plugin as mentioned in config PluginShortName string // The fully qualified name of the plugin. derived from the short name Plugin string // 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 hcl.Range }
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 ¶ added in v0.9.0
func NewConnection(block *hcl.Block) *Connection
func (*Connection) Equals ¶ added in v0.9.0
func (c *Connection) Equals(other *Connection) bool
func (*Connection) PopulateChildren ¶ added in v0.7.0
func (c *Connection) PopulateChildren(connectionMap map[string]*Connection)
func (*Connection) SetOptions ¶ added in v0.5.0
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 ¶ added in v0.5.0
func (c *Connection) String() string
func (*Connection) Validate ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (c *Connection) ValidateAggregatorConnection(connectionMap map[string]*Connection) []string
type Control ¶ added in v0.5.0
type Control struct { ShortName string FullName string `cty:"name"` Description *string `cty:"description" column:"description,text"` Documentation *string `cty:"documentation" column:"documentation,text"` SearchPath *string `cty:"search_path" column:"search_path,text"` SearchPathPrefix *string `cty:"search_path_prefix" column:"search_path_prefix,text"` Severity *string `cty:"severity" column:"severity,text"` SQL *string `cty:"sql" column:"sql,text"` Tags map[string]string `cty:"tags" column:"tags,jsonb"` Title *string `cty:"title" column:"title,text"` Query *Query // args // arguments may be specified by either a map of named args or as a list of positional args // we apply special decode logic to convert the params block into a QueryArgs object // with either an args map or list assigned Args *QueryArgs `cty:"args" column:"args,jsonb"` Params []*ParamDef `cty:"params" column:"params,jsonb"` References []*ResourceReference Mod *Mod `cty:"mod"` DeclRange hcl.Range PreparedStatementName string `column:"prepared_statement_name,text"` UnqualifiedName string Paths []NodePath // report specific properties Base *Control `hcl:"base"` Width *int `cty:"width" hcl:"width" column:"width,text" ` // contains filtered or unexported fields }
Control is a struct representing the Control resource
func NewControl ¶ added in v0.5.0
func NewControl(block *hcl.Block) *Control
func (*Control) AddParent ¶ added in v0.5.0
func (c *Control) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*Control) AddReference ¶ added in v0.5.0
func (c *Control) AddReference(ref *ResourceReference)
AddReference implements HclResource
func (*Control) Diff ¶ added in v0.13.0
func (c *Control) Diff(other *Control) *ReportTreeItemDiffs
func (*Control) GetChildren ¶ added in v0.5.0
func (c *Control) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Control) GetDeclRange ¶ added in v0.9.0
func (c *Control) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Control) GetDescription ¶ added in v0.5.0
GetDescription implements ModTreeItem
func (*Control) GetMetadata ¶ added in v0.5.0
func (c *Control) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*Control) GetParentNames ¶ added in v0.5.0
func (*Control) GetParents ¶ added in v0.5.0
func (c *Control) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*Control) GetPreparedStatementName ¶ added in v0.9.0
GetPreparedStatementName implements QueryProvider
func (*Control) GetUnqualifiedName ¶ added in v0.13.0
GetUnqualifiedName implements ReportLeafNode
func (*Control) Name ¶ added in v0.5.0
Name implements ModTreeItem, HclResource return name in format: 'control.<shortName>'
func (*Control) OnDecoded ¶ added in v0.5.0
func (c *Control) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*Control) QualifiedNameWithVersion ¶ added in v0.11.0
QualifiedNameWithVersion returns the name in format: '<modName>@version.control.<shortName>'
func (*Control) SetMetadata ¶ added in v0.5.0
func (c *Control) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type HclResource ¶ added in v0.5.0
type HclResource interface { Name() string CtyValue() (cty.Value, error) OnDecoded(*hcl.Block) hcl.Diagnostics AddReference(ref *ResourceReference) SetMod(*Mod) GetMod() *Mod GetDeclRange() *hcl.Range }
HclResource must be implemented by resources defined in HCL
func GetResource ¶ added in v0.13.0
func GetResource(provider ResourceMapsProvider, parsedName *ParsedResourceName) (resource HclResource, found bool)
type Local ¶ added in v0.5.0
type Local struct { ShortName string FullName string `cty:"name"` Value cty.Value DeclRange hcl.Range Mod *Mod `cty:"mod"` // contains filtered or unexported fields }
Local is a struct representing a Local resource
func (*Local) AddReference ¶ added in v0.5.0
func (l *Local) AddReference(*ResourceReference)
AddReference implements HclResource
func (*Local) GetDeclRange ¶ added in v0.9.0
func (l *Local) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Local) GetMetadata ¶ added in v0.5.0
func (l *Local) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*Local) OnDecoded ¶ added in v0.5.0
func (l *Local) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*Local) SetMetadata ¶ added in v0.5.0
func (l *Local) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
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 SetMod(*Mod) GetMetadata() *ResourceMetadata SetMetadata(*ResourceMetadata) }
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) (MappableResource, []byte, error)
type MissingVariableError ¶ added in v0.8.0
type MissingVariableError struct {
MissingVariables []*Variable
}
func (MissingVariableError) Error ¶ added in v0.8.0
func (m MissingVariableError) Error() string
type Mod ¶
type Mod struct { // 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"` // list of all blocks referenced by the resource References []*ResourceReference // blocks Require *Require `hcl:"require,block"` LegacyRequire *Require `hcl:"requires,block"` OpenGraph *OpenGraph `hcl:"opengraph,block" column:"open_graph,jsonb"` VersionString string `cty:"version"` Version *semver.Version Queries map[string]*Query Controls map[string]*Control Benchmarks map[string]*Benchmark Reports map[string]*ReportContainer ReportContainers map[string]*ReportContainer ReportCards map[string]*ReportCard ReportCharts map[string]*ReportChart ReportHierarchies map[string]*ReportHierarchy ReportImages map[string]*ReportImage ReportInputs map[string]*ReportInput ReportTables map[string]*ReportTable ReportTexts map[string]*ReportText Variables map[string]*Variable Locals map[string]*Local // ModPath is the installation location of the mod ModPath string DeclRange hcl.Range // contains filtered or unexported fields }
Mod is a struct representing a Mod resource
func CreateDefaultMod ¶ added in v0.5.0
CreateDefaultMod creates a default mod created for a workspace with no mod definition
func (*Mod) AddChild ¶ added in v0.5.0
func (m *Mod) AddChild(child ModTreeItem) error
AddChild implements ModTreeItem
func (*Mod) AddModDependencies ¶ added in v0.11.0
func (m *Mod) AddModDependencies(modVersions map[string]*ModVersionConstraint)
func (*Mod) AddParent ¶ added in v0.5.0
func (m *Mod) AddParent(ModTreeItem) error
AddParent implements ModTreeItem
func (*Mod) AddPseudoResource ¶ added in v0.5.0
func (m *Mod) AddPseudoResource(resource MappableResource)
AddPseudoResource adds the pseudo resource to the mod, as long as there is no existing resource of same name
A pseudo resource ids a resource created by loading a content file (e.g. a SQL file), rather than parsing a HCL definition
func (*Mod) AddReference ¶ added in v0.5.0
func (m *Mod) AddReference(ref *ResourceReference)
AddReference implements HclResource
func (*Mod) AddResource ¶ added in v0.5.0
func (m *Mod) AddResource(item HclResource) hcl.Diagnostics
func (*Mod) BuildResourceTree ¶ added in v0.7.1
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 ¶ added in v0.5.0
func (m *Mod) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*Mod) GetDeclRange ¶ added in v0.9.0
func (m *Mod) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Mod) GetDescription ¶ added in v0.5.0
GetDescription implements ModTreeItem
func (*Mod) GetMetadata ¶ added in v0.5.0
func (m *Mod) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*Mod) GetModDependency ¶ added in v0.11.0
func (m *Mod) GetModDependency(modName string) *ModVersionConstraint
func (*Mod) GetModDependencyPath ¶ added in v0.11.0
GetModDependencyPath ModDependencyPath if it is set. If not it returns NameWithVersion()
func (*Mod) GetParents ¶ added in v0.5.0
func (m *Mod) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*Mod) GetResourceMaps ¶ added in v0.13.0
func (m *Mod) GetResourceMaps() *WorkspaceResourceMaps
GetResourceMaps implements ResourceMapsProvider
func (*Mod) HasDependentMods ¶ added in v0.11.0
func (*Mod) IsDefaultMod ¶ added in v0.5.0
IsDefaultMod returns whether this mod is a default mod created for a workspace with no mod definition
func (*Mod) NameWithVersion ¶ added in v0.11.0
func (*Mod) OnDecoded ¶ added in v0.5.0
func (m *Mod) OnDecoded(block *hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*Mod) PopulateResourceMaps ¶
func (m *Mod) PopulateResourceMaps()
func (*Mod) RemoveAllModDependencies ¶ added in v0.11.0
func (m *Mod) RemoveAllModDependencies()
func (*Mod) RemoveModDependencies ¶ added in v0.11.0
func (m *Mod) RemoveModDependencies(modVersions map[string]*ModVersionConstraint)
func (*Mod) SetMetadata ¶ added in v0.5.0
func (m *Mod) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
func (*Mod) WalkResources ¶ added in v0.13.0
func (m *Mod) WalkResources(resourceFunc func(item HclResource) bool)
WalkResources calls resourceFunc for every resource in the mod if any resourceFunc returns false, return immediately
type ModTreeItem ¶ added in v0.7.1
type ModTreeItem interface { AddParent(ModTreeItem) error GetChildren() []ModTreeItem Name() string GetTitle() string GetDescription() string GetTags() map[string]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, Report
type ModVersionConstraint ¶ added in v0.11.0
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"` // 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 ¶ added in v0.11.0
func NewModVersionConstraint(modFullName string) (*ModVersionConstraint, error)
func (*ModVersionConstraint) Equals ¶ added in v0.11.0
func (m *ModVersionConstraint) Equals(other *ModVersionConstraint) bool
func (*ModVersionConstraint) FullName ¶ added in v0.11.0
func (m *ModVersionConstraint) FullName() string
func (*ModVersionConstraint) HasVersion ¶ added in v0.11.0
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 ¶ added in v0.11.0
func (m *ModVersionConstraint) Initialise() hcl.Diagnostics
Initialise parses the version and name properties
func (*ModVersionConstraint) String ¶ added in v0.11.0
func (m *ModVersionConstraint) String() string
type ModVersionConstraintCollection ¶ added in v0.11.0
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 ¶ added in v0.11.0
func (c ModVersionConstraintCollection) Len() int
Len returns the length of a collection. The number of Version instances on the slice.
func (ModVersionConstraintCollection) Less ¶ added in v0.11.0
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 ¶ added in v0.11.0
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 ¶ added in v0.5.0
type NamedItem struct {
Name string `cty:"name"`
}
NamedItem is a struct used by nebchmark, container and report to specify children of different types
type NamedItemList ¶ added in v0.13.0
type NamedItemList []NamedItem
func (NamedItemList) StringList ¶ added in v0.13.0
func (l NamedItemList) StringList() []string
type NodePath ¶ added in v0.7.1
type NodePath []string
NodePath is a string array representing the parentage of a ModTreeItem
type OpenGraph ¶ added in v0.5.0
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 ¶ added in v0.8.0
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 DeclRange hcl.Range // contains filtered or unexported fields }
func NewParamDef ¶ added in v0.8.0
type ParsedPropertyPath ¶ added in v0.5.0
func ParseResourcePropertyPath ¶ added in v0.5.0
func ParseResourcePropertyPath(propertyPath string) (res *ParsedPropertyPath, err error)
type ParsedResourceName ¶ added in v0.5.0
func ParseResourceName ¶ added in v0.5.0
func ParseResourceName(fullName string) (res *ParsedResourceName, err error)
type PluginVersion ¶ added in v0.5.0
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 ¶ added in v0.5.0
func (p *PluginVersion) FullName() string
func (*PluginVersion) Initialise ¶ added in v0.9.0
func (p *PluginVersion) Initialise() hcl.Diagnostics
Initialise parses the version and name properties
func (*PluginVersion) ShortName ¶ added in v0.6.0
func (p *PluginVersion) ShortName() string
func (*PluginVersion) String ¶ added in v0.5.0
func (p *PluginVersion) String() string
type Query ¶
type Query struct { Base ShortName string `cty:"short_name"` FullName string `cty:"name"` Description *string `cty:"description" column:"description,text"` Documentation *string `cty:"documentation" column:"documentation,text"` SearchPath *string `cty:"search_path"column:"search_path,text"` SearchPathPrefix *string `cty:"search_path_prefix" column:"search_path_prefix,text"` SQL *string `cty:"sql" hcl:"sql" column:"sql,text"` Tags map[string]string `cty:"tags" hcl:"tags" column:"tags,jsonb"` Title *string `cty:"title" hcl:"title" column:"title,text"` Params []*ParamDef `cty:"params" column:"params,jsonb"` // list of all blocks referenced by the resource References []*ResourceReference Mod *Mod `cty:"mod"` DeclRange hcl.Range PreparedStatementName string `column:"prepared_statement_name,text"` UnqualifiedName string // contains filtered or unexported fields }
Query is a struct representing the Query resource
func (*Query) AddReference ¶ added in v0.5.0
func (q *Query) AddReference(ref *ResourceReference)
AddReference implements HclResource
func (*Query) GetDeclRange ¶ added in v0.9.0
func (q *Query) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Query) GetMetadata ¶ added in v0.5.0
func (q *Query) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*Query) GetPreparedStatementName ¶ added in v0.9.0
GetPreparedStatementName implements QueryProvider
func (*Query) InitialiseFromFile ¶
func (q *Query) InitialiseFromFile(modPath, filePath string) (MappableResource, []byte, error)
InitialiseFromFile implements MappableResource
func (*Query) OnDecoded ¶ added in v0.5.0
func (q *Query) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*Query) SetMetadata ¶ added in v0.5.0
func (q *Query) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type QueryArgs ¶ added in v0.8.0
type QueryArgs struct { Args map[string]string `cty:"args" json:"args"` ArgsList []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 NewQueryArgs ¶ added in v0.8.0
func NewQueryArgs() *QueryArgs
func (*QueryArgs) ResolveAsString ¶ added in v0.8.0
func (q *QueryArgs) ResolveAsString(source QueryProvider) (string, error)
ResolveAsString 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)
type QueryProvider ¶ added in v0.11.0
type QueryProvider interface { Name() string ModName() string GetParams() []*ParamDef GetPreparedStatementName() string }
QueryProvider must be implemented by resources which supports prepared statements, i.e. Control and Query
type ReportCard ¶
type ReportCard struct { 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:"-"` SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"type,omitempty"` Icon *string `cty:"icon" hcl:"icon" column:"icon,text" json:"icon,omitempty"` Base *ReportCard `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
ReportCard is a struct representing a leaf reporting node
func NewReportCard ¶
func NewReportCard(block *hcl.Block) *ReportCard
func (*ReportCard) AddParent ¶
func (c *ReportCard) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*ReportCard) AddReference ¶
func (c *ReportCard) AddReference(*ResourceReference)
AddReference implements HclResource
func (*ReportCard) CtyValue ¶
func (c *ReportCard) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*ReportCard) Diff ¶
func (c *ReportCard) Diff(other *ReportCard) *ReportTreeItemDiffs
func (*ReportCard) Equals ¶
func (c *ReportCard) Equals(other *ReportCard) bool
func (*ReportCard) GetChildren ¶
func (c *ReportCard) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*ReportCard) GetDeclRange ¶
func (c *ReportCard) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*ReportCard) GetDescription ¶
func (c *ReportCard) GetDescription() string
GetDescription implements ModTreeItem
func (*ReportCard) GetMetadata ¶
func (c *ReportCard) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ReportCard) GetParents ¶
func (c *ReportCard) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*ReportCard) GetPaths ¶
func (c *ReportCard) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*ReportCard) GetTags ¶
func (c *ReportCard) GetTags() map[string]string
GetTags implements ModTreeItem
func (*ReportCard) GetTitle ¶
func (c *ReportCard) GetTitle() string
GetTitle implements ModTreeItem
func (*ReportCard) GetUnqualifiedName ¶
func (c *ReportCard) GetUnqualifiedName() string
GetUnqualifiedName implements ReportLeafNode
func (*ReportCard) GetWidth ¶
func (c *ReportCard) GetWidth() int
GetWidth implements ReportLeafNode
func (*ReportCard) Name ¶
func (c *ReportCard) Name() string
Name implements HclResource, ModTreeItem return name in format: 'card.<shortName>'
func (*ReportCard) OnDecoded ¶
func (c *ReportCard) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*ReportCard) SetMetadata ¶
func (c *ReportCard) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type ReportChart ¶
type ReportChart struct { 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:"-"` SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"type,omitempty"` Base *ReportChart `hcl:"base" json:"-"` Legend *ReportChartLegend `cty:"legend" hcl:"legend,block" column:"legend,jsonb" json:"legend"` SeriesList ReportChartSeriesList `cty:"series_list" hcl:"series,block" column:"series,jsonb" json:"-"` Axes *ReportChartAxes `cty:"axes" hcl:"axes,block" column:"axes,jsonb" json:"axes"` Grouping *string `cty:"grouping" hcl:"grouping" json:"grouping,omitempty"` Transform *string `cty:"transform" hcl:"transform" json:"transform,omitempty"` Series map[string]*ReportChartSeries `cty:"series" json:"series"` DeclRange hcl.Range `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
ReportChart is a struct representing a leaf reporting node
func NewReportChart ¶
func NewReportChart(block *hcl.Block) *ReportChart
func (*ReportChart) AddParent ¶
func (c *ReportChart) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*ReportChart) AddReference ¶
func (c *ReportChart) AddReference(*ResourceReference)
AddReference implements HclResource
func (*ReportChart) CtyValue ¶
func (c *ReportChart) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*ReportChart) Diff ¶
func (c *ReportChart) Diff(other *ReportChart) *ReportTreeItemDiffs
func (*ReportChart) Equals ¶
func (c *ReportChart) Equals(other *ReportChart) bool
func (*ReportChart) GetChildren ¶
func (c *ReportChart) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*ReportChart) GetDeclRange ¶
func (c *ReportChart) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*ReportChart) GetDescription ¶
func (c *ReportChart) GetDescription() string
GetDescription implements ModTreeItem
func (*ReportChart) GetMetadata ¶
func (c *ReportChart) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ReportChart) GetParents ¶
func (c *ReportChart) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*ReportChart) GetPaths ¶
func (c *ReportChart) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*ReportChart) GetTags ¶
func (c *ReportChart) GetTags() map[string]string
GetTags implements ModTreeItem
func (*ReportChart) GetTitle ¶
func (c *ReportChart) GetTitle() string
GetTitle implements ModTreeItem
func (*ReportChart) GetUnqualifiedName ¶
func (c *ReportChart) GetUnqualifiedName() string
GetUnqualifiedName implements ReportLeafNode
func (*ReportChart) GetWidth ¶
func (c *ReportChart) GetWidth() int
GetWidth implements ReportLeafNode
func (*ReportChart) Name ¶
func (c *ReportChart) Name() string
Name implements HclResource, ModTreeItem return name in format: 'chart.<shortName>'
func (*ReportChart) OnDecoded ¶
func (c *ReportChart) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*ReportChart) SetMetadata ¶
func (c *ReportChart) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type ReportChartAxes ¶
type ReportChartAxes struct { X *ReportChartAxesX `cty:"x" hcl:"x,block" json:"x,omitempty"` Y *ReportChartAxesY `cty:"y" hcl:"y,block" json:"y,omitempty"` }
func (*ReportChartAxes) Equals ¶
func (a *ReportChartAxes) Equals(other *ReportChartAxes) bool
func (*ReportChartAxes) Merge ¶
func (a *ReportChartAxes) Merge(other *ReportChartAxes)
type ReportChartAxesX ¶
type ReportChartAxesX struct { Title *ReportChartAxisTitle `cty:"title" hcl:"title,block" json:"title,omitempty"` Labels *ReportChartLabels `cty:"labels" hcl:"labels,block" json:"labels,omitempty"` }
func (*ReportChartAxesX) Equals ¶
func (x *ReportChartAxesX) Equals(other *ReportChartAxesX) bool
func (*ReportChartAxesX) Merge ¶
func (x *ReportChartAxesX) Merge(other *ReportChartAxesX)
type ReportChartAxesY ¶
type ReportChartAxesY struct { Title *ReportChartAxisTitle `cty:"title" hcl:"title,block" json:"title,omitempty"` Labels *ReportChartLabels `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 (*ReportChartAxesY) Equals ¶
func (y *ReportChartAxesY) Equals(other *ReportChartAxesY) bool
func (*ReportChartAxesY) Merge ¶
func (y *ReportChartAxesY) Merge(other *ReportChartAxesY)
type ReportChartAxisTitle ¶
type ReportChartAxisTitle 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 (*ReportChartAxisTitle) Equals ¶
func (t *ReportChartAxisTitle) Equals(other *ReportChartAxisTitle) bool
func (*ReportChartAxisTitle) Merge ¶
func (t *ReportChartAxisTitle) Merge(other *ReportChartAxisTitle)
type ReportChartLabels ¶
type ReportChartLabels struct { Display *string `cty:"display" hcl:"display" json:"display,omitempty"` Format *string `cty:"format" hcl:"format" json:"format,omitempty"` }
func (*ReportChartLabels) Equals ¶
func (l *ReportChartLabels) Equals(other *ReportChartLabels) bool
func (*ReportChartLabels) Merge ¶
func (l *ReportChartLabels) Merge(other *ReportChartLabels)
type ReportChartLegend ¶
type ReportChartLegend struct { Display *string `cty:"display" hcl:"display" json:"display,omitempty"` Position *string `cty:"position" hcl:"position" json:"position,omitempty"` }
func (*ReportChartLegend) Equals ¶
func (l *ReportChartLegend) Equals(other *ReportChartLegend) bool
func (*ReportChartLegend) Merge ¶
func (l *ReportChartLegend) Merge(other *ReportChartLegend)
type ReportChartSeries ¶
type ReportChartSeries struct { Name string `hcl:"name,label" json:"-"` Title *string `cty:"title" hcl:"title" json:"title,omitempty"` Color *string `cty:"color" hcl:"color" json:"color,omitempty"` }
func (ReportChartSeries) Equals ¶
func (s ReportChartSeries) Equals(other *ReportChartSeries) bool
type ReportChartSeriesList ¶
type ReportChartSeriesList []*ReportChartSeries
func (ReportChartSeriesList) Merge ¶
func (s ReportChartSeriesList) Merge(other ReportChartSeriesList)
type ReportContainer ¶
type ReportContainer struct { ShortName string FullName string `cty:"name"` UnqualifiedName string Title *string `cty:"title" column:"title,text"` Width *int `cty:"width" column:"width,text"` Base *ReportContainer 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"` HclType string // contains filtered or unexported fields }
ReportContainer is a struct representing the Report and Container resource
func NewReportContainer ¶
func NewReportContainer(block *hcl.Block) *ReportContainer
func (*ReportContainer) AddParent ¶
func (c *ReportContainer) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*ReportContainer) AddReference ¶
func (c *ReportContainer) AddReference(*ResourceReference)
AddReference implements HclResource
func (*ReportContainer) CtyValue ¶
func (c *ReportContainer) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*ReportContainer) Diff ¶
func (c *ReportContainer) Diff(other *ReportContainer) *ReportTreeItemDiffs
func (*ReportContainer) Equals ¶
func (c *ReportContainer) Equals(other *ReportContainer) bool
func (*ReportContainer) GetChildren ¶
func (c *ReportContainer) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*ReportContainer) GetDeclRange ¶
func (c *ReportContainer) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*ReportContainer) GetDescription ¶
func (c *ReportContainer) GetDescription() string
GetDescription implements ModTreeItem
func (*ReportContainer) GetMetadata ¶
func (c *ReportContainer) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ReportContainer) GetMod ¶
func (c *ReportContainer) GetMod() *Mod
GetMod implements HclResource
func (*ReportContainer) GetParents ¶
func (c *ReportContainer) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*ReportContainer) GetPaths ¶
func (c *ReportContainer) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*ReportContainer) GetTags ¶
func (c *ReportContainer) GetTags() map[string]string
GetTags implements ModTreeItem
func (*ReportContainer) GetTitle ¶
func (c *ReportContainer) GetTitle() string
GetTitle implements ModTreeItem
func (*ReportContainer) GetUnqualifiedName ¶
func (c *ReportContainer) GetUnqualifiedName() string
GetUnqualifiedName implements ReportLeafNode
func (*ReportContainer) IsReport ¶
func (c *ReportContainer) IsReport() bool
func (*ReportContainer) Name ¶
func (c *ReportContainer) Name() string
Name implements HclResource, ModTreeItem return name in format: 'report.<shortName>'
func (*ReportContainer) OnDecoded ¶
func (c *ReportContainer) OnDecoded(block *hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*ReportContainer) SetChildren ¶
func (c *ReportContainer) SetChildren(children []ModTreeItem)
func (*ReportContainer) SetMetadata ¶
func (c *ReportContainer) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
func (*ReportContainer) SetMod ¶
func (c *ReportContainer) SetMod(mod *Mod)
SetMod implements HclResource
func (*ReportContainer) SetPaths ¶
func (c *ReportContainer) SetPaths()
SetPaths implements ModTreeItem
type ReportHierarchy ¶
type ReportHierarchy struct { 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:"-"` SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"type,omitempty"` Base *ReportHierarchy `hcl:"base" json:"-"` CategoryList ReportHierarchyCategoryList `cty:"category_list" hcl:"category,block" column:"category,jsonb" json:"-"` Categories map[string]*ReportHierarchyCategory `cty:"categories" json:"categories"` DeclRange hcl.Range `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
ReportHierarchy is a struct representing a leaf reporting node
func NewReportHierarchy ¶
func NewReportHierarchy(block *hcl.Block) *ReportHierarchy
func (*ReportHierarchy) AddParent ¶
func (h *ReportHierarchy) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*ReportHierarchy) AddReference ¶
func (h *ReportHierarchy) AddReference(*ResourceReference)
AddReference implements HclResource
func (*ReportHierarchy) CtyValue ¶
func (h *ReportHierarchy) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*ReportHierarchy) Diff ¶
func (h *ReportHierarchy) Diff(other *ReportHierarchy) *ReportTreeItemDiffs
func (*ReportHierarchy) Equals ¶
func (h *ReportHierarchy) Equals(other *ReportHierarchy) bool
func (*ReportHierarchy) GetChildren ¶
func (h *ReportHierarchy) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*ReportHierarchy) GetDeclRange ¶
func (h *ReportHierarchy) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*ReportHierarchy) GetDescription ¶
func (h *ReportHierarchy) GetDescription() string
GetDescription implements ModTreeItem
func (*ReportHierarchy) GetMetadata ¶
func (h *ReportHierarchy) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ReportHierarchy) GetMod ¶
func (h *ReportHierarchy) GetMod() *Mod
GetMod implements HclResource
func (*ReportHierarchy) GetParents ¶
func (h *ReportHierarchy) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*ReportHierarchy) GetPaths ¶
func (h *ReportHierarchy) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*ReportHierarchy) GetSQL ¶
func (h *ReportHierarchy) GetSQL() string
GetSQL implements ReportLeafNode
func (*ReportHierarchy) GetTags ¶
func (h *ReportHierarchy) GetTags() map[string]string
GetTags implements ModTreeItem
func (*ReportHierarchy) GetTitle ¶
func (h *ReportHierarchy) GetTitle() string
GetTitle implements ModTreeItem
func (*ReportHierarchy) GetUnqualifiedName ¶
func (h *ReportHierarchy) GetUnqualifiedName() string
GetUnqualifiedName implements ReportLeafNode
func (*ReportHierarchy) GetWidth ¶
func (h *ReportHierarchy) GetWidth() int
GetWidth implements ReportLeafNode
func (*ReportHierarchy) Name ¶
func (h *ReportHierarchy) Name() string
Name implements HclResource, ModTreeItem return name in format: 'chart.<shortName>'
func (*ReportHierarchy) OnDecoded ¶
func (h *ReportHierarchy) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*ReportHierarchy) SetMetadata ¶
func (h *ReportHierarchy) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
func (*ReportHierarchy) SetMod ¶
func (h *ReportHierarchy) SetMod(mod *Mod)
SetMod implements HclResource
func (*ReportHierarchy) SetPaths ¶
func (h *ReportHierarchy) SetPaths()
SetPaths implements ModTreeItem
type ReportHierarchyCategory ¶
type ReportHierarchyCategory struct { Name string `hcl:"name,label" json:"-"` Title *string `cty:"title" hcl:"title" json:"title,omitempty"` Color *string `cty:"color" hcl:"color" json:"color,omitempty"` }
func (ReportHierarchyCategory) Equals ¶
func (c ReportHierarchyCategory) Equals(other *ReportHierarchyCategory) bool
type ReportHierarchyCategoryList ¶
type ReportHierarchyCategoryList []*ReportHierarchyCategory
func (ReportHierarchyCategoryList) Merge ¶
func (c ReportHierarchyCategoryList) Merge(other ReportHierarchyCategoryList)
type ReportImage ¶
type ReportImage struct { 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:"-"` SQL *string `cty:"sql" hcl:"sql" column:"sql,text" 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"` Base *ReportImage `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
ReportImage is a struct representing a leaf reporting node
func NewReportImage ¶
func NewReportImage(block *hcl.Block) *ReportImage
func (*ReportImage) AddParent ¶
func (c *ReportImage) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*ReportImage) AddReference ¶
func (c *ReportImage) AddReference(*ResourceReference)
AddReference implements HclResource
func (*ReportImage) CtyValue ¶
func (c *ReportImage) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*ReportImage) Diff ¶
func (c *ReportImage) Diff(other *ReportImage) *ReportTreeItemDiffs
func (*ReportImage) Equals ¶
func (c *ReportImage) Equals(other *ReportImage) bool
func (*ReportImage) GetChildren ¶
func (c *ReportImage) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*ReportImage) GetDeclRange ¶
func (c *ReportImage) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*ReportImage) GetDescription ¶
func (c *ReportImage) GetDescription() string
GetDescription implements ModTreeItem
func (*ReportImage) GetMetadata ¶
func (c *ReportImage) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ReportImage) GetParents ¶
func (c *ReportImage) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*ReportImage) GetPaths ¶
func (c *ReportImage) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*ReportImage) GetTags ¶
func (c *ReportImage) GetTags() map[string]string
GetTags implements ModTreeItem
func (*ReportImage) GetTitle ¶
func (c *ReportImage) GetTitle() string
GetTitle implements ModTreeItem
func (*ReportImage) GetUnqualifiedName ¶
func (c *ReportImage) GetUnqualifiedName() string
GetUnqualifiedName implements ReportLeafNode
func (*ReportImage) GetWidth ¶
func (c *ReportImage) GetWidth() int
GetWidth implements ReportLeafNode
func (*ReportImage) Name ¶
func (c *ReportImage) Name() string
Name implements HclResource, ModTreeItem return name in format: 'image.<shortName>'
func (*ReportImage) OnDecoded ¶
func (c *ReportImage) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*ReportImage) SetMetadata ¶
func (c *ReportImage) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type ReportInput ¶
type ReportInput struct { 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:"-"` SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Type *string `cty:"type" hcl:"type" column:"type,text" json:"type,omitempty"` Base *ReportInput `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
ReportInput is a struct representing a leaf reporting node
func NewReportInput ¶
func NewReportInput(block *hcl.Block) *ReportInput
func (*ReportInput) AddParent ¶
func (c *ReportInput) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*ReportInput) AddReference ¶
func (c *ReportInput) AddReference(*ResourceReference)
AddReference implements HclResource
func (*ReportInput) CtyValue ¶
func (c *ReportInput) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*ReportInput) Diff ¶
func (c *ReportInput) Diff(other *ReportInput) *ReportTreeItemDiffs
func (*ReportInput) Equals ¶
func (c *ReportInput) Equals(other *ReportInput) bool
func (*ReportInput) GetChildren ¶
func (c *ReportInput) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*ReportInput) GetDeclRange ¶
func (c *ReportInput) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*ReportInput) GetDescription ¶
func (c *ReportInput) GetDescription() string
GetDescription implements ModTreeItem
func (*ReportInput) GetMetadata ¶
func (c *ReportInput) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ReportInput) GetParents ¶
func (c *ReportInput) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*ReportInput) GetPaths ¶
func (c *ReportInput) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*ReportInput) GetTags ¶
func (c *ReportInput) GetTags() map[string]string
GetTags implements ModTreeItem
func (*ReportInput) GetTitle ¶
func (c *ReportInput) GetTitle() string
GetTitle implements ModTreeItem
func (*ReportInput) GetUnqualifiedName ¶
func (c *ReportInput) GetUnqualifiedName() string
GetUnqualifiedName implements ReportLeafNode
func (*ReportInput) GetWidth ¶
func (c *ReportInput) GetWidth() int
GetWidth implements ReportLeafNode
func (*ReportInput) Name ¶
func (c *ReportInput) Name() string
Name implements HclResource, ModTreeItem return name in format: 'chart.<shortName>'
func (*ReportInput) OnDecoded ¶
func (c *ReportInput) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*ReportInput) SetMetadata ¶
func (c *ReportInput) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type ReportTable ¶
type ReportTable struct { 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:"-"` SQL *string `cty:"sql" hcl:"sql" column:"sql,text" json:"-"` Base *ReportTable `hcl:"base" json:"-"` ColumnList ReportTableColumnList `cty:"column_list" hcl:"column,block" column:"columns,jsonb" json:"-"` Columns map[string]*ReportTableColumn `cty:"columns" json:"columns"` DeclRange hcl.Range `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
ReportTable is a struct representing a leaf reporting node
func NewReportTable ¶
func NewReportTable(block *hcl.Block) *ReportTable
func (*ReportTable) AddParent ¶
func (t *ReportTable) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*ReportTable) AddReference ¶
func (t *ReportTable) AddReference(*ResourceReference)
AddReference implements HclResource
func (*ReportTable) CtyValue ¶
func (t *ReportTable) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*ReportTable) Diff ¶
func (t *ReportTable) Diff(other *ReportTable) *ReportTreeItemDiffs
func (*ReportTable) Equals ¶
func (t *ReportTable) Equals(other *ReportTable) bool
func (*ReportTable) GetChildren ¶
func (t *ReportTable) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*ReportTable) GetDeclRange ¶
func (t *ReportTable) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*ReportTable) GetDescription ¶
func (t *ReportTable) GetDescription() string
GetDescription implements ModTreeItem
func (*ReportTable) GetMetadata ¶
func (t *ReportTable) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ReportTable) GetParents ¶
func (t *ReportTable) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*ReportTable) GetPaths ¶
func (t *ReportTable) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*ReportTable) GetTags ¶
func (t *ReportTable) GetTags() map[string]string
GetTags implements ModTreeItem
func (*ReportTable) GetTitle ¶
func (t *ReportTable) GetTitle() string
GetTitle implements ModTreeItem, ReportLeafNode
func (*ReportTable) GetUnqualifiedName ¶
func (t *ReportTable) GetUnqualifiedName() string
GetUnqualifiedName implements ReportLeafNode
func (*ReportTable) GetWidth ¶
func (t *ReportTable) GetWidth() int
GetWidth implements ReportLeafNode
func (*ReportTable) Name ¶
func (t *ReportTable) Name() string
Name implements HclResource, ModTreeItem return name in format: 'table.<shortName>'
func (*ReportTable) OnDecoded ¶
func (t *ReportTable) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*ReportTable) SetMetadata ¶
func (t *ReportTable) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type ReportTableColumn ¶
type ReportTableColumn struct { Name string `hcl:"name,label" json:"-"` Display *string `cty:"display" hcl:"display" json:"display,omitempty"` Wrap *string `cty:"wrap" hcl:"wrap" json:"wrap,omitempty"` }
func (ReportTableColumn) Equals ¶
func (c ReportTableColumn) Equals(other *ReportTableColumn) bool
type ReportTableColumnList ¶
type ReportTableColumnList []*ReportTableColumn
func (ReportTableColumnList) Merge ¶
func (c ReportTableColumnList) Merge(other ReportTableColumnList)
type ReportText ¶
type ReportText struct { 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:"type,omitempty"` Value *string `cty:"value" hcl:"value" column:"value,text" json:"value,omitempty"` Base *ReportText `hcl:"base" json:"-"` DeclRange hcl.Range `json:"-"` Mod *Mod `cty:"mod" json:"-"` Paths []NodePath `column:"path,jsonb" json:"-"` // contains filtered or unexported fields }
ReportText is a struct representing a leaf reporting node
func NewReportText ¶
func NewReportText(block *hcl.Block) *ReportText
func (*ReportText) AddParent ¶
func (t *ReportText) AddParent(parent ModTreeItem) error
AddParent implements ModTreeItem
func (*ReportText) AddReference ¶
func (t *ReportText) AddReference(*ResourceReference)
AddReference implements HclResource
func (*ReportText) CtyValue ¶
func (t *ReportText) CtyValue() (cty.Value, error)
CtyValue implements HclResource
func (*ReportText) Diff ¶
func (t *ReportText) Diff(other *ReportText) *ReportTreeItemDiffs
func (*ReportText) Equals ¶
func (t *ReportText) Equals(other *ReportText) bool
func (*ReportText) GetChildren ¶
func (t *ReportText) GetChildren() []ModTreeItem
GetChildren implements ModTreeItem
func (*ReportText) GetDeclRange ¶
func (t *ReportText) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*ReportText) GetDescription ¶
func (t *ReportText) GetDescription() string
GetDescription implements ModTreeItem
func (*ReportText) GetMetadata ¶
func (t *ReportText) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ReportText) GetParents ¶
func (t *ReportText) GetParents() []ModTreeItem
GetParents implements ModTreeItem
func (*ReportText) GetPaths ¶
func (t *ReportText) GetPaths() []NodePath
GetPaths implements ModTreeItem
func (*ReportText) GetTags ¶
func (t *ReportText) GetTags() map[string]string
GetTags implements ModTreeItem
func (*ReportText) GetTitle ¶
func (t *ReportText) GetTitle() string
GetTitle implements ModTreeItem
func (*ReportText) GetUnqualifiedName ¶
func (t *ReportText) GetUnqualifiedName() string
GetUnqualifiedName implements ReportLeafNode
func (*ReportText) GetWidth ¶
func (t *ReportText) GetWidth() int
GetWidth implements ReportLeafNode
func (*ReportText) Name ¶
func (t *ReportText) Name() string
Name implements HclResource, ModTreeItem, ReportLeafNode return name in format: 'text.<shortName>'
func (*ReportText) OnDecoded ¶
func (t *ReportText) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*ReportText) SetMetadata ¶
func (t *ReportText) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type ReportTreeItemDiffs ¶ added in v0.7.1
type ReportTreeItemDiffs struct { Name string Item ModTreeItem ChangedProperties []string AddedItems []string RemovedItems []string }
ReportTreeItemDiffs is a struct representing the differences between 2 ReportTreeItems (of same type)
func (*ReportTreeItemDiffs) AddAddedItem ¶ added in v0.7.1
func (d *ReportTreeItemDiffs) AddAddedItem(name string)
func (*ReportTreeItemDiffs) AddPropertyDiff ¶ added in v0.7.1
func (d *ReportTreeItemDiffs) AddPropertyDiff(propertyName string)
func (*ReportTreeItemDiffs) AddRemovedItem ¶ added in v0.7.1
func (d *ReportTreeItemDiffs) AddRemovedItem(name string)
func (*ReportTreeItemDiffs) HasChanges ¶ added in v0.7.1
func (d *ReportTreeItemDiffs) HasChanges() bool
type ReportingLeafNode ¶
type ReportingLeafNode interface { Name() string GetUnqualifiedName() string GetTitle() string GetWidth() int GetSQL() string GetPaths() []NodePath }
ReportingLeafNode must be implemented by resources may be a leaf node in the repoort execution tree
type Require ¶ added in v0.11.0
type Require struct { SteampipeVersionString string `hcl:"steampipe,optional"` SteampipeVersion *semver.Version Plugins []*PluginVersion `hcl:"plugin,block"` Mods []*ModVersionConstraint `hcl:"mod,block"` DeclRange hcl.Range `json:"-"` // contains filtered or unexported fields }
Require is a struct representing mod dependencies
func NewRequire ¶ added in v0.13.0
func NewRequire() *Require
func (*Require) AddModDependencies ¶ added in v0.11.0
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 ¶ added in v0.11.0
func (r *Require) ContainsMod(requiredModVersion *ModVersionConstraint) bool
func (*Require) GetModDependency ¶ added in v0.11.0
func (r *Require) GetModDependency(name string) *ModVersionConstraint
func (*Require) RemoveAllModDependencies ¶ added in v0.11.0
func (r *Require) RemoveAllModDependencies()
func (*Require) RemoveModDependencies ¶ added in v0.11.0
func (r *Require) RemoveModDependencies(versions map[string]*ModVersionConstraint)
func (*Require) ValidateSteampipeVersion ¶ added in v0.11.0
type ResourceMapsProvider ¶
type ResourceMapsProvider interface {
GetResourceMaps() *WorkspaceResourceMaps
}
type ResourceMetadata ¶ added in v0.5.0
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 }
ResourceMetadata ius a struct containing additional data about each resource, used to populate the introspection tables
func (*ResourceMetadata) SetMod ¶ added in v0.5.0
func (m *ResourceMetadata) SetMod(mod *Mod)
SetMod sets the mod name and mod short name
type ResourceReference ¶ added in v0.9.0
type ResourceReference struct { 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"` // contains filtered or unexported fields }
func (*ResourceReference) Equals ¶ added in v0.9.0
func (r *ResourceReference) Equals(other *ResourceReference) bool
func (*ResourceReference) GetMetadata ¶ added in v0.9.0
func (r *ResourceReference) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*ResourceReference) Name ¶ added in v0.9.0
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) SetMetadata ¶ added in v0.9.0
func (r *ResourceReference) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
func (*ResourceReference) String ¶ added in v0.9.0
func (r *ResourceReference) String() string
type ResourceReferenceMap ¶ added in v0.9.0
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 ¶ added in v0.9.0
func (m ResourceReferenceMap) Add(reference *ResourceReference)
type ResourceWithMetadata ¶ added in v0.5.0
type ResourceWithMetadata interface { Name() string GetMetadata() *ResourceMetadata SetMetadata(metadata *ResourceMetadata) }
ResourceWithMetadata must be implemented by resources which supports reflection metadata
type Variable ¶ added in v0.8.0
type Variable struct { ShortName string FullName string `column:"name,text"` Description string `column:"description,text"` Default cty.Value `column:"default_value,jsonb"` Type cty.Type `column:"var_type,text"` DescriptionSet bool // set after value resolution `column:"value,jsonb"` Value cty.Value `column:"value,jsonb"` ValueSourceType string `column:"value_source,text"` ValueSourceFileName string `column:"value_source_file_name,text"` ValueSourceStartLineNumber int `column:"value_source_start_line_number,integer"` ValueSourceEndLineNumber int `column:"value_source_end_line_number,integer"` DeclRange hcl.Range ParsingMode var_config.VariableParsingMode Mod *Mod UnqualifiedName string // contains filtered or unexported fields }
Variable is a struct representing a Variable resource
func NewVariable ¶ added in v0.8.0
func NewVariable(v *var_config.Variable) *Variable
func (*Variable) AddReference ¶ added in v0.8.0
func (v *Variable) AddReference(*ResourceReference)
AddReference implements HclResource
func (*Variable) GetDeclRange ¶ added in v0.9.0
func (v *Variable) GetDeclRange() *hcl.Range
GetDeclRange implements HclResource
func (*Variable) GetMetadata ¶ added in v0.8.0
func (v *Variable) GetMetadata() *ResourceMetadata
GetMetadata implements ResourceWithMetadata
func (*Variable) OnDecoded ¶ added in v0.8.0
func (v *Variable) OnDecoded(*hcl.Block) hcl.Diagnostics
OnDecoded implements HclResource
func (*Variable) Required ¶ added in v0.8.0
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 ¶ added in v0.9.0
func (*Variable) SetMetadata ¶ added in v0.8.0
func (v *Variable) SetMetadata(metadata *ResourceMetadata)
SetMetadata implements ResourceWithMetadata
type VariableValidationFailedError ¶ added in v0.8.0
type VariableValidationFailedError struct { }
func (VariableValidationFailedError) Error ¶ added in v0.8.0
func (m VariableValidationFailedError) Error() string
type VersionConstrainCollection ¶ added in v0.11.0
type VersionConstrainCollection []*ModVersionConstraint
type WorkspaceResourceMaps ¶ added in v0.5.0
type WorkspaceResourceMaps struct { // the parent mod Mod *Mod // all mods (including deps) Mods map[string]*Mod Queries map[string]*Query Controls map[string]*Control Benchmarks map[string]*Benchmark Variables map[string]*Variable Reports map[string]*ReportContainer ReportContainers map[string]*ReportContainer ReportCards map[string]*ReportCard ReportCharts map[string]*ReportChart ReportHierarchies map[string]*ReportHierarchy ReportImages map[string]*ReportImage ReportInputs map[string]*ReportInput ReportTables map[string]*ReportTable ReportTexts map[string]*ReportText References map[string]*ResourceReference LocalQueries map[string]*Query LocalControls map[string]*Control LocalBenchmarks map[string]*Benchmark }
WorkspaceResourceMaps is a struct containing maps of all mod resource types This is provided to avoid db needing to reference workspace package
func NewWorkspaceResourceMaps ¶ added in v0.8.0
func NewWorkspaceResourceMaps(mod *Mod) *WorkspaceResourceMaps
func (*WorkspaceResourceMaps) AddQueryProvider ¶ added in v0.11.0
func (m *WorkspaceResourceMaps) AddQueryProvider(provider QueryProvider)
func (*WorkspaceResourceMaps) Empty ¶ added in v0.10.0
func (m *WorkspaceResourceMaps) Empty() bool
func (*WorkspaceResourceMaps) Equals ¶ added in v0.8.0
func (m *WorkspaceResourceMaps) Equals(other *WorkspaceResourceMaps) bool
func (*WorkspaceResourceMaps) PopulateReferences ¶ added in v0.9.0
func (m *WorkspaceResourceMaps) PopulateReferences()
type WorkspaceResources ¶ added in v0.8.0
type WorkspaceResources struct { Query map[string]bool Control map[string]bool Benchmark map[string]bool }
func NewWorkspaceResources ¶ added in v0.8.0
func NewWorkspaceResources() *WorkspaceResources
func (*WorkspaceResources) GetSortedBenchmarksAndControlNames ¶ added in v0.8.0
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 ¶ added in v0.8.0
func (w *WorkspaceResources) GetSortedNamedQueryNames() []string
func (*WorkspaceResources) Merge ¶ added in v0.8.0
func (r *WorkspaceResources) Merge(other *WorkspaceResources) *WorkspaceResources
Source Files ¶
- attributes.go
- benchmark.go
- connection.go
- control.go
- errors.go
- interfaces.go
- local.go
- mod.go
- mod_map.go
- mod_name.go
- mod_resource_tree.go
- mod_resource_walk.go
- mod_validate.go
- mod_version_constrain_collection.go
- mod_version_constraint.go
- named_item.go
- nodepath.go
- open_graph.go
- param_def.go
- parse_names.go
- plugin_version.go
- prepared_statement.go
- query.go
- query_args.go
- report_card.go
- report_chart.go
- report_chart_axes.go
- report_chart_labels.go
- report_chart_legend.go
- report_chart_series.go
- report_chart_series_list.go
- report_container.go
- report_hierarchy.go
- report_hierarchy_category.go
- report_hierarchy_category_list.go
- report_image.go
- report_input.go
- report_table.go
- report_table_column.go
- report_table_column_list.go
- report_text.go
- report_tree_item_diffs.go
- requires.go
- resource_maps_provider.go
- resource_metadata.go
- resource_provider.go
- resource_reference.go
- resource_type_map.go
- variable.go
- workspace_resource_maps.go
- workspace_resources.go