github.com/mmcquillan/packer@v1.1.1-0.20171009221028-c85cf0483a5d/builder/vmware/iso/artifact.go (about)

     1  package iso
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  // Artifact is the result of running the VMware builder, namely a set
     8  // of files associated with the resulting machine.
     9  type Artifact struct {
    10  	builderId string
    11  	id        string
    12  	dir       OutputDir
    13  	f         []string
    14  }
    15  
    16  func (a *Artifact) BuilderId() string {
    17  	return a.builderId
    18  }
    19  
    20  func (a *Artifact) Files() []string {
    21  	return a.f
    22  }
    23  
    24  func (a *Artifact) Id() string {
    25  	return a.id
    26  }
    27  
    28  func (a *Artifact) String() string {
    29  	return fmt.Sprintf("VM files in directory: %s", a.dir)
    30  }
    31  
    32  func (a *Artifact) State(name string) interface{} {
    33  	return nil
    34  }
    35  
    36  func (a *Artifact) Destroy() error {
    37  	return a.dir.RemoveAll()
    38  }