Documentation ¶
Index ¶
- type Config
- type PackManager
- func (pm *PackManager) Metadata() *pack.Metadata
- func (pm *PackManager) PackName() string
- func (pm *PackManager) ProcessOutputTemplate() (string, error)
- func (pm *PackManager) ProcessTemplates(renderAux bool, format bool, ignoreMissingVars bool) (*renderer.Rendered, []*errors.WrappedUIContext)
- func (pm *PackManager) ProcessVariableFiles() (*parser.ParsedVariables, []*errors.WrappedUIContext)
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.