Documentation ¶
Index ¶
- Constants
- func AddIfMissing[M ~map[K]V, K comparable, V definitions.FabricBlock](m M, key K, newBlock V) *hcl.Diagnostic
- func FindFabricFiles(rootDir fs.FS, recursive bool, fn func(path string)) (diags diagnostics.Diag)
- func ParseVars(ctx context.Context, block *hclsyntax.Block, localVar *hclsyntax.Attribute) (parsed *definitions.ParsedVars, diags diagnostics.Diag)
- func PluginMapToCty[V definitions.FabricBlock](plugins map[definitions.Key]V) (content, data, publish cty.Value)
- func Resolve[B definitions.FabricBlock](db *DefinedBlocks, expr hcl.Expression) (res B, diags diagnostics.Diag)
- type DefinedBlocks
- func (db *DefinedBlocks) AsValueMap() map[string]cty.Value
- func (db *DefinedBlocks) DefaultConfig(pluginKind, pluginName string) (config *definitions.Config)
- func (db *DefinedBlocks) DefaultConfigFor(plugin *definitions.Plugin) (config *definitions.Config)
- func (db *DefinedBlocks) Merge(other *DefinedBlocks) (diags diagnostics.Diag)
- func (db *DefinedBlocks) ParseDocument(ctx context.Context, d *definitions.Document) (doc *definitions.ParsedDocument, diags diagnostics.Diag)
- func (db *DefinedBlocks) ParsePlugin(ctx context.Context, plugin *definitions.Plugin) (res *definitions.ParsedPlugin, diags diagnostics.Diag)
- func (db *DefinedBlocks) ParseSection(ctx context.Context, section *definitions.Section) (res *definitions.ParsedSection, diags diagnostics.Diag)
Constants ¶
View Source
const FabricFileExt = ".fabric"
Variables ¶
This section is empty.
Functions ¶
func AddIfMissing ¶
func AddIfMissing[M ~map[K]V, K comparable, V definitions.FabricBlock](m M, key K, newBlock V) *hcl.Diagnostic
func FindFabricFiles ¶
Calls fn with paths to every *.fabric files and collects errors into the returned diags.
func ParseVars ¶ added in v0.4.2
func ParseVars(ctx context.Context, block *hclsyntax.Block, localVar *hclsyntax.Attribute) (parsed *definitions.ParsedVars, diags diagnostics.Diag)
func PluginMapToCty ¶
func PluginMapToCty[V definitions.FabricBlock](plugins map[definitions.Key]V) (content, data, publish cty.Value)
func Resolve ¶
func Resolve[B definitions.FabricBlock](db *DefinedBlocks, expr hcl.Expression) (res B, diags diagnostics.Diag)
Types ¶
type DefinedBlocks ¶
type DefinedBlocks struct { GlobalConfig *definitions.GlobalConfig Config map[definitions.Key]*definitions.Config Documents map[string]*definitions.Document Sections map[string]*definitions.Section Plugins map[definitions.Key]*definitions.Plugin }
func NewDefinedBlocks ¶
func NewDefinedBlocks() *DefinedBlocks
func ParseDir ¶
func ParseDir(dir fs.FS) (*DefinedBlocks, map[string]*hcl.File, diagnostics.Diag)
func (*DefinedBlocks) AsValueMap ¶
func (db *DefinedBlocks) AsValueMap() map[string]cty.Value
func (*DefinedBlocks) DefaultConfig ¶
func (db *DefinedBlocks) DefaultConfig(pluginKind, pluginName string) (config *definitions.Config)
func (*DefinedBlocks) DefaultConfigFor ¶
func (db *DefinedBlocks) DefaultConfigFor(plugin *definitions.Plugin) (config *definitions.Config)
func (*DefinedBlocks) Merge ¶
func (db *DefinedBlocks) Merge(other *DefinedBlocks) (diags diagnostics.Diag)
func (*DefinedBlocks) ParseDocument ¶
func (db *DefinedBlocks) ParseDocument(ctx context.Context, d *definitions.Document) (doc *definitions.ParsedDocument, diags diagnostics.Diag)
func (*DefinedBlocks) ParsePlugin ¶
func (db *DefinedBlocks) ParsePlugin(ctx context.Context, plugin *definitions.Plugin) (res *definitions.ParsedPlugin, diags diagnostics.Diag)
Evaluates a defined plugin.
func (*DefinedBlocks) ParseSection ¶
func (db *DefinedBlocks) ParseSection(ctx context.Context, section *definitions.Section) (res *definitions.ParsedSection, diags diagnostics.Diag)
Evaluates a defined plugin.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.