Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OnlyExcept ¶
OnlyExcept is a struct that is meant to be embedded that contains the logic required for "only" and "except" meta-parameters.
func (*OnlyExcept) Skip ¶
func (o *OnlyExcept) Skip(n string) bool
Skip says whether or not to skip the build with the given name.
func (*OnlyExcept) Validate ¶
func (o *OnlyExcept) Validate(t *Template) error
Validate validates that the OnlyExcept settings are correct for a thing.
type PostProcessor ¶
type PostProcessor struct {
OnlyExcept `mapstructure:",squash"`
Type string
KeepInputArtifact bool `mapstructure:"keep_input_artifact"`
Config map[string]interface{}
}
PostProcessor represents a post-processor within the template.
func (*PostProcessor) GoString ¶
func (p *PostProcessor) GoString() string
type Provisioner ¶
type Provisioner struct {
OnlyExcept `mapstructure:",squash"`
Type string
Config map[string]interface{}
Override map[string]interface{}
PauseBefore time.Duration `mapstructure:"pause_before"`
}
Provisioner represents a provisioner within the template.
func (*Provisioner) GoString ¶
func (p *Provisioner) GoString() string
type Push ¶
type Push struct {
Name string
Address string
BaseDir string `mapstructure:"base_dir"`
Include []string
Exclude []string
Token string
VCS bool
}
Push represents the configuration for pushing the template to Atlas.
type Template ¶
type Template struct {
// Path is the path to the template. This will be blank if Parse is
// used, but will be automatically populated by ParseFile.
Path string
Description string
MinVersion string
Variables map[string]*Variable
Builders map[string]*Builder
Provisioners []*Provisioner
PostProcessors [][]*PostProcessor
Push Push
// RawContents is just the raw data for this template
RawContents []byte
}
Template represents the parsed template that is used to configure Packer builds.
func ParseFile ¶
ParseFile is the same as Parse but is a helper to automatically open a file for parsing.
func (*Template) Validate ¶
Validate does some basic validation of the template on top of the validation that occurs while parsing. If possible, we try to defer validation to here. The validation errors that occur during parsing are the minimal necessary to make sure parsing builds a reasonable Template structure.