Versions in this module Expand all Collapse all v1 v1.3.2 Oct 29, 2018 Changes in this version + const BuildNameConfigKey + const BuilderTypeConfigKey + const CSIDL_APPDATA — windows/amd64 + const CmdDisconnect + const DebugConfigKey + const ForceConfigKey + const HookProvision + const OnErrorConfigKey + const TelemetryPanicVersion + const TelemetryVersion + const TemplatePathKey + const UiColorBlue + const UiColorCyan + const UiColorGreen + const UiColorMagenta + const UiColorRed + const UiColorYellow + const UserVariablesConfigKey + var LogSecretFilter secretFilter + func ConfigDir() (string, error) + func ConfigFile() (string, error) + func ConfigTmpDir() (string, error) + type Artifact interface + BuilderId func() string + Destroy func() error + Files func() []string + Id func() string + State func(name string) interface{} + String func() string + type BasicProgressBar struct + func (bpb *BasicProgressBar) Add(current int64) + func (bpb *BasicProgressBar) NewProxyReadCloser(r io.ReadCloser) io.ReadCloser + func (bpb *BasicProgressBar) NewProxyReader(r io.Reader) io.Reader + func (bpb *BasicProgressBar) Start(total int64) + type BasicUi struct + ErrorWriter io.Writer + Reader io.Reader + Writer io.Writer + func (bu *BasicUi) ProgressBar() ProgressBar + func (rw *BasicUi) Ask(query string) (string, error) + func (rw *BasicUi) Error(message string) + func (rw *BasicUi) Machine(t string, args ...string) + func (rw *BasicUi) Message(message string) + func (rw *BasicUi) Say(message string) + type Build interface + Cancel func() + Name func() string + Prepare func() ([]string, error) + Run func(Ui, Cache) ([]Artifact, error) + SetDebug func(bool) + SetForce func(bool) + SetOnError func(string) + type Builder interface + Cancel func() + Prepare func(...interface{}) ([]string, error) + Run func(ui Ui, hook Hook, cache Cache) (Artifact, error) + type BuilderFunc func(name string) (Builder, error) + type Cache interface + Lock func(string) string + RLock func(string) (string, bool) + RUnlock func(string) + Unlock func(string) + type CheckpointTelemetry struct + var CheckpointReporter *CheckpointTelemetry + func NewCheckpointReporter(disableSignature bool) *CheckpointTelemetry + func (c *CheckpointTelemetry) AddSpan(name, pluginType string, options interface{}) *TelemetrySpan + func (c *CheckpointTelemetry) Finalize(command string, errCode int, err error) error + func (c *CheckpointTelemetry) ReportPanic(m string) error + type ColoredUi struct + Color UiColor + ErrorColor UiColor + Ui Ui + func (u *ColoredUi) Ask(query string) (string, error) + func (u *ColoredUi) Error(message string) + func (u *ColoredUi) Machine(t string, args ...string) + func (u *ColoredUi) Message(message string) + func (u *ColoredUi) ProgressBar() ProgressBar + func (u *ColoredUi) Say(message string) + type Communicator interface + Download func(string, io.Writer) error + DownloadDir func(src string, dst string, exclude []string) error + Start func(*RemoteCmd) error + Upload func(string, io.Reader, *os.FileInfo) error + UploadDir func(dst string, src string, exclude []string) error + type ComponentFinder struct + Builder BuilderFunc + Hook HookFunc + PostProcessor PostProcessorFunc + Provisioner ProvisionerFunc + type Core struct + Template *template.Template + func NewCore(c *CoreConfig) (*Core, error) + func TestCore(t *testing.T, c *CoreConfig) *Core + func (c *Core) Build(n string) (Build, error) + func (c *Core) BuildNames() []string + func (c *Core) Context() *interpolate.Context + type CoreConfig struct + Components ComponentFinder + SensitiveVariables []string + Template *template.Template + Variables map[string]string + Version string + func TestCoreConfig(t *testing.T) *CoreConfig + type DebuggedProvisioner struct + Provisioner Provisioner + func (p *DebuggedProvisioner) Cancel() + func (p *DebuggedProvisioner) Prepare(raws ...interface{}) error + func (p *DebuggedProvisioner) Provision(ui Ui, comm Communicator) error + type DispatchHook struct + Mapping map[string][]Hook + func (h *DispatchHook) Cancel() + func (h *DispatchHook) Run(name string, ui Ui, comm Communicator, data interface{}) error + type FileCache struct + CacheDir string + func (f *FileCache) Lock(key string) string + func (f *FileCache) RLock(key string) (string, bool) + func (f *FileCache) RUnlock(key string) + func (f *FileCache) Unlock(key string) + type Hook interface + Cancel func() + Run func(string, Ui, Communicator, interface{}) error + type HookFunc func(name string) (Hook, error) + type HookedProvisioner struct + Config interface{} + Provisioner Provisioner + TypeName string + type MachineReadableUi struct + Writer io.Writer + func (u *MachineReadableUi) Ask(query string) (string, error) + func (u *MachineReadableUi) Error(message string) + func (u *MachineReadableUi) Machine(category string, args ...string) + func (u *MachineReadableUi) Message(message string) + func (u *MachineReadableUi) ProgressBar() ProgressBar + func (u *MachineReadableUi) Say(message string) + type MockArtifact struct + BuilderIdValue string + DestroyCalled bool + FilesValue []string + IdValue string + StateValues map[string]interface{} + StringValue string + func (a *MockArtifact) BuilderId() string + func (a *MockArtifact) Destroy() error + func (a *MockArtifact) Files() []string + func (a *MockArtifact) Id() string + func (a *MockArtifact) State(name string) interface{} + func (a *MockArtifact) String() string + type MockBuilder struct + ArtifactId string + CancelCalled bool + PrepareCalled bool + PrepareConfig []interface{} + PrepareWarnings []string + RunCache Cache + RunCalled bool + RunErrResult bool + RunHook Hook + RunNilResult bool + RunUi Ui + func TestBuilder(t *testing.T, c *CoreConfig, n string) *MockBuilder + func (tb *MockBuilder) Cancel() + func (tb *MockBuilder) Prepare(config ...interface{}) ([]string, error) + func (tb *MockBuilder) Run(ui Ui, h Hook, c Cache) (Artifact, error) + type MockCommunicator struct + DownloadCalled bool + DownloadData string + DownloadDirDst string + DownloadDirExclude []string + DownloadDirSrc string + DownloadPath string + StartCalled bool + StartCmd *RemoteCmd + StartExitStatus int + StartStderr string + StartStdin string + StartStdout string + UploadCalled bool + UploadData string + UploadDirDst string + UploadDirExclude []string + UploadDirSrc string + UploadPath string + func (c *MockCommunicator) Download(path string, w io.Writer) error + func (c *MockCommunicator) DownloadDir(src string, dst string, excl []string) error + func (c *MockCommunicator) Start(rc *RemoteCmd) error + func (c *MockCommunicator) Upload(path string, r io.Reader, fi *os.FileInfo) error + func (c *MockCommunicator) UploadDir(dst string, src string, excl []string) error + type MockHook struct + CancelCalled bool + RunCalled bool + RunComm Communicator + RunData interface{} + RunFunc func() error + RunName string + RunUi Ui + func (t *MockHook) Cancel() + func (t *MockHook) Run(name string, ui Ui, comm Communicator, data interface{}) error + type MockPostProcessor struct + ArtifactId string + ConfigureCalled bool + ConfigureConfigs []interface{} + ConfigureError error + Error error + Keep bool + PostProcessArtifact Artifact + PostProcessCalled bool + PostProcessUi Ui + func TestPostProcessor(t *testing.T, c *CoreConfig, n string) *MockPostProcessor + func (t *MockPostProcessor) Configure(configs ...interface{}) error + func (t *MockPostProcessor) PostProcess(ui Ui, a Artifact) (Artifact, bool, error) + type MockProvisioner struct + CancelCalled bool + PrepCalled bool + PrepConfigs []interface{} + ProvCalled bool + ProvCommunicator Communicator + ProvFunc func() error + ProvUi Ui + func TestProvisioner(t *testing.T, c *CoreConfig, n string) *MockProvisioner + func (t *MockProvisioner) Cancel() + func (t *MockProvisioner) Prepare(configs ...interface{}) error + func (t *MockProvisioner) Provision(ui Ui, comm Communicator) error + type MultiError struct + Errors []error + func MultiErrorAppend(err error, errs ...error) *MultiError + func (e *MultiError) Error() string + type NoopProgressBar struct + func (npb *NoopProgressBar) Add(int64) + func (npb *NoopProgressBar) Finish() + func (npb *NoopProgressBar) NewProxyReadCloser(r io.ReadCloser) io.ReadCloser + func (npb *NoopProgressBar) NewProxyReader(r io.Reader) io.Reader + func (npb *NoopProgressBar) Start(int64) + type NoopUi struct + func (*NoopUi) Ask(string) (string, error) + func (*NoopUi) Error(string) + func (*NoopUi) Machine(string, ...string) + func (*NoopUi) Message(string) + func (*NoopUi) ProgressBar() ProgressBar + func (*NoopUi) Say(string) + type PackerReport struct + Command string + Error string + ExitCode int + Spans []*TelemetrySpan + type PausedProvisioner struct + PauseBefore time.Duration + Provisioner Provisioner + func (p *PausedProvisioner) Cancel() + func (p *PausedProvisioner) Prepare(raws ...interface{}) error + func (p *PausedProvisioner) Provision(ui Ui, comm Communicator) error + type PostProcessor interface + Configure func(...interface{}) error + PostProcess func(Ui, Artifact) (a Artifact, keep bool, err error) + type PostProcessorFunc func(name string) (PostProcessor, error) + type ProgressBar interface + Add func(current int64) + Finish func() + NewProxyReader func(r io.Reader) (proxy io.Reader) + Start func(total int64) + type ProvisionHook struct + Provisioners []*HookedProvisioner + func (h *ProvisionHook) Cancel() + func (h *ProvisionHook) Run(name string, ui Ui, comm Communicator, data interface{}) error + type Provisioner interface + Cancel func() + Prepare func(...interface{}) error + Provision func(Ui, Communicator) error + type ProvisionerFunc func(name string) (Provisioner, error) + type ProxyReader struct + func (r *ProxyReader) Close() (err error) + func (r *ProxyReader) Read(p []byte) (n int, err error) + type RemoteCmd struct + Command string + ExitStatus int + Exited bool + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + func (r *RemoteCmd) SetExited(status int) + func (r *RemoteCmd) StartWithUi(c Communicator, ui Ui) error + func (r *RemoteCmd) Wait() + type StackableProgressBar struct + Bar BasicProgressBar + ConfigProgressbarFN func(*pb.ProgressBar) + func (spb *StackableProgressBar) Add(total int64) + func (spb *StackableProgressBar) Finish() + func (spb *StackableProgressBar) NewProxyReader(r io.Reader) io.Reader + func (spb *StackableProgressBar) Start(total int64) + type TargetedUI struct + Target string + Ui Ui + func (u *TargetedUI) Ask(query string) (string, error) + func (u *TargetedUI) Error(message string) + func (u *TargetedUI) Machine(t string, args ...string) + func (u *TargetedUI) Message(message string) + func (u *TargetedUI) ProgressBar() ProgressBar + func (u *TargetedUI) Say(message string) + type TelemetrySpan struct + EndTime time.Time + Error string + Name string + Options []string + StartTime time.Time + Type string + func (s *TelemetrySpan) End(err error) + type TimestampedUi struct + Ui Ui + func (u *TimestampedUi) Ask(query string) (string, error) + func (u *TimestampedUi) Error(message string) + func (u *TimestampedUi) Machine(message string, args ...string) + func (u *TimestampedUi) Message(message string) + func (u *TimestampedUi) ProgressBar() ProgressBar + func (u *TimestampedUi) Say(message string) + type Ui interface + Ask func(string) (string, error) + Error func(string) + Machine func(string, ...string) + Message func(string) + ProgressBar func() ProgressBar + Say func(string) + func TestUi(t *testing.T) Ui + type UiColor uint