{"modulePath":"github.com/stackpointcloud/packer","version":"v0.10.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package vagrant\n\nvagrant implements the packer.PostProcessor interface and adds a post-processor that turns artifacts of known builders into Vagrant boxes.\n\n## Constants\n\n```go\nconst BuilderId = \"mitchellh.post-processor.vagrant\"\n```\n\n## Variables\n\n```go\nvar (\n\t// ErrInvalidCompressionLevel is returned when the compression level passed\n\t// to gzip is not in the expected range. See compress/flate for details.\n\tErrInvalidCompressionLevel = fmt.Errorf(\n\t\t\"Invalid compression level. Expected an integer from -1 to 9.\")\n)\n```\n\n```go\nvar UnnecessaryFilesPatterns = []string{\"\\\\.log$\", \"\\\\.backup$\", \"\\\\.Backup$\", \"\\\\.app/\", \"/Windows Disks/\"}\n```\nThese are the extensions of files and directories that are unnecessary for the function of a Parallels virtual machine.\n\n## Functions\n\n```go\nfunc CopyContents(dst, src string) error\n```\nCopies a file by copying the contents of the file to another place.\n\n```go\nfunc DecompressOva(dir, src string) error\n```\nDecompressOva takes an ova file and decompresses it into the target directory.\n\n```go\nfunc DirToBox(dst, dir string, ui packer.Ui, level int) error\n```\nDirToBox takes the directory and compresses it into a Vagrant-compatible box. This function does not perform checks to verify that dir is actually a proper box. This is an expected precondition.\n\n```go\nfunc WriteMetadata(dir string, contents interface{}) error\n```\nWriteMetadata writes the \"metadata.json\" file for a Vagrant box.\n\n## Types\n\n```go\ntype AWSProvider struct{}\n```\n\n```go\nfunc (p *AWSProvider) KeepInputArtifact() bool\n```\n\n```go\nfunc (p *AWSProvider) Process(ui packer.Ui, artifact packer.Artifact, dir string) (vagrantfile string, metadata map[string]interface{}, err error)\n```\n\n```go\ntype Artifact struct {\n\tPath     string\n\tProvider string\n}\n```\n\n```go\nfunc NewArtifact(provider, path string) *Artifact\n```\n\n```go\nfunc (*Artifact) BuilderId() string\n```\n\n```go\nfunc (a *Artifact) Destroy() error\n```\n\n```go\nfunc (a *Artifact) Files() []string\n```\n\n```go\nfunc (a *Artifact) Id() string\n```\n\n```go\nfunc (a *Artifact) State(name string) interface{}\n```\n\n```go\nfunc (a *Artifact) String() string\n```\n\n```go\ntype Config struct {\n\tcommon.PackerConfig `mapstructure:\",squash\"`\n\n\tCompressionLevel    int      `mapstructure:\"compression_level\"`\n\tInclude             []string `mapstructure:\"include\"`\n\tOutputPath          string   `mapstructure:\"output\"`\n\tOverride            map[string]interface{}\n\tVagrantfileTemplate string `mapstructure:\"vagrantfile_template\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DigitalOceanProvider struct{}\n```\n\n```go\nfunc (p *DigitalOceanProvider) KeepInputArtifact() bool\n```\n\n```go\nfunc (p *DigitalOceanProvider) Process(ui packer.Ui, artifact packer.Artifact, dir string) (vagrantfile string, metadata map[string]interface{}, err error)\n```\n\n```go\ntype HypervProvider struct{}\n```\n\n```go\nfunc (p *HypervProvider) KeepInputArtifact() bool\n```\n\n```go\nfunc (p *HypervProvider) Process(ui packer.Ui, artifact packer.Artifact, dir string) (vagrantfile string, metadata map[string]interface{}, err error)\n```\n\n```go\ntype LibVirtProvider struct{}\n```\n\n```go\nfunc (p *LibVirtProvider) KeepInputArtifact() bool\n```\n\n```go\nfunc (p *LibVirtProvider) Process(ui packer.Ui, artifact packer.Artifact, dir string) (vagrantfile string, metadata map[string]interface{}, err error)\n```\n\n```go\ntype ParallelsProvider struct{}\n```\n\n```go\nfunc (p *ParallelsProvider) KeepInputArtifact() bool\n```\n\n```go\nfunc (p *ParallelsProvider) Process(ui packer.Ui, artifact packer.Artifact, dir string) (vagrantfile string, metadata map[string]interface{}, err error)\n```\n\n```go\ntype PostProcessor struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (p *PostProcessor) Configure(raws ...interface{}) error\n```\n\n```go\nfunc (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error)\n```\n\n```go\nfunc (p *PostProcessor) PostProcessProvider(name string, provider Provider, ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error)\n```\n\n```go\ntype Provider interface {\n\t// KeepInputArtifact should return true/false whether this provider\n\t// requires the input artifact to be kept by default.\n\tKeepInputArtifact() bool\n\n\t// Process is called to process an artifact into a Vagrant box. The\n\t// artifact is given as well as the temporary directory path to\n\t// put things.\n\t//\n\t// The Provider should return the contents for the Vagrantfile,\n\t// any metadata (including the provider type in that), and an error\n\t// if any.\n\tProcess(packer.Ui, packer.Artifact, string) (vagrantfile string, metadata map[string]interface{}, err error)\n}\n```\nProvider is the interface that each provider must implement in order to package the artifacts into a Vagrant-compatible box.\n\n```go\ntype VBoxProvider struct{}\n```\n\n```go\nfunc (p *VBoxProvider) KeepInputArtifact() bool\n```\n\n```go\nfunc (p *VBoxProvider) Process(ui packer.Ui, artifact packer.Artifact, dir string) (vagrantfile string, metadata map[string]interface{}, err error)\n```\n\n```go\ntype VMwareProvider struct{}\n```\n\n```go\nfunc (p *VMwareProvider) KeepInputArtifact() bool\n```\n\n```go\nfunc (p *VMwareProvider) Process(ui packer.Ui, artifact packer.Artifact, dir string) (vagrantfile string, metadata map[string]interface{}, err error)\n```\n\n","path":"github.com/stackpointcloud/packer/post-processor/vagrant","name":"vagrant","synopsis":"vagrant implements the packer.PostProcessor interface and adds a post-processor that turns artifacts of known builders into Vagrant boxes.","isRedistributable":true}
