{"modulePath":"github.com/stackpointcloud/packer","version":"v0.10.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package template\n\n## Types\n\n```go\ntype Builder struct {\n\tName   string\n\tType   string\n\tConfig map[string]interface{}\n}\n```\nBuilder represents a builder configured in the template\n\n```go\nfunc (b *Builder) GoString() string\n```\n\n```go\ntype OnlyExcept struct {\n\tOnly   []string\n\tExcept []string\n}\n```\nOnlyExcept is a struct that is meant to be embedded that contains the logic required for \"only\" and \"except\" meta-parameters.\n\n```go\nfunc (o *OnlyExcept) Skip(n string) bool\n```\nSkip says whether or not to skip the build with the given name.\n\n```go\nfunc (o *OnlyExcept) Validate(t *Template) error\n```\nValidate validates that the OnlyExcept settings are correct for a thing.\n\n```go\ntype PostProcessor struct {\n\tOnlyExcept `mapstructure:\",squash\"`\n\n\tType              string\n\tKeepInputArtifact bool `mapstructure:\"keep_input_artifact\"`\n\tConfig            map[string]interface{}\n}\n```\nPostProcessor represents a post-processor within the template.\n\n```go\nfunc (p *PostProcessor) GoString() string\n```\n\n```go\ntype Provisioner struct {\n\tOnlyExcept `mapstructure:\",squash\"`\n\n\tType        string\n\tConfig      map[string]interface{}\n\tOverride    map[string]interface{}\n\tPauseBefore time.Duration `mapstructure:\"pause_before\"`\n}\n```\nProvisioner represents a provisioner within the template.\n\n```go\nfunc (p *Provisioner) GoString() string\n```\n\n```go\ntype Push struct {\n\tName    string\n\tAddress string\n\tBaseDir string `mapstructure:\"base_dir\"`\n\tInclude []string\n\tExclude []string\n\tToken   string\n\tVCS     bool\n}\n```\nPush represents the configuration for pushing the template to Atlas.\n\n```go\ntype Template struct {\n\t// Path is the path to the template. This will be blank if Parse is\n\t// used, but will be automatically populated by ParseFile.\n\tPath string\n\n\tDescription string\n\tMinVersion  string\n\n\tVariables      map[string]*Variable\n\tBuilders       map[string]*Builder\n\tProvisioners   []*Provisioner\n\tPostProcessors [][]*PostProcessor\n\tPush           Push\n\n\t// RawContents is just the raw data for this template\n\tRawContents []byte\n}\n```\nTemplate represents the parsed template that is used to configure Packer builds.\n\n```go\nfunc Parse(r io.Reader) (*Template, error)\n```\nParse takes the given io.Reader and parses a Template object out of it.\n\n```go\nfunc ParseFile(path string) (*Template, error)\n```\nParseFile is the same as Parse but is a helper to automatically open a file for parsing.\n\n```go\nfunc (t *Template) Validate() error\n```\nValidate 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.\n\n```go\ntype Variable struct {\n\tDefault  string\n\tRequired bool\n}\n```\nVariable represents a variable within the template\n\n```go\nfunc (v *Variable) GoString() string\n```\n\n","path":"github.com/stackpointcloud/packer/template","name":"template","synopsis":"","isRedistributable":true}
