parser

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 26 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Functions

func Functions(baseDir string) map[string]function.Function

Functions returns the set of functions that should be used to when evaluating expressions in the receiving scope.

Types

type Metrics

type Metrics struct {
	Timings struct {
		DiskIODuration time.Duration
		ParseDuration  time.Duration
	}
	Counts struct {
		Blocks  int
		Modules int
		Files   int
	}
}

type ModuleDefinition

type ModuleDefinition struct {
	Name       string
	Path       string
	Definition *terraform.Block
	Parser     Parser
}

type Option

type Option func(p *parser)

func OptionStopOnHCLError

func OptionStopOnHCLError(stop bool) Option

func OptionWithDebugWriter

func OptionWithDebugWriter(w io.Writer) Option

func OptionWithTFVarsPaths

func OptionWithTFVarsPaths(paths []string) Option

func OptionWithWorkspaceName

func OptionWithWorkspaceName(workspaceName string) Option

type Parser

type Parser interface {
	ParseFile(path string) error
	ParseDirectory(path string) error
	EvaluateAll() (terraform.Modules, cty.Value, error)
	Metrics() Metrics
	NewModuleParser(modulePath string, moduleName string, moduleBlock *terraform.Block) Parser
}

func New

func New(options ...Option) Parser

New creates a new Parser

Directories

Path Synopsis
Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/marks Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs
Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/marks Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs

Jump to

Keyboard shortcuts

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