2016-06-10 01:26:22 -04:00
|
|
|
package manifest
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
const BuilderId = "packer.post-processor.manifest"
|
|
|
|
|
|
|
|
type Artifact struct {
|
2016-06-10 04:31:41 -04:00
|
|
|
BuildName string `json:"name"`
|
|
|
|
BuilderType string `json:"builder_type"`
|
|
|
|
BuildTime int64 `json:"build_time"`
|
|
|
|
ArtifactFiles []string `json:"files"`
|
|
|
|
ArtifactId string `json:"artifact_id"`
|
2016-06-10 01:26:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) BuilderId() string {
|
|
|
|
return BuilderId
|
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) Files() []string {
|
2016-06-10 04:31:41 -04:00
|
|
|
return a.ArtifactFiles
|
2016-06-10 01:26:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) Id() string {
|
2016-06-10 04:31:41 -04:00
|
|
|
return a.ArtifactId
|
2016-06-10 01:26:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) String() string {
|
2016-06-10 04:31:41 -04:00
|
|
|
return fmt.Sprintf("%s-%s", a.BuildName, a.ArtifactId)
|
2016-06-10 01:26:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) State(name string) interface{} {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Artifact) Destroy() error {
|
|
|
|
return nil
|
|
|
|
}
|