jobs

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeVarsReferences

func DecodeVarsReferences(ctx context.Context, varStore *state.VariableStore, moduleFeature fdecoder.ModuleReader, modPath string) error

DecodeVarsReferences collects reference origins within variable files (*.tfvars) where each valid attribute (as informed by schema provided via [LoadModuleMetadata]) is considered an origin.

This is useful in hovering over those variable names, go-to-definition and go-to-references.

func ParseVariables

func ParseVariables(ctx context.Context, fs ReadOnlyFS, varStore *state.VariableStore, modPath string) error

ParseVariables parses the variables configuration, i.e. turns bytes of `*.tfvars` files into AST (*hcl.File).

func SchemaVariablesValidation

func SchemaVariablesValidation(ctx context.Context, varStore *state.VariableStore, moduleFeature fdecoder.ModuleReader, modPath string) error

SchemaVariablesValidation does schema-based validation of variable files (*.tfvars) and produces diagnostics associated with any "invalid" parts of code.

It relies on previously parsed AST (via ParseVariables) and schema, as provided via [LoadModuleMetadata]).

Types

type ReadOnlyFS

type ReadOnlyFS interface {
	fs.FS
	ReadDir(name string) ([]fs.DirEntry, error)
	ReadFile(name string) ([]byte, error)
	Stat(name string) (fs.FileInfo, error)
}

Jump to

Keyboard shortcuts

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