Documentation ¶
Index ¶
- Constants
- type ActionArguments
- type CNABProvider
- type Runtime
- func (r *Runtime) AddEnvironment(args ActionArguments) cnabaction.OperationConfigFunc
- func (r *Runtime) AddFiles(ctx context.Context, args ActionArguments) cnabaction.OperationConfigFunc
- func (r *Runtime) AddRelocation(args ActionArguments) cnabaction.OperationConfigFunc
- func (r *Runtime) ApplyConfig(ctx context.Context, args ActionArguments) cnabaction.OperationConfigs
- func (r *Runtime) CreateRun(ctx context.Context, args ActionArguments, b cnab.ExtendedBundle) (storage.Run, error)
- func (r *Runtime) Execute(ctx context.Context, args ActionArguments) error
- func (r *Runtime) LoadBundle(bundleFile string) (cnab.ExtendedBundle, error)
- func (r *Runtime) ProcessBundle(ctx context.Context, b cnab.ExtendedBundle) (cnab.ExtendedBundle, error)
- func (r *Runtime) ProcessBundleFromFile(ctx context.Context, bundleFile string) (cnab.ExtendedBundle, error)
- func (r *Runtime) ProcessRequiredExtensions(b cnab.ExtendedBundle) error
- func (r *Runtime) SaveOperationResult(ctx context.Context, opResult driver.OperationResult, ...) error
- func (r *Runtime) SaveRun(ctx context.Context, installation storage.Installation, run storage.Run, ...) error
- func (r *Runtime) SetOutput() cnabaction.OperationConfigFunc
- type TestRuntime
- func (t *TestRuntime) Close() error
- func (t *TestRuntime) Execute(ctx context.Context, args ActionArguments) error
- func (t *TestRuntime) LoadBundle(bundleFile string) (cnab.ExtendedBundle, error)
- func (t *TestRuntime) LoadTestBundle(bundleFile string) cnab.ExtendedBundle
- func (t *TestRuntime) MockGetDockerGroupId()
Constants ¶
View Source
const ( // DriverNameDocker is the name of the CNAB Docker driver. DriverNameDocker = "docker" // DriverNameDebug is the name of the CNAB debug driver. DriverNameDebug = "debug" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionArguments ¶
type ActionArguments struct { // Action to execute, e.g. install, upgrade. Action string // Name of the installation. Installation storage.Installation // BundleReference is the set of information necessary to execute a bundle. BundleReference cnab.BundleReference // Additional files to copy into the bundle // Target Path => File Contents Files map[string]string // Params is the fully resolved set of parameters. Params map[string]interface{} // Driver is the CNAB-compliant driver used to run bundle actions. Driver string // Give the bundle privileged access to the docker daemon. AllowDockerHostAccess bool // PersistLogs specifies if the invocation image output should be saved as an output. PersistLogs bool }
Shared arguments for all CNAB actions
type CNABProvider ¶
type CNABProvider interface { LoadBundle(bundleFile string) (cnab.ExtendedBundle, error) Execute(ctx context.Context, arguments ActionArguments) error }
CNABProvider is the interface Porter uses to communicate with the CNAB runtime
type Runtime ¶
type Runtime struct { *config.Config Extensions cnab.ProcessedExtensions // contains filtered or unexported fields }
func NewRuntime ¶
func (*Runtime) AddEnvironment ¶ added in v1.0.1
func (r *Runtime) AddEnvironment(args ActionArguments) cnabaction.OperationConfigFunc
func (*Runtime) AddFiles ¶
func (r *Runtime) AddFiles(ctx context.Context, args ActionArguments) cnabaction.OperationConfigFunc
func (*Runtime) AddRelocation ¶
func (r *Runtime) AddRelocation(args ActionArguments) cnabaction.OperationConfigFunc
AddRelocation operates on an ActionArguments and adds any provided relocation mapping to the operation's files.
func (*Runtime) ApplyConfig ¶
func (r *Runtime) ApplyConfig(ctx context.Context, args ActionArguments) cnabaction.OperationConfigs
func (*Runtime) CreateRun ¶ added in v1.0.1
func (r *Runtime) CreateRun(ctx context.Context, args ActionArguments, b cnab.ExtendedBundle) (storage.Run, error)
func (*Runtime) Execute ¶ added in v0.28.0
func (r *Runtime) Execute(ctx context.Context, args ActionArguments) error
func (*Runtime) LoadBundle ¶
func (r *Runtime) LoadBundle(bundleFile string) (cnab.ExtendedBundle, error)
func (*Runtime) ProcessBundle ¶ added in v0.28.0
func (r *Runtime) ProcessBundle(ctx context.Context, b cnab.ExtendedBundle) (cnab.ExtendedBundle, error)
func (*Runtime) ProcessBundleFromFile ¶ added in v0.38.5
func (*Runtime) ProcessRequiredExtensions ¶ added in v0.28.0
func (r *Runtime) ProcessRequiredExtensions(b cnab.ExtendedBundle) error
func (*Runtime) SaveOperationResult ¶ added in v1.0.1
func (r *Runtime) SaveOperationResult(ctx context.Context, opResult driver.OperationResult, installation storage.Installation, run storage.Run, result storage.Result) error
SaveOperationResult saves the ClaimResult and Outputs. The caller is responsible for having already persisted the claim itself, for example using SaveRun.
func (*Runtime) SaveRun ¶ added in v1.0.1
func (r *Runtime) SaveRun(ctx context.Context, installation storage.Installation, run storage.Run, status string) error
SaveRun with the specified status.
func (*Runtime) SetOutput ¶
func (r *Runtime) SetOutput() cnabaction.OperationConfigFunc
type TestRuntime ¶
type TestRuntime struct { *Runtime TestStorage storage.TestStore TestInstallations *storage.TestInstallationProvider TestCredentials *storage.TestCredentialSetProvider TestParameters *storage.TestParameterSetProvider TestConfig *config.TestConfig }
func NewTestRuntime ¶
func NewTestRuntime(t *testing.T) *TestRuntime
func NewTestRuntimeFor ¶ added in v1.0.1
func NewTestRuntimeFor(tc *config.TestConfig, testInstallations *storage.TestInstallationProvider, testCredentials *storage.TestCredentialSetProvider, testParameters *storage.TestParameterSetProvider, testSecrets secrets.Store) *TestRuntime
func (*TestRuntime) Close ¶ added in v1.0.1
func (t *TestRuntime) Close() error
func (*TestRuntime) Execute ¶ added in v0.28.0
func (t *TestRuntime) Execute(ctx context.Context, args ActionArguments) error
func (*TestRuntime) LoadBundle ¶
func (t *TestRuntime) LoadBundle(bundleFile string) (cnab.ExtendedBundle, error)
func (*TestRuntime) LoadTestBundle ¶ added in v1.0.1
func (t *TestRuntime) LoadTestBundle(bundleFile string) cnab.ExtendedBundle
func (*TestRuntime) MockGetDockerGroupId ¶ added in v1.0.1
func (t *TestRuntime) MockGetDockerGroupId()
Click to show internal directories.
Click to hide internal directories.