cmd

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Data

func Data(ctx context.Context, blocks *parser.DefinedBlocks, caller *parser.Caller, target string) (result plugin.Data, diags diagnostics.Diag)

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Render

func Render(ctx context.Context, blocks *parser.DefinedBlocks, pluginCaller *parser.Caller, docName string) (results []string, diags diagnostics.Diag)

func UsageTemplate

func UsageTemplate(argsDesc ...[2]string) string

Default usage template with added section for Args description

Types

type Evaluator

type Evaluator struct {
	PluginsDir string
	Blocks     *parser.DefinedBlocks
	Runner     *runner.Runner
	FileMap    map[string]*hcl.File
}

func NewEvaluator

func NewEvaluator(pluginsDir string) *Evaluator

func (*Evaluator) Cleanup

func (e *Evaluator) Cleanup(diags diagnostics.Diag) error

func (*Evaluator) LoadRunner

func (e *Evaluator) LoadRunner() diagnostics.Diag

func (*Evaluator) ParseFabricFiles

func (e *Evaluator) ParseFabricFiles(sourceDir fs.FS) (diags diagnostics.Diag)

func (*Evaluator) PluginCaller

func (e *Evaluator) PluginCaller() *parser.Caller

Jump to

Keyboard shortcuts

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