evaluation

package
v0.4.1-rc4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEvalContext

func NewEvalContext() *hcl.EvalContext

Types

type BlockInvocation

type BlockInvocation struct {
	*hclsyntax.Body
	DefinitionRange hcl.Range
}

func (*BlockInvocation) DefRange

func (b *BlockInvocation) DefRange() hcl.Range

DefRange implements Invocation.

func (*BlockInvocation) GetBody

func (b *BlockInvocation) GetBody() *hclsyntax.Body

GetBody implements Invocation.

func (*BlockInvocation) ParseInvocation

func (b *BlockInvocation) ParseInvocation(spec hcldec.Spec) (cty.Value, diagnostics.Diag)

ParseInvocation implements Invocation.

func (*BlockInvocation) Range

func (b *BlockInvocation) Range() hcl.Range

Range implements Invocation.

func (*BlockInvocation) SetBody

func (b *BlockInvocation) SetBody(body *hclsyntax.Body)

SetBody implements Invocation.

type Configuration

type Configuration interface {
	ParseConfig(spec hcldec.Spec) (cty.Value, diagnostics.Diag)
	Range() hcl.Range
	Exists() bool
}

To act as a plugin configuration struct must implement this interface.

type ContentCaller

type ContentCaller interface {
	CallContent(ctx context.Context, name string, config Configuration, invocation Invocation, context plugin.MapData, contentID uint32) (result *plugin.ContentResult, diag diagnostics.Diag)
	ContentInvocationOrder(ctx context.Context, name string) (order plugin.InvocationOrder, diag diagnostics.Diag)
}

type DataCaller

type DataCaller interface {
	CallData(ctx context.Context, name string, config Configuration, invocation Invocation) (result plugin.Data, diag diagnostics.Diag)
}

type DataContext

type DataContext struct {
	plugin.ConvMapData
	// contains filtered or unexported fields
}

func NewDataContext

func NewDataContext(m plugin.ConvMapData) DataContext

Passed-in map must not be modified afterwards.

func (*DataContext) Delete

func (dc *DataContext) Delete(key string)

func (*DataContext) Set

func (dc *DataContext) Set(key string, val plugin.ConvertableData)

func (*DataContext) Share

func (dc *DataContext) Share() DataContext

type Invocation

type Invocation interface {
	GetBody() *hclsyntax.Body
	SetBody(body *hclsyntax.Body)
	ParseInvocation(spec hcldec.Spec) (cty.Value, diagnostics.Diag)
	Range() hcl.Range
	DefRange() hcl.Range
	MissingItemRange() hcl.Range
}

To act as a plugin invocation (body of the plugin call block) struct must implement this interface.

type PluginCaller

type PluginCaller interface {
	DataCaller
	ContentCaller
}

type Result

type Result = plugin.ContentSection

Jump to

Keyboard shortcuts

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