github.com/tonnydourado/packer@v0.6.1-0.20140701134019-5d0cd9676a37/post-processor/vagrant/provider.go (about)

     1  package vagrant
     2  
     3  import (
     4  	"github.com/mitchellh/packer/packer"
     5  )
     6  
     7  // Provider is the interface that each provider must implement in order
     8  // to package the artifacts into a Vagrant-compatible box.
     9  type Provider interface {
    10  	// KeepInputArtifact should return true/false whether this provider
    11  	// requires the input artifact to be kept by default.
    12  	KeepInputArtifact() bool
    13  
    14  	// Process is called to process an artifact into a Vagrant box. The
    15  	// artifact is given as well as the temporary directory path to
    16  	// put things.
    17  	//
    18  	// The Provider should return the contents for the Vagrantfile,
    19  	// any metadata (including the provider type in that), and an error
    20  	// if any.
    21  	Process(packer.Ui, packer.Artifact, string) (vagrantfile string, metadata map[string]interface{}, err error)
    22  }