packer-cn/post-processor/yandex-export/artifact.go

39 lines
611 B
Go
Raw Normal View History

2020-04-26 19:20:30 -04:00
package yandexexport
import (
"fmt"
)
const BuilderId = "packer.post-processor.yandex-export"
type Artifact struct {
paths []string
urls []string
2020-04-26 19:20:30 -04:00
}
func (*Artifact) BuilderId() string {
return BuilderId
}
func (a *Artifact) Id() string {
return a.urls[0]
2020-04-26 19:20:30 -04:00
}
func (a *Artifact) Files() []string {
pathsCopy := make([]string, len(a.paths))
copy(pathsCopy, a.paths)
return pathsCopy
}
func (a *Artifact) String() string {
return fmt.Sprintf("Exported artifacts in: %s", a.paths)
}
func (*Artifact) State(name string) interface{} {
return nil
}
func (a *Artifact) Destroy() error {
return nil
}