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 PluginMapToCty[V definitions.FabricBlock](plugins map[definitions.Key]V) (content, data cty.Value)
- func Resolve[B definitions.FabricBlock](db *DefinedBlocks, expr hcl.Expression) (res B, diags diagnostics.Diag)
- type Caller
- func (c *Caller) CallContent(ctx context.Context, name string, config evaluation.Configuration, ...) (result *plugin.ContentResult, diag diagnostics.Diag)
- func (c *Caller) CallData(ctx context.Context, name string, config evaluation.Configuration, ...) (result plugin.Data, diag diagnostics.Diag)
- func (c *Caller) ContentInvocationOrder(ctx context.Context, name string) (order plugin.InvocationOrder, diag 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(d *definitions.Document) (doc *definitions.ParsedDocument, diags diagnostics.Diag)
- func (db *DefinedBlocks) ParsePlugin(plugin *definitions.Plugin) (res *definitions.ParsedPlugin, diags diagnostics.Diag)
- func (db *DefinedBlocks) ParseSection(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 PluginMapToCty ¶
func PluginMapToCty[V definitions.FabricBlock](plugins map[definitions.Key]V) (content, data cty.Value)
func Resolve ¶
func Resolve[B definitions.FabricBlock](db *DefinedBlocks, expr hcl.Expression) (res B, diags diagnostics.Diag)
Types ¶
type Caller ¶
type Caller struct {
// contains filtered or unexported fields
}
func NewPluginCaller ¶
func (*Caller) CallContent ¶
func (c *Caller) CallContent(ctx context.Context, name string, config evaluation.Configuration, invocation evaluation.Invocation, dataCtx plugin.MapData, contentID uint32) (result *plugin.ContentResult, diag diagnostics.Diag)
func (*Caller) CallData ¶
func (c *Caller) CallData(ctx context.Context, name string, config evaluation.Configuration, invocation evaluation.Invocation) (result plugin.Data, diag diagnostics.Diag)
func (*Caller) ContentInvocationOrder ¶ added in v0.4.1
func (c *Caller) ContentInvocationOrder(ctx context.Context, name string) (order plugin.InvocationOrder, diag diagnostics.Diag)
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(d *definitions.Document) (doc *definitions.ParsedDocument, diags diagnostics.Diag)
func (*DefinedBlocks) ParsePlugin ¶
func (db *DefinedBlocks) ParsePlugin(plugin *definitions.Plugin) (res *definitions.ParsedPlugin, diags diagnostics.Diag)
Evaluates a defined plugin.
func (*DefinedBlocks) ParseSection ¶
func (db *DefinedBlocks) ParseSection(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.