39 lines
649 B
Go
39 lines
649 B
Go
package iso
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// Artifact is the result of running the VMware builder, namely a set
|
|
// of files associated with the resulting machine.
|
|
type Artifact struct {
|
|
builderId string
|
|
id string
|
|
dir OutputDir
|
|
f []string
|
|
}
|
|
|
|
func (a *Artifact) BuilderId() string {
|
|
return a.builderId
|
|
}
|
|
|
|
func (a *Artifact) Files() []string {
|
|
return a.f
|
|
}
|
|
|
|
func (a *Artifact) Id() string {
|
|
return a.id
|
|
}
|
|
|
|
func (a *Artifact) String() string {
|
|
return fmt.Sprintf("VM files in directory: %s", a.dir)
|
|
}
|
|
|
|
func (a *Artifact) State(name string) interface{} {
|
|
return nil
|
|
}
|
|
|
|
func (a *Artifact) Destroy() error {
|
|
return a.dir.RemoveAll()
|
|
}
|