Documentation ¶
Index ¶
- Constants
- Variables
- type ArchiveOptions
- type BuildOptions
- type BuildProvider
- type BundleAction
- type BundleActionOptions
- type BundlePullOptions
- type BundleResolver
- type CopyOpts
- type CredentialDeleteOptions
- type CredentialEditOptions
- type CredentialOptions
- type CredentialShowOptions
- type DeleteOptions
- type DisplayInstallation
- type DisplayInstallations
- type DisplayOutput
- type DisplayOutputs
- type ExplainOpts
- type InspectableBundle
- type InstallOptions
- type InstallationAction
- type InvokeOptions
- type LintOptions
- type ListOptions
- type LogsShowOptions
- type Mixins
- type OutputListOptions
- type OutputShowOptions
- type ParameterDeleteOptions
- type ParameterEditOptions
- type ParameterOptions
- type ParameterShowOptions
- type Porter
- func (p *Porter) Archive(opts ArchiveOptions) error
- func (p *Porter) Build(opts BuildOptions) error
- func (p *Porter) BuildActionArgs(action BundleAction) (cnabprovider.ActionArguments, error)
- func (p *Porter) CopyBundle(c *CopyOpts) error
- func (p *Porter) CopyTemplate(getTemplate func() ([]byte, error), dest string) error
- func (p *Porter) Create() error
- func (p *Porter) CreateMixinFeedTemplate() error
- func (p *Porter) DeleteCredential(opts CredentialDeleteOptions) error
- func (p *Porter) DeleteInstallation(opts DeleteOptions) error
- func (p *Porter) DeleteParameter(opts ParameterDeleteOptions) error
- func (p *Porter) EditCredential(opts CredentialEditOptions) error
- func (p *Porter) EditParameter(opts ParameterEditOptions) error
- func (p *Porter) ExecuteAction(action BundleAction) error
- func (p *Porter) Explain(o ExplainOpts) error
- func (p *Porter) GenerateCredentials(opts CredentialOptions) error
- func (p *Porter) GenerateMixinFeed(opts feed.GenerateOptions) error
- func (p *Porter) GenerateParameters(opts ParameterOptions) error
- func (p *Porter) GetInstallation(opts ShowOptions) (DisplayInstallation, error)
- func (p *Porter) GetInstallationLogs(opts *LogsShowOptions) (string, bool, error)
- func (p *Porter) GetManifestSchema() (jsonSchema, error)
- func (p *Porter) GetPlugin(name string) (*plugins.Metadata, error)
- func (p *Porter) GetReplacementSchema() (jsonSchema, error)
- func (p *Porter) Inspect(o ExplainOpts) error
- func (p *Porter) InstallBundle(opts InstallOptions) error
- func (p *Porter) InstallMixin(opts mixin.InstallOptions) error
- func (p *Porter) InstallPlugin(opts plugins.InstallOptions) error
- func (p *Porter) InvokeBundle(opts InvokeOptions) error
- func (p *Porter) IsBundleUpToDate(opts bundleFileOptions) (bool, error)
- func (p *Porter) Lint(opts LintOptions) (linter.Results, error)
- func (p *Porter) ListBundleOutputs(opts *OutputListOptions) (DisplayOutputs, error)
- func (p *Porter) ListCredentials(opts ListOptions) error
- func (p *Porter) ListInstallations() (DisplayInstallations, error)
- func (p *Porter) ListMixins() ([]mixin.Metadata, error)
- func (p *Porter) ListParameters(opts ListOptions) error
- func (p *Porter) ListPlugins() ([]plugins.Metadata, error)
- func (p *Porter) LoadManifest() error
- func (p *Porter) LoadManifestFrom(file string) error
- func (p *Porter) MigrateStorage() error
- func (p *Porter) PrintBundleOutputs(opts OutputListOptions) error
- func (p *Porter) PrintDebugInfo(ctx *context.Context, opts VersionOpts, metadata pkgmgmt.Metadata) error
- func (p *Porter) PrintInstallations(opts ListOptions) error
- func (p *Porter) PrintLintResults(opts LintOptions) error
- func (p *Porter) PrintManifestSchema() error
- func (p *Porter) PrintMixins(opts PrintMixinsOptions) error
- func (p *Porter) PrintPackages(opts SearchOptions, list pkgmgmt.PackageList) error
- func (p *Porter) PrintPlugins(opts PrintPluginsOptions) error
- func (p *Porter) PrintVersion(opts VersionOpts) error
- func (p *Porter) Publish(opts PublishOptions) error
- func (p *Porter) PullBundle(opts BundlePullOptions) (cache.CachedBundle, error)
- func (p *Porter) ReadBundleOutput(outputName, installation string) (string, error)
- func (p *Porter) Run(opts RunOptions) error
- func (p *Porter) RunInternalPlugins(args []string)
- func (p *Porter) SearchPackages(opts SearchOptions) error
- func (p *Porter) ShowBundleOutput(opts *OutputShowOptions) error
- func (p *Porter) ShowCredential(opts CredentialShowOptions) error
- func (p *Porter) ShowInstallation(opts ShowOptions) error
- func (p *Porter) ShowInstallationLogs(opts *LogsShowOptions) error
- func (p *Porter) ShowParameter(opts ParameterShowOptions) error
- func (p *Porter) ShowPlugin(opts ShowPluginOptions) error
- func (p *Porter) UninstallBundle(opts UninstallOptions) error
- func (p *Porter) UninstallMixin(opts pkgmgmt.UninstallOptions) error
- func (p *Porter) UninstallPlugin(opts pkgmgmt.UninstallOptions) error
- func (p *Porter) UpgradeBundle(opts UpgradeOptions) error
- type PrintMixinsOptions
- type PrintPluginsOptions
- type PrintableAction
- type PrintableBundle
- type PrintableCredential
- type PrintableDependency
- type PrintableImage
- type PrintableInvocationImage
- type PrintableOutput
- type PrintableParameter
- type PublishOptions
- type RunInternalPluginOpts
- type RunOptions
- type SearchOptions
- type ShowOptions
- type ShowPluginOptions
- type SortPrintableAction
- type SortPrintableCredential
- type SortPrintableOutput
- type SortPrintableParameter
- type SystemDebugInfo
- type SystemInfo
- type TestBuildProvider
- type TestDriver
- type TestPorter
- func (p *TestPorter) AddTestBundleDir(bundleDir string, generateUniqueName bool) string
- func (p *TestPorter) AddTestDriver(driver TestDriver) string
- func (p *TestPorter) AddTestFile(src string, dest string)
- func (p *TestPorter) CleanupIntegrationTest()
- func (p *TestPorter) CreateBundleDir() string
- func (p *TestPorter) RandomString(len int) string
- func (p *TestPorter) ReadBundle(path string) bundle.Bundle
- func (p *TestPorter) SetupIntegrationTest()
- func (p *TestPorter) T() *testing.T
- type UninstallDeleteOptions
- type UninstallOptions
- type UpgradeOptions
- type VersionOpts
Constants ¶
const ( // DockerDriver is the name of the Docker driver. DockerDriver = cnabprovider.DriverNameDocker // DebugDriver is the name of the Debug driver. DebugDriver = cnabprovider.DriverNameDebug // DefaultDriver is the name of the default driver (Docker). DefaultDriver = DockerDriver )
Variables ¶
var ( // ErrUnsafeInstallationDelete warns the user that deletion of an unsuccessfully uninstalled installation is unsafe ErrUnsafeInstallationDelete = errors.New("it is unsafe to delete an installation when the last action wasn't a successful uninstall") // ErrUnsafeInstallationDeleteRetryForce presents the ErrUnsafeInstallationDelete error and provides a retry option of --force ErrUnsafeInstallationDeleteRetryForce = fmt.Errorf("%s; if you are sure it should be deleted, retry the last command with the --force flag", ErrUnsafeInstallationDelete) )
var ( LintAllowFormats = printer.Formats{printer.FormatPlaintext, printer.FormatJson} LintDefaultFormats = printer.FormatPlaintext )
var ( ShowAllowedFormats = []printer.Format{printer.FormatTable, printer.FormatYaml, printer.FormatJson} ShowDefaultFormat = printer.FormatTable )
var ErrUnsafeInstallationDeleteRetryForceDelete = fmt.Errorf("%s; if you are sure it should be deleted, retry the last command with the --force-delete flag", ErrUnsafeInstallationDelete)
ErrUnsafeInstallationDeleteRetryForceDelete presents the ErrUnsafeInstallationDelete error and provides a retry option of --force-delete
Functions ¶
This section is empty.
Types ¶
type ArchiveOptions ¶
type ArchiveOptions struct { BundleActionOptions ArchiveFile string }
ArchiveOptions defines the valid options for performing an archive operation
func (*ArchiveOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type BuildOptions ¶
type BuildOptions struct { NoLint bool // contains filtered or unexported fields }
func (BuildOptions) Validate ¶ added in v0.31.0
func (o BuildOptions) Validate() error
type BuildProvider ¶
type BundleAction ¶ added in v0.28.0
type BundleAction interface { // GetAction returns the type of action: install, upgrade, invoke, uninstall GetAction() string // GetActionVerb returns the appropriate verb (present participle, e.g. -ing) // for the action. GetActionVerb() string GetOptions() *BundleActionOptions }
BundleAction is an interface that defines a method for supplying BundleLifecycleOptions. This is useful when implementations contain action-specific options beyond the stock BundleLifecycleOptions.
type BundleActionOptions ¶ added in v0.30.0
type BundleActionOptions struct { BundlePullOptions AllowAccessToDockerHost bool // contains filtered or unexported fields }
func (*BundleActionOptions) GetOptions ¶ added in v0.30.0
func (o *BundleActionOptions) GetOptions() *BundleActionOptions
func (*BundleActionOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type BundlePullOptions ¶
type BundleResolver ¶
type BundleResolver struct { Cache cache.BundleCache Registry cnabtooci.RegistryProvider }
func (*BundleResolver) Resolve ¶
func (r *BundleResolver) Resolve(opts BundlePullOptions) (cache.CachedBundle, error)
Resolves a bundle from the cache, or pulls it and caches it Returns the location of the bundle or an error
type CredentialDeleteOptions ¶
type CredentialDeleteOptions struct {
Name string
}
CredentialDeleteOptions represent options for Porter's credential delete command
func (*CredentialDeleteOptions) Validate ¶
func (o *CredentialDeleteOptions) Validate(args []string) error
Validate validates the args provided Porter's credential delete command
type CredentialEditOptions ¶
type CredentialEditOptions struct {
Name string
}
func (*CredentialEditOptions) Validate ¶
func (o *CredentialEditOptions) Validate(args []string) error
Validate validates the args provided to Porter's credential edit command
type CredentialOptions ¶
type CredentialOptions struct { BundleActionOptions Silent bool }
func (*CredentialOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type CredentialShowOptions ¶
type CredentialShowOptions struct { printer.PrintOptions Name string }
CredentialShowOptions represent options for Porter's credential show command
func (*CredentialShowOptions) Validate ¶
func (o *CredentialShowOptions) Validate(args []string) error
Validate validates the args provided to Porter's credential show command
type DeleteOptions ¶ added in v0.28.0
type DeleteOptions struct { Force bool // contains filtered or unexported fields }
DeleteOptions represent options for Porter's installation delete command
func (*DeleteOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type DisplayInstallation ¶ added in v0.28.0
type DisplayInstallation struct { Name string Created time.Time Modified time.Time Action string Status string Outputs DisplayOutputs History []InstallationAction }
DisplayInstallation holds a subset of pertinent values to be listed from installation data originating from its claims, results and outputs records
func NewDisplayInstallation ¶ added in v0.28.0
func NewDisplayInstallation(installation claim.Installation) (DisplayInstallation, error)
type DisplayInstallations ¶ added in v0.28.0
type DisplayInstallations []DisplayInstallation
func (DisplayInstallations) Len ¶ added in v0.28.0
func (l DisplayInstallations) Len() int
func (DisplayInstallations) Less ¶ added in v0.28.0
func (l DisplayInstallations) Less(i, j int) bool
func (DisplayInstallations) Swap ¶ added in v0.28.0
func (l DisplayInstallations) Swap(i, j int)
type DisplayOutput ¶
type DisplayOutputs ¶ added in v0.28.0
type DisplayOutputs []DisplayOutput
func NewDisplayOutputs ¶ added in v0.28.0
type ExplainOpts ¶
type ExplainOpts struct { BundleActionOptions printer.PrintOptions Action string }
func (*ExplainOpts) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type InspectableBundle ¶
type InspectableBundle struct { Name string `json:"name" yaml:"name"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Version string `json:"version" yaml:"version"` InvocationImages []PrintableInvocationImage `json:"invocationImages" yaml:"invocationImages"` Images []PrintableImage `json:"images,omitempty" yaml:"images,omitempty"` }
type InstallOptions ¶
type InstallOptions struct {
*BundleActionOptions
}
InstallOptions that may be specified when installing a bundle. Porter handles defaulting any missing values.
func NewInstallOptions ¶ added in v0.30.0
func NewInstallOptions() InstallOptions
func (InstallOptions) GetAction ¶ added in v0.30.0
func (o InstallOptions) GetAction() string
func (InstallOptions) GetActionVerb ¶ added in v0.30.0
func (o InstallOptions) GetActionVerb() string
func (InstallOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type InstallationAction ¶ added in v0.28.0
type InvokeOptions ¶
type InvokeOptions struct { // Action name to invoke Action string *BundleActionOptions }
InvokeOptions that may be specified when invoking a bundle. Porter handles defaulting any missing values.
func NewInvokeOptions ¶ added in v0.30.0
func NewInvokeOptions() InvokeOptions
func (InvokeOptions) GetAction ¶ added in v0.30.0
func (o InvokeOptions) GetAction() string
func (InvokeOptions) GetActionVerb ¶ added in v0.30.0
func (o InvokeOptions) GetActionVerb() string
func (InvokeOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type LintOptions ¶
type LintOptions struct { printer.PrintOptions // File path to the porter manifest. Defaults to the bundle in the current directory. File string // contains filtered or unexported fields }
type ListOptions ¶
type ListOptions struct {
printer.PrintOptions
}
ListOptions represent generic options for use by Porter's list commands
type LogsShowOptions ¶ added in v0.35.0
type LogsShowOptions struct { ClaimID string // contains filtered or unexported fields }
LogsShowOptions represent options for an installation logs show command
func (*LogsShowOptions) Installation ¶ added in v0.35.0
func (o *LogsShowOptions) Installation() string
Installation name passed to the command.
func (*LogsShowOptions) LoadParameters ¶ added in v0.35.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type Mixins ¶
func (Mixins) PrintMixinsTable ¶
type OutputListOptions ¶
type OutputListOptions struct { printer.PrintOptions // contains filtered or unexported fields }
OutputListOptions represent options for a bundle output list command
func (*OutputListOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type OutputShowOptions ¶
type OutputShowOptions struct { Output string // contains filtered or unexported fields }
OutputShowOptions represent options for a bundle output show command
func (*OutputShowOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type ParameterDeleteOptions ¶
type ParameterDeleteOptions struct {
Name string
}
ParameterDeleteOptions represent options for Porter's parameter delete command
func (*ParameterDeleteOptions) Validate ¶
func (o *ParameterDeleteOptions) Validate(args []string) error
Validate the args provided to the delete parameter command
type ParameterEditOptions ¶
type ParameterEditOptions struct {
Name string
}
ParameterEditOptions represent iptions for Porter's parameter edit command
func (*ParameterEditOptions) Validate ¶
func (o *ParameterEditOptions) Validate(args []string) error
Validate validates the args provided to Porter's parameter edit command
type ParameterOptions ¶
type ParameterOptions struct { BundleActionOptions Silent bool }
ParameterOptions represent generic/base options for a Porter parameters command
func (*ParameterOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type ParameterShowOptions ¶
type ParameterShowOptions struct { printer.PrintOptions Name string }
ParameterShowOptions represent options for Porter's parameter show command
func (*ParameterShowOptions) Validate ¶
func (o *ParameterShowOptions) Validate(args []string) error
Validate validates the args provided to Porter's parameter show command
type Porter ¶
type Porter struct { *config.Config Cache cache.BundleCache Credentials credentials.CredentialProvider Parameters parameters.ParameterProvider Claims claim.Provider Registry cnabtooci.RegistryProvider Templates *templates.Templates Builder BuildProvider Manifest *manifest.Manifest Mixins mixin.MixinProvider Plugins plugins.PluginProvider CNAB cnabprovider.CNABProvider Storage storage.StorageProvider }
Porter is the logic behind the porter client.
func NewWithConfig ¶
func (*Porter) Archive ¶
func (p *Porter) Archive(opts ArchiveOptions) error
Archive is a composite function that generates a CNAB thick bundle. It will pull the invocation image, and any referenced images locally (if needed), export them to individual layers, generate a bundle.json and then generate a gzipped tar archive containing the bundle.json and the images
func (*Porter) Build ¶
func (p *Porter) Build(opts BuildOptions) error
func (*Porter) BuildActionArgs ¶ added in v0.30.0
func (p *Porter) BuildActionArgs(action BundleAction) (cnabprovider.ActionArguments, error)
BuildActionArgs converts an instance of user-provided action options into prepared arguments that can be used to execute the action.
func (*Porter) CopyBundle ¶
CopyBundle copies a bundle from one repository to another
func (*Porter) CopyTemplate ¶
func (*Porter) CreateMixinFeedTemplate ¶
func (*Porter) DeleteCredential ¶
func (p *Porter) DeleteCredential(opts CredentialDeleteOptions) error
DeleteCredential deletes the credential set corresponding to the provided names.
func (*Porter) DeleteInstallation ¶ added in v0.28.0
func (p *Porter) DeleteInstallation(opts DeleteOptions) error
DeleteInstallation handles deletion of an installation
func (*Porter) DeleteParameter ¶
func (p *Porter) DeleteParameter(opts ParameterDeleteOptions) error
DeleteParameter deletes the parameter set corresponding to the provided names.
func (*Porter) EditCredential ¶
func (p *Porter) EditCredential(opts CredentialEditOptions) error
EditCredential edits the credentials of the provided name.
func (*Porter) EditParameter ¶
func (p *Porter) EditParameter(opts ParameterEditOptions) error
EditParameter edits the parameters of the provided name.
func (*Porter) ExecuteAction ¶ added in v0.30.0
func (p *Porter) ExecuteAction(action BundleAction) error
ExecuteAction runs the specified action. Supported actions are: install, upgrade, invoke. The uninstall action works in reverse so it's implemented separately.
func (*Porter) Explain ¶
func (p *Porter) Explain(o ExplainOpts) error
func (*Porter) GenerateCredentials ¶
func (p *Porter) GenerateCredentials(opts CredentialOptions) error
GenerateCredentials builds a new credential set based on the given options. This can be either a silent build, based on the opts.Silent flag, or interactive using a survey. Returns an error if unable to generate credentials
func (*Porter) GenerateMixinFeed ¶
func (p *Porter) GenerateMixinFeed(opts feed.GenerateOptions) error
func (*Porter) GenerateParameters ¶
func (p *Porter) GenerateParameters(opts ParameterOptions) error
GenerateParameters builds a new parameter set based on the given options. This can be either a silent build, based on the opts.Silent flag, or interactive using a survey. Returns an error if unable to generate parameters
func (*Porter) GetInstallation ¶ added in v0.35.0
func (p *Porter) GetInstallation(opts ShowOptions) (DisplayInstallation, error)
GetInstallation retrieves information about an installation.
func (*Porter) GetInstallationLogs ¶ added in v0.35.0
func (p *Porter) GetInstallationLogs(opts *LogsShowOptions) (string, bool, error)
GetInstallationLogs gets logs for an installation, according to the provided options
func (*Porter) GetManifestSchema ¶
func (*Porter) GetReplacementSchema ¶
func (*Porter) Inspect ¶
func (p *Porter) Inspect(o ExplainOpts) error
func (*Porter) InstallBundle ¶
func (p *Porter) InstallBundle(opts InstallOptions) error
InstallBundle accepts a set of pre-validated InstallOptions and uses them to install a bundle.
func (*Porter) InstallMixin ¶
func (p *Porter) InstallMixin(opts mixin.InstallOptions) error
func (*Porter) InstallPlugin ¶
func (p *Porter) InstallPlugin(opts plugins.InstallOptions) error
func (*Porter) InvokeBundle ¶
func (p *Porter) InvokeBundle(opts InvokeOptions) error
InvokeBundle accepts a set of pre-validated InvokeOptions and uses them to upgrade a bundle.
func (*Porter) IsBundleUpToDate ¶
IsBundleUpToDate checks the hash of the manifest against the hash in cnab/bundle.json.
func (*Porter) Lint ¶
func (p *Porter) Lint(opts LintOptions) (linter.Results, error)
Lint porter.yaml for any problems and report the results. This calls the mixins to analyze their sections of the manifest.
func (*Porter) ListBundleOutputs ¶
func (p *Porter) ListBundleOutputs(opts *OutputListOptions) (DisplayOutputs, error)
ListBundleOutputs lists the outputs for a given bundle according to the provided display format
func (*Porter) ListCredentials ¶
func (p *Porter) ListCredentials(opts ListOptions) error
ListCredentials lists saved credential sets.
func (*Porter) ListInstallations ¶ added in v0.28.0
func (p *Porter) ListInstallations() (DisplayInstallations, error)
ListInstallations lists installed bundles.
func (*Porter) ListParameters ¶
func (p *Porter) ListParameters(opts ListOptions) error
ListParameters lists saved parameter sets.
func (*Porter) LoadManifest ¶
func (*Porter) LoadManifestFrom ¶
func (*Porter) MigrateStorage ¶ added in v0.28.0
func (*Porter) PrintBundleOutputs ¶
func (p *Porter) PrintBundleOutputs(opts OutputListOptions) error
func (*Porter) PrintDebugInfo ¶
func (*Porter) PrintInstallations ¶ added in v0.28.0
func (p *Porter) PrintInstallations(opts ListOptions) error
PrintInstallations prints installed bundles.
func (*Porter) PrintLintResults ¶
func (p *Porter) PrintLintResults(opts LintOptions) error
PrintLintResults lints the manifest and prints the results to the attached output.
func (*Porter) PrintManifestSchema ¶
func (*Porter) PrintMixins ¶
func (p *Porter) PrintMixins(opts PrintMixinsOptions) error
func (*Porter) PrintPackages ¶
func (p *Porter) PrintPackages(opts SearchOptions, list pkgmgmt.PackageList) error
PrintPackages prints the provided package list according to the provided options
func (*Porter) PrintPlugins ¶
func (p *Porter) PrintPlugins(opts PrintPluginsOptions) error
func (*Porter) PrintVersion ¶
func (p *Porter) PrintVersion(opts VersionOpts) error
func (*Porter) Publish ¶
func (p *Porter) Publish(opts PublishOptions) error
Publish is a composite function that publishes an invocation image, rewrites the porter manifest and then regenerates the bundle.json. Finally it publishes the manifest to an OCI registry.
func (*Porter) PullBundle ¶
func (p *Porter) PullBundle(opts BundlePullOptions) (cache.CachedBundle, error)
PullBundle looks for a given bundle tag in the bundle cache. If it is not found, it is pulled and stored in the cache. The path to the cached bundle is returned.
func (*Porter) ReadBundleOutput ¶
ReadBundleOutput reads a bundle output from an installation
func (*Porter) Run ¶
func (p *Porter) Run(opts RunOptions) error
func (*Porter) RunInternalPlugins ¶
func (*Porter) SearchPackages ¶
func (p *Porter) SearchPackages(opts SearchOptions) error
SearchPackages searches the provided package list according to the provided options
func (*Porter) ShowBundleOutput ¶
func (p *Porter) ShowBundleOutput(opts *OutputShowOptions) error
ShowBundleOutput shows a bundle output value, according to the provided options
func (*Porter) ShowCredential ¶
func (p *Porter) ShowCredential(opts CredentialShowOptions) error
ShowCredential shows the credential set corresponding to the provided name, using the provided printer.PrintOptions for display.
func (*Porter) ShowInstallation ¶ added in v0.28.0
func (p *Porter) ShowInstallation(opts ShowOptions) error
ShowInstallation shows a bundle installation, along with any associated outputs
func (*Porter) ShowInstallationLogs ¶ added in v0.35.0
func (p *Porter) ShowInstallationLogs(opts *LogsShowOptions) error
ShowInstallationLogs shows logs for an installation, according to the provided options.
func (*Porter) ShowParameter ¶
func (p *Porter) ShowParameter(opts ParameterShowOptions) error
ShowParameter shows the parameter set corresponding to the provided name, using the provided printer.PrintOptions for display.
func (*Porter) ShowPlugin ¶
func (p *Porter) ShowPlugin(opts ShowPluginOptions) error
func (*Porter) UninstallBundle ¶
func (p *Porter) UninstallBundle(opts UninstallOptions) error
UninstallBundle accepts a set of pre-validated UninstallOptions and uses them to uninstall a bundle.
func (*Porter) UninstallMixin ¶
func (p *Porter) UninstallMixin(opts pkgmgmt.UninstallOptions) error
func (*Porter) UninstallPlugin ¶
func (p *Porter) UninstallPlugin(opts pkgmgmt.UninstallOptions) error
func (*Porter) UpgradeBundle ¶
func (p *Porter) UpgradeBundle(opts UpgradeOptions) error
UpgradeBundle accepts a set of pre-validated UpgradeOptions and uses them to upgrade a bundle.
type PrintMixinsOptions ¶
type PrintMixinsOptions struct {
printer.PrintOptions
}
PrintMixinsOptions represent options for the PrintMixins function
type PrintPluginsOptions ¶
type PrintPluginsOptions struct {
printer.PrintOptions
}
PrintPluginsOptions represent options for the PrintPlugins function
type PrintableAction ¶
type PrintableAction struct { Name string `json:"name" yaml:"name"` Modifies bool `json:"modifies" yaml:"modifies"` // Stateless indicates that the action is purely informational, that credentials are not required, and that the runtime should not keep track of its invocation Stateless bool `json:"stateless" yaml:"stateless"` // Description describes the action as a user-readable string Description string `json:"description" yaml:"description"` }
type PrintableBundle ¶
type PrintableBundle struct { Name string `json:"name" yaml:"name"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Version string `json:"version" yaml:"version"` Parameters []PrintableParameter `json:"parameters,omitempty" yaml:"parameters,omitempty"` Credentials []PrintableCredential `json:"credentials,omitempty" yaml:"credentials,omitempty"` Outputs []PrintableOutput `json:"outputs,omitempty" yaml:"outputs,omitempty"` Actions []PrintableAction `json:"customActions,omitempty" yaml:"customActions,omitempty"` Dependencies []PrintableDependency `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` }
PrintableBundle holds a subset of pertinent values to be explained from a bundle.Bundle
type PrintableCredential ¶
type PrintableDependency ¶ added in v0.29.0
type PrintableImage ¶
type PrintableInvocationImage ¶
type PrintableInvocationImage struct { bundle.InvocationImage Original string `json:"originalImage" yaml:"originalImage"` }
type PrintableOutput ¶
type PrintableParameter ¶
type PrintableParameter struct { Name string `json:"name" yaml:"name"` Type interface{} `json:"type" yaml:"type"` Default interface{} `json:"default" yaml:"default"` ApplyTo string `json:"applyTo" yaml:"applyTo"` Description string `json:"description" yaml:"description"` Required bool `json:"required" yaml:"required"` }
type PublishOptions ¶
type PublishOptions struct { BundlePullOptions Tag string Registry string ArchiveFile string // contains filtered or unexported fields }
PublishOptions are options that may be specified when publishing a bundle. Porter handles defaulting any missing values.
func (*PublishOptions) Validate ¶
func (o *PublishOptions) Validate(cxt *portercontext.Context) error
Validate performs validation on the publish options
type RunInternalPluginOpts ¶
type RunInternalPluginOpts struct { Key string // contains filtered or unexported fields }
type RunOptions ¶
func NewRunOptions ¶
func NewRunOptions(c *config.Config) RunOptions
func (*RunOptions) Validate ¶
func (o *RunOptions) Validate() error
type SearchOptions ¶
type SearchOptions struct { Name string Type string printer.PrintOptions }
SearchOptions are options for searching packages
func (*SearchOptions) Validate ¶
func (o *SearchOptions) Validate(args []string) error
Validate validates the arguments provided to a search command
type ShowOptions ¶
type ShowOptions struct { printer.PrintOptions // contains filtered or unexported fields }
ShowOptions represent options for showing a particular installation
func (*ShowOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type ShowPluginOptions ¶
type ShowPluginOptions struct { printer.PrintOptions Name string }
ShowPluginOptions represent options for showing a particular plugin.
func (*ShowPluginOptions) Validate ¶
func (o *ShowPluginOptions) Validate(args []string) error
type SortPrintableAction ¶
type SortPrintableAction []PrintableAction
func (SortPrintableAction) Len ¶
func (s SortPrintableAction) Len() int
func (SortPrintableAction) Less ¶
func (s SortPrintableAction) Less(i, j int) bool
func (SortPrintableAction) Swap ¶
func (s SortPrintableAction) Swap(i, j int)
type SortPrintableCredential ¶
type SortPrintableCredential []PrintableCredential
func (SortPrintableCredential) Len ¶
func (s SortPrintableCredential) Len() int
func (SortPrintableCredential) Less ¶
func (s SortPrintableCredential) Less(i, j int) bool
func (SortPrintableCredential) Swap ¶
func (s SortPrintableCredential) Swap(i, j int)
type SortPrintableOutput ¶
type SortPrintableOutput []PrintableOutput
func (SortPrintableOutput) Len ¶
func (s SortPrintableOutput) Len() int
func (SortPrintableOutput) Less ¶
func (s SortPrintableOutput) Less(i, j int) bool
func (SortPrintableOutput) Swap ¶
func (s SortPrintableOutput) Swap(i, j int)
type SortPrintableParameter ¶
type SortPrintableParameter []PrintableParameter
func (SortPrintableParameter) Len ¶
func (s SortPrintableParameter) Len() int
func (SortPrintableParameter) Less ¶
func (s SortPrintableParameter) Less(i, j int) bool
func (SortPrintableParameter) Swap ¶
func (s SortPrintableParameter) Swap(i, j int)
type SystemDebugInfo ¶
type SystemDebugInfo struct { Version pkgmgmt.PackageMetadata `json:"version"` SysInfo SystemInfo `json:"system"` Mixins Mixins `json:"mixins"` }
type SystemInfo ¶
type TestBuildProvider ¶
type TestBuildProvider struct { }
func NewTestBuildProvider ¶
func NewTestBuildProvider() *TestBuildProvider
func (*TestBuildProvider) BuildInvocationImage ¶
func (t *TestBuildProvider) BuildInvocationImage(manifest *manifest.Manifest) error
func (*TestBuildProvider) TagInvocationImage ¶ added in v0.31.0
func (t *TestBuildProvider) TagInvocationImage(origTag, newTag string) error
type TestDriver ¶ added in v0.28.0
type TestPorter ¶
type TestPorter struct { *Porter TestConfig *config.TestConfig TestClaims claims.TestClaimProvider TestCredentials *credentials.TestCredentialProvider TestParameters *parameters.TestParameterProvider TestCache *cache.TestCache TestRegistry *cnabtooci.TestRegistry // original directory where the test was being executed TestDir string // directory where the integration test is being executed BundleDir string }
func NewTestPorter ¶
func NewTestPorter(t *testing.T) *TestPorter
NewTestPorter initializes a porter test client, with the output buffered, and an in-memory file system.
func (*TestPorter) AddTestBundleDir ¶ added in v0.31.0
func (p *TestPorter) AddTestBundleDir(bundleDir string, generateUniqueName bool) string
AddTestBundleDir into the test bundle directory and give it a unique name to avoid collisions with other tests running in parallel.
func (*TestPorter) AddTestDriver ¶ added in v0.28.0
func (p *TestPorter) AddTestDriver(driver TestDriver) string
func (*TestPorter) AddTestFile ¶ added in v0.28.0
func (p *TestPorter) AddTestFile(src string, dest string)
func (*TestPorter) CleanupIntegrationTest ¶
func (p *TestPorter) CleanupIntegrationTest()
func (*TestPorter) CreateBundleDir ¶
func (p *TestPorter) CreateBundleDir() string
func (*TestPorter) RandomString ¶ added in v0.31.0
func (p *TestPorter) RandomString(len int) string
func (*TestPorter) ReadBundle ¶ added in v0.28.0
func (p *TestPorter) ReadBundle(path string) bundle.Bundle
func (*TestPorter) SetupIntegrationTest ¶
func (p *TestPorter) SetupIntegrationTest()
func (*TestPorter) T ¶
func (p *TestPorter) T() *testing.T
type UninstallDeleteOptions ¶ added in v0.28.0
UninstallDeleteOptions supply options for deletion on uninstall
type UninstallOptions ¶
type UninstallOptions struct { *BundleActionOptions UninstallDeleteOptions }
UninstallOptions that may be specified when uninstalling a bundle. Porter handles defaulting any missing values.
func NewUninstallOptions ¶ added in v0.30.0
func NewUninstallOptions() UninstallOptions
func (UninstallOptions) GetAction ¶ added in v0.30.0
func (o UninstallOptions) GetAction() string
func (UninstallOptions) GetActionVerb ¶ added in v0.30.0
func (o UninstallOptions) GetActionVerb() string
func (UninstallOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type UpgradeOptions ¶
type UpgradeOptions struct {
*BundleActionOptions
}
UpgradeOptions that may be specified when upgrading a bundle. Porter handles defaulting any missing values.
func NewUpgradeOptions ¶ added in v0.30.0
func NewUpgradeOptions() UpgradeOptions
func (UpgradeOptions) GetAction ¶ added in v0.30.0
func (o UpgradeOptions) GetAction() string
func (UpgradeOptions) GetActionVerb ¶ added in v0.30.0
func (o UpgradeOptions) GetActionVerb() string
func (UpgradeOptions) LoadParameters ¶ added in v0.30.0
LoadParameters validates and resolves the parameters and sets. It must be called after porter has loaded the bundle definition.
type VersionOpts ¶
Source Files ¶
- action.go
- archive.go
- build.go
- cnab.go
- contextOptions.go
- copy.go
- create.go
- credentials.go
- delete.go
- dependencies.go
- doc.go
- explain.go
- generateManifest.go
- helpers.go
- inspect.go
- install.go
- invoke.go
- lifecycle.go
- lint.go
- list.go
- logs.go
- mixins.go
- options.go
- outputs.go
- packages.go
- parameters.go
- plugins.go
- porter.go
- publish.go
- pull.go
- resolver.go
- run.go
- schema.go
- show.go
- stamp.go
- storage.go
- uninstall.go
- upgrade.go
- version.go