github.phpd.cn/hashicorp/packer@v1.3.2/builder/oneandone/artifact.go (about)

     1  package oneandone
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  type Artifact struct {
     8  	snapshotId   string
     9  	snapshotName string
    10  }
    11  
    12  func (*Artifact) BuilderId() string {
    13  	return BuilderId
    14  }
    15  
    16  func (a *Artifact) Files() []string {
    17  	return []string{}
    18  }
    19  
    20  func (*Artifact) Id() string {
    21  	return "Null"
    22  }
    23  
    24  func (a *Artifact) String() string {
    25  	if a.snapshotId == "" {
    26  		return "No image has been created."
    27  	}
    28  	return fmt.Sprintf("A snapshot was created: '%v', '%v'", a.snapshotId, a.snapshotName)
    29  }
    30  
    31  func (a *Artifact) State(name string) interface{} {
    32  	return nil
    33  }
    34  
    35  func (a *Artifact) Destroy() error {
    36  	return nil
    37  }