Documentation ¶
Index ¶
- Constants
- Variables
- func GetStdoutAndErrFromTestMeta(t *testing.T, m Meta) (string, string)
- func TrackBundledPlugin(pluginName string)
- type AmazonAmiDatasourceParser
- type AmazonSecretsDatasourceParser
- type BlockParser
- type BuildArgs
- type BuildCommand
- func (*BuildCommand) AutocompleteArgs() complete.Predictor
- func (*BuildCommand) AutocompleteFlags() complete.Flags
- func (*BuildCommand) Help() string
- func (c *BuildCommand) ParseArgs(args []string) (*BuildArgs, int)
- func (c *BuildCommand) Run(args []string) int
- func (c *BuildCommand) RunContext(buildCtx context.Context, cla *BuildArgs) int
- func (*BuildCommand) Synopsis() string
- type BuildParser
- type ConsoleArgs
- type ConsoleCommand
- func (*ConsoleCommand) AutocompleteArgs() complete.Predictor
- func (*ConsoleCommand) AutocompleteFlags() complete.Flags
- func (*ConsoleCommand) Help() string
- func (c *ConsoleCommand) ParseArgs(args []string) (*ConsoleArgs, int)
- func (c *ConsoleCommand) Run(args []string) int
- func (c *ConsoleCommand) RunContext(ctx context.Context, cla *ConsoleArgs) int
- func (*ConsoleCommand) Synopsis() string
- type FixArgs
- type FixCommand
- func (c *FixCommand) AutocompleteArgs() complete.Predictor
- func (c *FixCommand) AutocompleteFlags() complete.Flags
- func (*FixCommand) Help() string
- func (c *FixCommand) ParseArgs(args []string) (*FixArgs, int)
- func (c *FixCommand) Run(args []string) int
- func (c *FixCommand) RunContext(ctx context.Context, cla *FixArgs) int
- func (c *FixCommand) Synopsis() string
- type FlagSetFlags
- type FormatArgs
- type FormatCommand
- func (*FormatCommand) AutocompleteArgs() complete.Predictor
- func (*FormatCommand) AutocompleteFlags() complete.Flags
- func (*FormatCommand) Help() string
- func (c *FormatCommand) ParseArgs(args []string) (*FormatArgs, int)
- func (c *FormatCommand) Run(args []string) int
- func (c *FormatCommand) RunContext(ctx context.Context, cla *FormatArgs) int
- func (*FormatCommand) Synopsis() string
- type HCL2UpgradeArgs
- type HCL2UpgradeCommand
- func (*HCL2UpgradeCommand) AutocompleteArgs() complete.Predictor
- func (*HCL2UpgradeCommand) AutocompleteFlags() complete.Flags
- func (*HCL2UpgradeCommand) Help() string
- func (c *HCL2UpgradeCommand) ParseArgs(args []string) (*HCL2UpgradeArgs, int)
- func (c *HCL2UpgradeCommand) Run(args []string) int
- func (c *HCL2UpgradeCommand) RunContext(_ context.Context, cla *HCL2UpgradeArgs) int
- func (*HCL2UpgradeCommand) Synopsis() string
- type InitArgs
- type InitCommand
- func (*InitCommand) AutocompleteArgs() complete.Predictor
- func (*InitCommand) AutocompleteFlags() complete.Flags
- func (*InitCommand) Help() string
- func (c *InitCommand) ParseArgs(args []string) (*InitArgs, int)
- func (c *InitCommand) Run(args []string) int
- func (c *InitCommand) RunContext(buildCtx context.Context, cla *InitArgs) int
- func (*InitCommand) Synopsis() string
- type InspectArgs
- type InspectCommand
- func (c *InspectCommand) AutocompleteArgs() complete.Predictor
- func (c *InspectCommand) AutocompleteFlags() complete.Flags
- func (*InspectCommand) Help() string
- func (c *InspectCommand) ParseArgs(args []string) (*InspectArgs, int)
- func (c *InspectCommand) Run(args []string) int
- func (c *InspectCommand) RunContext(ctx context.Context, cla *InspectArgs) int
- func (c *InspectCommand) Synopsis() string
- type LocalsParser
- type Meta
- func (m *Meta) Core(tpl *template.Template, cla *MetaArgs) (*packer.Core, error)
- func (m *Meta) DetectBundledPlugins(handler packer.Handler) hcl.Diagnostics
- func (m *Meta) FlagSet(n string, _ FlagSetFlags) *flag.FlagSet
- func (m *Meta) GetConfig(cla *MetaArgs) (packer.Handler, int)
- func (m *Meta) GetConfigFromHCL(cla *MetaArgs) (*hcl2template.PackerConfig, int)
- func (m *Meta) GetConfigFromJSON(cla *MetaArgs) (packer.Handler, int)
- func (m *Meta) StdinPiped() bool
- func (m *Meta) ValidateFlags() error
- type MetaArgs
- type PackerParser
- type PluginCommand
- type PluginsCommand
- type PluginsInstallCommand
- type PluginsInstalledCommand
- type PluginsRemoveCommand
- type PluginsRequiredArgs
- type PluginsRequiredCommand
- func (c *PluginsRequiredCommand) Help() string
- func (c *PluginsRequiredCommand) ParseArgs(args []string) (*PluginsRequiredArgs, int)
- func (c *PluginsRequiredCommand) Run(args []string) int
- func (c *PluginsRequiredCommand) RunContext(buildCtx context.Context, cla *PluginsRequiredArgs) int
- func (c *PluginsRequiredCommand) Synopsis() string
- type PostProcessorParser
- type ProvisionerParser
- type SourceParser
- type UnhandleableArgumentError
- type ValidateArgs
- type ValidateCommand
- func (*ValidateCommand) AutocompleteArgs() complete.Predictor
- func (*ValidateCommand) AutocompleteFlags() complete.Flags
- func (*ValidateCommand) Help() string
- func (c *ValidateCommand) ParseArgs(args []string) (*ValidateArgs, int)
- func (c *ValidateCommand) Run(args []string) int
- func (c *ValidateCommand) RunContext(ctx context.Context, cla *ValidateArgs) int
- func (*ValidateCommand) Synopsis() string
- type VariableParser
- type VersionCheckFunc
- type VersionCheckInfo
- type VersionCommand
Constants ¶
const ( ConfigTypeJSON configType = iota // default config type ConfigTypeHCL2 )
Variables ¶
var Builders = map[string]packersdk.Builder{ "file": new(filebuilder.Builder), "null": new(nullbuilder.Builder), }
var Datasources = map[string]packersdk.Datasource{ "hcp-packer-image": new(hcppackerimagedatasource.Datasource), "hcp-packer-iteration": new(hcppackeriterationdatasource.Datasource), "http": new(httpdatasource.Datasource), "null": new(nulldatasource.Datasource), }
var PostProcessors = map[string]packersdk.PostProcessor{ "artifice": new(artificepostprocessor.PostProcessor), "checksum": new(checksumpostprocessor.PostProcessor), "compress": new(compresspostprocessor.PostProcessor), "manifest": new(manifestpostprocessor.PostProcessor), "shell-local": new(shelllocalpostprocessor.PostProcessor), }
var Provisioners = map[string]packersdk.Provisioner{ "breakpoint": new(breakpointprovisioner.Provisioner), "file": new(fileprovisioner.Provisioner), "powershell": new(powershellprovisioner.Provisioner), "shell": new(shellprovisioner.Provisioner), "shell-local": new(shelllocalprovisioner.Provisioner), "sleep": new(sleepprovisioner.Provisioner), "windows-restart": new(windowsrestartprovisioner.Provisioner), "windows-shell": new(windowsshellprovisioner.Provisioner), }
var TiniestBuilder = strings.NewReader(`{
"builders": [
{
"type":"null",
"communicator": "none"
}
]
}`)
var VendoredBuilders = map[string]packersdk.Builder{ "amazon-ebs": new(amazonebsbuilder.Builder), "amazon-chroot": new(amazonchrootbuilder.Builder), "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), "amazon-ebsvolume": new(amazonebsvolumebuilder.Builder), "amazon-instance": new(amazoninstancebuilder.Builder), "azure-arm": new(azurearmbuilder.Builder), "azure-chroot": new(azurechrootbuilder.Builder), "azure-dtl": new(azuredtlbuilder.Builder), "docker": new(dockerbuilder.Builder), "googlecompute": new(googlecomputebuilder.Builder), "qemu": new(qemubuilder.Builder), "vagrant": new(vagrantbuilder.Builder), "vsphere-clone": new(vsphereclonebuilder.Builder), "vsphere-iso": new(vsphereisobuilder.Builder), "virtualbox-iso": new(virtualboxisobuilder.Builder), "virtualbox-ovf": new(virtualboxovfbuilder.Builder), "virtualbox-vm": new(virtualboxvmbuilder.Builder), "vmware-iso": new(vmwareisobuilder.Builder), "vmware-vmx": new(vmwarevmxbuilder.Builder), }
VendoredBuilders are builder components that were once bundled with the Packer core, but are now being imported from their counterpart plugin repos
var VendoredDatasources = map[string]packersdk.Datasource{ "amazon-ami": new(amazonamidatasource.Datasource), "amazon-secretsmanager": new(amazonsecretsmanagerdatasource.Datasource), }
VendoredDatasources are datasource components that were once bundled with the Packer core, but are now being imported from their counterpart plugin repos
var VendoredPostProcessors = map[string]packersdk.PostProcessor{ "amazon-import": new(anazibimportpostprocessor.PostProcessor), "docker-import": new(dockerimportpostprocessor.PostProcessor), "docker-push": new(dockerpushpostprocessor.PostProcessor), "docker-save": new(dockersavepostprocessor.PostProcessor), "docker-tag": new(dockertagpostprocessor.PostProcessor), "googlecompute-export": new(googlecomputeexportpostprocessor.PostProcessor), "googlecompute-import": new(googlecomputeimportpostprocessor.PostProcessor), "vagrant": new(vagrantpostprocessor.PostProcessor), "vagrant-cloud": new(vagrantcloudpostprocessor.PostProcessor), "vsphere-template": new(vspheretemplatepostprocessor.PostProcessor), "vsphere": new(vspherepostprocessor.PostProcessor), }
VendoredPostProcessors are post-processor components that were once bundled with the Packer core, but are now being imported from their counterpart plugin repos
var VendoredProvisioners = map[string]packersdk.Provisioner{ "azure-dtlartifact": new(azuredtlartifactprovisioner.Provisioner), "ansible": new(ansibleprovisioner.Provisioner), "ansible-local": new(ansiblelocalprovisioner.Provisioner), }
VendoredProvisioners are provisioner components that were once bundled with the Packer core, but are now being imported from their counterpart plugin repos
Functions ¶
func GetStdoutAndErrFromTestMeta ¶ added in v1.8.4
GetStdoutAndErrFromTestMeta extracts stdout/stderr from a Meta created by TestMetaFile
func TrackBundledPlugin ¶ added in v1.9.2
func TrackBundledPlugin(pluginName string)
TrackBundledPlugin marks a component as loaded from Packer's bundled plugins instead of from an externally loaded plugin.
NOTE: `pluginName' must be in the format `packer-<type>-<component_name>'
Types ¶
type AmazonAmiDatasourceParser ¶ added in v1.7.0
type AmazonAmiDatasourceParser struct { Builders []*template.Builder WithAnnotations bool // contains filtered or unexported fields }
func (*AmazonAmiDatasourceParser) Parse ¶ added in v1.7.0
func (p *AmazonAmiDatasourceParser) Parse(_ *template.Template) error
func (*AmazonAmiDatasourceParser) Write ¶ added in v1.7.0
func (p *AmazonAmiDatasourceParser) Write(out *bytes.Buffer)
type AmazonSecretsDatasourceParser ¶ added in v1.7.0
type AmazonSecretsDatasourceParser struct { WithAnnotations bool // contains filtered or unexported fields }
func (*AmazonSecretsDatasourceParser) Parse ¶ added in v1.7.0
func (p *AmazonSecretsDatasourceParser) Parse(_ *template.Template) error
func (*AmazonSecretsDatasourceParser) Write ¶ added in v1.7.0
func (p *AmazonSecretsDatasourceParser) Write(out *bytes.Buffer)
type BlockParser ¶ added in v1.7.0
type BuildArgs ¶ added in v1.6.0
type BuildArgs struct { MetaArgs Debug, Force bool Color, TimestampUi, MachineReadable bool ParallelBuilds int64 OnError string }
BuildArgs represents a parsed cli line for a `packer build`
func (*BuildArgs) AddFlagSets ¶ added in v1.6.0
type BuildCommand ¶
type BuildCommand struct {
Meta
}
func (*BuildCommand) AutocompleteArgs ¶ added in v1.2.4
func (*BuildCommand) AutocompleteArgs() complete.Predictor
func (*BuildCommand) AutocompleteFlags ¶ added in v1.2.4
func (*BuildCommand) AutocompleteFlags() complete.Flags
func (*BuildCommand) Help ¶
func (*BuildCommand) Help() string
func (*BuildCommand) ParseArgs ¶ added in v1.4.1
func (c *BuildCommand) ParseArgs(args []string) (*BuildArgs, int)
func (*BuildCommand) Run ¶
func (c *BuildCommand) Run(args []string) int
func (*BuildCommand) RunContext ¶ added in v1.4.1
func (c *BuildCommand) RunContext(buildCtx context.Context, cla *BuildArgs) int
func (*BuildCommand) Synopsis ¶
func (*BuildCommand) Synopsis() string
type BuildParser ¶ added in v1.7.0
type BuildParser struct { Builders []*template.Builder WithAnnotations bool // contains filtered or unexported fields }
func (*BuildParser) Parse ¶ added in v1.7.0
func (p *BuildParser) Parse(tpl *template.Template) error
func (*BuildParser) Write ¶ added in v1.7.0
func (p *BuildParser) Write(out *bytes.Buffer)
type ConsoleArgs ¶ added in v1.6.0
type ConsoleArgs struct {
MetaArgs
}
ConsoleArgs represents a parsed cli line for a `packer console`
type ConsoleCommand ¶ added in v1.4.2
type ConsoleCommand struct {
Meta
}
func (*ConsoleCommand) AutocompleteArgs ¶ added in v1.4.2
func (*ConsoleCommand) AutocompleteArgs() complete.Predictor
func (*ConsoleCommand) AutocompleteFlags ¶ added in v1.4.2
func (*ConsoleCommand) AutocompleteFlags() complete.Flags
func (*ConsoleCommand) Help ¶ added in v1.4.2
func (*ConsoleCommand) Help() string
func (*ConsoleCommand) ParseArgs ¶ added in v1.6.0
func (c *ConsoleCommand) ParseArgs(args []string) (*ConsoleArgs, int)
func (*ConsoleCommand) Run ¶ added in v1.4.2
func (c *ConsoleCommand) Run(args []string) int
func (*ConsoleCommand) RunContext ¶ added in v1.6.0
func (c *ConsoleCommand) RunContext(ctx context.Context, cla *ConsoleArgs) int
func (*ConsoleCommand) Synopsis ¶ added in v1.4.2
func (*ConsoleCommand) Synopsis() string
type FixArgs ¶ added in v1.6.0
FixArgs represents a parsed cli line for a `packer fix`
func (*FixArgs) AddFlagSets ¶ added in v1.6.0
type FixCommand ¶
type FixCommand struct {
Meta
}
func (*FixCommand) AutocompleteArgs ¶ added in v1.2.4
func (c *FixCommand) AutocompleteArgs() complete.Predictor
func (*FixCommand) AutocompleteFlags ¶ added in v1.2.4
func (c *FixCommand) AutocompleteFlags() complete.Flags
func (*FixCommand) Help ¶
func (*FixCommand) Help() string
func (*FixCommand) ParseArgs ¶ added in v1.6.0
func (c *FixCommand) ParseArgs(args []string) (*FixArgs, int)
func (*FixCommand) Run ¶
func (c *FixCommand) Run(args []string) int
func (*FixCommand) RunContext ¶ added in v1.6.0
func (c *FixCommand) RunContext(ctx context.Context, cla *FixArgs) int
func (*FixCommand) Synopsis ¶
func (c *FixCommand) Synopsis() string
type FlagSetFlags ¶ added in v0.8.0
type FlagSetFlags uint
FlagSetFlags is an enum to define what flags are present in the default FlagSet returned by Meta.FlagSet
const ( FlagSetNone FlagSetFlags = 0 FlagSetBuildFilter FlagSetFlags = 1 << iota FlagSetVars )
type FormatArgs ¶ added in v1.6.6
FormatArgs represents a parsed cli line for `packer fmt`
func (*FormatArgs) AddFlagSets ¶ added in v1.6.6
func (va *FormatArgs) AddFlagSets(flags *flag.FlagSet)
type FormatCommand ¶ added in v1.6.6
type FormatCommand struct {
Meta
}
func (*FormatCommand) AutocompleteArgs ¶ added in v1.6.6
func (*FormatCommand) AutocompleteArgs() complete.Predictor
func (*FormatCommand) AutocompleteFlags ¶ added in v1.6.6
func (*FormatCommand) AutocompleteFlags() complete.Flags
func (*FormatCommand) Help ¶ added in v1.6.6
func (*FormatCommand) Help() string
func (*FormatCommand) ParseArgs ¶ added in v1.6.6
func (c *FormatCommand) ParseArgs(args []string) (*FormatArgs, int)
func (*FormatCommand) Run ¶ added in v1.6.6
func (c *FormatCommand) Run(args []string) int
func (*FormatCommand) RunContext ¶ added in v1.6.6
func (c *FormatCommand) RunContext(ctx context.Context, cla *FormatArgs) int
func (*FormatCommand) Synopsis ¶ added in v1.6.6
func (*FormatCommand) Synopsis() string
type HCL2UpgradeArgs ¶ added in v1.6.2
HCL2UpgradeArgs represents a parsed cli line for a `packer hcl2_upgrade`
func (*HCL2UpgradeArgs) AddFlagSets ¶ added in v1.6.2
func (va *HCL2UpgradeArgs) AddFlagSets(flags *flag.FlagSet)
type HCL2UpgradeCommand ¶ added in v1.6.2
type HCL2UpgradeCommand struct {
Meta
}
func (*HCL2UpgradeCommand) AutocompleteArgs ¶ added in v1.6.2
func (*HCL2UpgradeCommand) AutocompleteArgs() complete.Predictor
func (*HCL2UpgradeCommand) AutocompleteFlags ¶ added in v1.6.2
func (*HCL2UpgradeCommand) AutocompleteFlags() complete.Flags
func (*HCL2UpgradeCommand) Help ¶ added in v1.6.2
func (*HCL2UpgradeCommand) Help() string
func (*HCL2UpgradeCommand) ParseArgs ¶ added in v1.6.2
func (c *HCL2UpgradeCommand) ParseArgs(args []string) (*HCL2UpgradeArgs, int)
func (*HCL2UpgradeCommand) Run ¶ added in v1.6.2
func (c *HCL2UpgradeCommand) Run(args []string) int
func (*HCL2UpgradeCommand) RunContext ¶ added in v1.6.2
func (c *HCL2UpgradeCommand) RunContext(_ context.Context, cla *HCL2UpgradeArgs) int
func (*HCL2UpgradeCommand) Synopsis ¶ added in v1.6.2
func (*HCL2UpgradeCommand) Synopsis() string
type InitArgs ¶ added in v1.7.0
InitArgs represents a parsed cli line for a `packer init <path>`
func (*InitArgs) AddFlagSets ¶ added in v1.7.0
type InitCommand ¶ added in v1.7.0
type InitCommand struct {
Meta
}
func (*InitCommand) AutocompleteArgs ¶ added in v1.7.0
func (*InitCommand) AutocompleteArgs() complete.Predictor
func (*InitCommand) AutocompleteFlags ¶ added in v1.7.0
func (*InitCommand) AutocompleteFlags() complete.Flags
func (*InitCommand) Help ¶ added in v1.7.0
func (*InitCommand) Help() string
func (*InitCommand) ParseArgs ¶ added in v1.7.0
func (c *InitCommand) ParseArgs(args []string) (*InitArgs, int)
func (*InitCommand) Run ¶ added in v1.7.0
func (c *InitCommand) Run(args []string) int
func (*InitCommand) RunContext ¶ added in v1.7.0
func (c *InitCommand) RunContext(buildCtx context.Context, cla *InitArgs) int
func (*InitCommand) Synopsis ¶ added in v1.7.0
func (*InitCommand) Synopsis() string
type InspectArgs ¶ added in v1.6.1
type InspectArgs struct {
MetaArgs
}
InspectArgs represents a parsed cli line for a `packer inspect`
func (*InspectArgs) AddFlagSets ¶ added in v1.6.1
func (va *InspectArgs) AddFlagSets(flags *flag.FlagSet)
type InspectCommand ¶
type InspectCommand struct {
Meta
}
func (*InspectCommand) AutocompleteArgs ¶ added in v1.2.4
func (c *InspectCommand) AutocompleteArgs() complete.Predictor
func (*InspectCommand) AutocompleteFlags ¶ added in v1.2.4
func (c *InspectCommand) AutocompleteFlags() complete.Flags
func (*InspectCommand) Help ¶
func (*InspectCommand) Help() string
func (*InspectCommand) ParseArgs ¶ added in v1.6.1
func (c *InspectCommand) ParseArgs(args []string) (*InspectArgs, int)
func (*InspectCommand) Run ¶
func (c *InspectCommand) Run(args []string) int
func (*InspectCommand) RunContext ¶ added in v1.6.1
func (c *InspectCommand) RunContext(ctx context.Context, cla *InspectArgs) int
func (*InspectCommand) Synopsis ¶
func (c *InspectCommand) Synopsis() string
type LocalsParser ¶ added in v1.7.0
func (*LocalsParser) Parse ¶ added in v1.7.0
func (p *LocalsParser) Parse(tpl *template.Template) error
func (*LocalsParser) Write ¶ added in v1.7.0
func (p *LocalsParser) Write(out *bytes.Buffer)
type Meta ¶
type Meta struct { CoreConfig *packer.CoreConfig Ui packersdk.Ui Version string }
Meta contains the meta-options and functionality that nearly every Packer command inherits.
func TestMetaFile ¶ added in v1.7.9
TestMetaFile creates a Meta object that includes a file builder
func (*Meta) Core ¶ added in v0.8.0
Core returns the core for the given template given the configured CoreConfig and user variables on this Meta.
func (*Meta) DetectBundledPlugins ¶ added in v1.9.2
func (*Meta) FlagSet ¶ added in v0.8.0
func (m *Meta) FlagSet(n string, _ FlagSetFlags) *flag.FlagSet
FlagSet returns a FlagSet with the common flags that every command implements. The exact behavior of FlagSet can be configured using the flags as the second parameter, for example to disable build settings on the commands that don't handle builds.
func (*Meta) GetConfigFromHCL ¶ added in v1.6.0
func (m *Meta) GetConfigFromHCL(cla *MetaArgs) (*hcl2template.PackerConfig, int)
func (*Meta) GetConfigFromJSON ¶ added in v1.6.0
func (*Meta) StdinPiped ¶ added in v1.4.2
StdinPiped returns true if the input is piped.
func (*Meta) ValidateFlags ¶ added in v0.8.0
ValidateFlags should be called after parsing flags to validate the given flags
type MetaArgs ¶ added in v1.6.0
type MetaArgs struct { // TODO(azr): in the future, I want to allow passing multiple path to // merge HCL confs together; but this will probably need an RFC first. Path string Only, Except []string Vars map[string]string VarFiles []string // set to "hcl2" to force hcl2 mode ConfigType configType // WarnOnUndeclared does not have a common default, as the default varies per sub-command usage. // Refer to individual command FlagSets for usage. WarnOnUndeclaredVar bool }
MetaArgs defines commonalities between all commands
func (*MetaArgs) AddFlagSets ¶ added in v1.6.0
NewMetaArgs parses cli args and put possible values
func (*MetaArgs) GetConfigType ¶ added in v1.6.0
ConfigType tells what type of config we should use, it can return values like "hcl" or "json". Make sure Args was correctly set before.
type PackerParser ¶ added in v1.7.0
type PackerParser struct { WithAnnotations bool // contains filtered or unexported fields }
func (*PackerParser) Parse ¶ added in v1.7.0
func (p *PackerParser) Parse(tpl *template.Template) error
func (*PackerParser) Write ¶ added in v1.7.0
func (p *PackerParser) Write(out *bytes.Buffer)
type PluginCommand ¶ added in v0.9.0
type PluginCommand struct {
Meta
}
func (*PluginCommand) Help ¶ added in v0.9.0
func (*PluginCommand) Help() string
func (*PluginCommand) Run ¶ added in v0.9.0
func (c *PluginCommand) Run(args []string) int
func (*PluginCommand) Synopsis ¶ added in v0.9.0
func (c *PluginCommand) Synopsis() string
type PluginsCommand ¶ added in v1.8.0
type PluginsCommand struct {
Meta
}
func (*PluginsCommand) Help ¶ added in v1.8.0
func (c *PluginsCommand) Help() string
func (*PluginsCommand) Run ¶ added in v1.8.0
func (c *PluginsCommand) Run(args []string) int
func (*PluginsCommand) Synopsis ¶ added in v1.8.0
func (c *PluginsCommand) Synopsis() string
type PluginsInstallCommand ¶ added in v1.8.0
type PluginsInstallCommand struct {
Meta
}
func (*PluginsInstallCommand) Help ¶ added in v1.8.0
func (c *PluginsInstallCommand) Help() string
func (*PluginsInstallCommand) Run ¶ added in v1.8.0
func (c *PluginsInstallCommand) Run(args []string) int
func (*PluginsInstallCommand) RunContext ¶ added in v1.8.0
func (c *PluginsInstallCommand) RunContext(buildCtx context.Context, args []string) int
func (*PluginsInstallCommand) Synopsis ¶ added in v1.8.0
func (c *PluginsInstallCommand) Synopsis() string
type PluginsInstalledCommand ¶ added in v1.8.0
type PluginsInstalledCommand struct {
Meta
}
func (*PluginsInstalledCommand) Help ¶ added in v1.8.0
func (c *PluginsInstalledCommand) Help() string
func (*PluginsInstalledCommand) Run ¶ added in v1.8.0
func (c *PluginsInstalledCommand) Run(args []string) int
func (*PluginsInstalledCommand) RunContext ¶ added in v1.8.0
func (c *PluginsInstalledCommand) RunContext(buildCtx context.Context) int
func (*PluginsInstalledCommand) Synopsis ¶ added in v1.8.0
func (c *PluginsInstalledCommand) Synopsis() string
type PluginsRemoveCommand ¶ added in v1.8.0
type PluginsRemoveCommand struct {
Meta
}
func (*PluginsRemoveCommand) Help ¶ added in v1.8.0
func (c *PluginsRemoveCommand) Help() string
func (*PluginsRemoveCommand) Run ¶ added in v1.8.0
func (c *PluginsRemoveCommand) Run(args []string) int
func (*PluginsRemoveCommand) RunContext ¶ added in v1.8.0
func (c *PluginsRemoveCommand) RunContext(buildCtx context.Context, args []string) int
func (*PluginsRemoveCommand) Synopsis ¶ added in v1.8.0
func (c *PluginsRemoveCommand) Synopsis() string
type PluginsRequiredArgs ¶ added in v1.8.0
type PluginsRequiredArgs struct {
MetaArgs
}
PluginsRequiredArgs represents a parsed cli line for a `packer plugins required <path>`
type PluginsRequiredCommand ¶ added in v1.8.0
type PluginsRequiredCommand struct {
Meta
}
func (*PluginsRequiredCommand) Help ¶ added in v1.8.0
func (c *PluginsRequiredCommand) Help() string
func (*PluginsRequiredCommand) ParseArgs ¶ added in v1.8.0
func (c *PluginsRequiredCommand) ParseArgs(args []string) (*PluginsRequiredArgs, int)
func (*PluginsRequiredCommand) Run ¶ added in v1.8.0
func (c *PluginsRequiredCommand) Run(args []string) int
func (*PluginsRequiredCommand) RunContext ¶ added in v1.8.0
func (c *PluginsRequiredCommand) RunContext(buildCtx context.Context, cla *PluginsRequiredArgs) int
func (*PluginsRequiredCommand) Synopsis ¶ added in v1.8.0
func (c *PluginsRequiredCommand) Synopsis() string
type PostProcessorParser ¶ added in v1.7.0
type PostProcessorParser struct { WithAnnotations bool // contains filtered or unexported fields }
func (*PostProcessorParser) Parse ¶ added in v1.7.0
func (p *PostProcessorParser) Parse(tpl *template.Template) error
func (*PostProcessorParser) Write ¶ added in v1.7.0
func (p *PostProcessorParser) Write(out *bytes.Buffer)
type ProvisionerParser ¶ added in v1.7.0
type ProvisionerParser struct { WithAnnotations bool // contains filtered or unexported fields }
func (*ProvisionerParser) Parse ¶ added in v1.7.0
func (p *ProvisionerParser) Parse(tpl *template.Template) error
func (*ProvisionerParser) Write ¶ added in v1.7.0
func (p *ProvisionerParser) Write(out *bytes.Buffer)
type SourceParser ¶ added in v1.7.0
type SourceParser struct { Builders []*template.Builder BuilderPlugins packer.BuilderSet WithAnnotations bool // contains filtered or unexported fields }
func (*SourceParser) Parse ¶ added in v1.7.0
func (p *SourceParser) Parse(tpl *template.Template) error
func (*SourceParser) Write ¶ added in v1.7.0
func (p *SourceParser) Write(out *bytes.Buffer)
type UnhandleableArgumentError ¶ added in v1.6.6
func (UnhandleableArgumentError) Error ¶ added in v1.6.6
func (uc UnhandleableArgumentError) Error() string
type ValidateArgs ¶ added in v1.6.0
ValidateArgs represents a parsed cli line for a `packer validate`
func (*ValidateArgs) AddFlagSets ¶ added in v1.6.0
func (va *ValidateArgs) AddFlagSets(flags *flag.FlagSet)
type ValidateCommand ¶
type ValidateCommand struct {
Meta
}
func (*ValidateCommand) AutocompleteArgs ¶ added in v1.2.4
func (*ValidateCommand) AutocompleteArgs() complete.Predictor
func (*ValidateCommand) AutocompleteFlags ¶ added in v1.2.4
func (*ValidateCommand) AutocompleteFlags() complete.Flags
func (*ValidateCommand) Help ¶
func (*ValidateCommand) Help() string
func (*ValidateCommand) ParseArgs ¶ added in v1.6.0
func (c *ValidateCommand) ParseArgs(args []string) (*ValidateArgs, int)
func (*ValidateCommand) Run ¶
func (c *ValidateCommand) Run(args []string) int
func (*ValidateCommand) RunContext ¶ added in v1.6.0
func (c *ValidateCommand) RunContext(ctx context.Context, cla *ValidateArgs) int
func (*ValidateCommand) Synopsis ¶
func (*ValidateCommand) Synopsis() string
type VariableParser ¶ added in v1.7.0
type VariableParser struct { WithAnnotations bool // contains filtered or unexported fields }
func (*VariableParser) Parse ¶ added in v1.7.0
func (p *VariableParser) Parse(tpl *template.Template) error
func (*VariableParser) Write ¶ added in v1.7.0
func (p *VariableParser) Write(out *bytes.Buffer)
type VersionCheckFunc ¶
type VersionCheckFunc func() (VersionCheckInfo, error)
VersionCheckFunc is the callback called by the Version command to check if there is a new version of Packer.
type VersionCheckInfo ¶
VersionCheckInfo is the return value for the VersionCheckFunc callback and tells the Version command information about the latest version of Packer.
type VersionCommand ¶
type VersionCommand struct { Meta CheckFunc VersionCheckFunc }
VersionCommand is a Command implementation prints the version.
func (*VersionCommand) Help ¶
func (c *VersionCommand) Help() string
func (*VersionCommand) Run ¶
func (c *VersionCommand) Run(args []string) int
func (*VersionCommand) Synopsis ¶
func (c *VersionCommand) Synopsis() string