manager

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path            string
	VariableFiles   []string
	VariableCLIArgs map[string]string
	VariableEnvVars map[string]string
	UseParserV1     bool
}

Config contains all the user specified parameters needed to correctly run the pack manager.

type PackManager

type PackManager struct {
	// contains filtered or unexported fields
}

PackManager is responsible for loading, parsing, and rendering a Pack and all dependencies.

func NewPackManager

func NewPackManager(cfg *Config, client *api.Client) *PackManager

func (*PackManager) Metadata

func (pm *PackManager) Metadata() *pack.Metadata

func (*PackManager) PackName

func (pm *PackManager) PackName() string

func (*PackManager) ProcessOutputTemplate

func (pm *PackManager) ProcessOutputTemplate() (string, error)

ProcessOutputTemplate performs the output template rendering.

func (*PackManager) ProcessTemplates

func (pm *PackManager) ProcessTemplates(renderAux bool, format bool, ignoreMissingVars bool) (*renderer.Rendered, []*errors.WrappedUIContext)

ProcessTemplates is responsible for running all backend process for the PackManager returning an error along with the ProcessedPack. This contains all the rendered templates.

TODO(jrasell) figure out whether we want an error or hcl.Diagnostics return object. If we stick to an error, then we need to come up with a way of nicely formatting them.

func (*PackManager) ProcessVariableFiles

func (pm *PackManager) ProcessVariableFiles() (*parser.ParsedVariables, []*errors.WrappedUIContext)

ProcessVariableFiles creates the map of packs to their respective variables definition files. This is used between the variable override file generator code and the ProcessTemplates logic in this file.

Jump to

Keyboard shortcuts

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