Documentation ¶
Index ¶
- Constants
- type ActionArguments
- type CNABProvider
- type Runtime
- func (r *Runtime) AddFiles(args ActionArguments) action.OperationConfigFunc
- func (r *Runtime) AddRelocation(args ActionArguments) action.OperationConfigFunc
- func (r *Runtime) ApplyConfig(args ActionArguments) action.OperationConfigs
- func (r *Runtime) Execute(ctx context.Context, args ActionArguments) error
- func (r *Runtime) LoadBundle(bundleFile string) (cnab.ExtendedBundle, error)
- func (r *Runtime) ProcessBundle(b cnab.ExtendedBundle) (cnab.ExtendedBundle, error)
- func (r *Runtime) ProcessBundleFromFile(bundleFile string) (cnab.ExtendedBundle, error)
- func (r *Runtime) ProcessRequiredExtensions(b cnab.ExtendedBundle) error
- func (r *Runtime) SaveOperationResult(opResult driver.OperationResult, installation claims.Installation, ...) error
- func (r *Runtime) SaveRun(installation claims.Installation, run claims.Run, status string) error
- func (r *Runtime) SetOutput() action.OperationConfigFunc
- type TestRuntime
- 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()
- func (t *TestRuntime) Teardown() error
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 claims.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) AddFiles ¶
func (r *Runtime) AddFiles(args ActionArguments) action.OperationConfigFunc
func (*Runtime) AddRelocation ¶
func (r *Runtime) AddRelocation(args ActionArguments) action.OperationConfigFunc
AddRelocation operates on an ActionArguments and adds any provided relocation mapping to the operation's files.
func (*Runtime) ApplyConfig ¶
func (r *Runtime) ApplyConfig(args ActionArguments) action.OperationConfigs
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(b cnab.ExtendedBundle) (cnab.ExtendedBundle, error)
func (*Runtime) ProcessBundleFromFile ¶ added in v0.38.5
func (r *Runtime) ProcessBundleFromFile(bundleFile string) (cnab.ExtendedBundle, error)
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(opResult driver.OperationResult, installation claims.Installation, run claims.Run, result claims.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) SetOutput ¶
func (r *Runtime) SetOutput() action.OperationConfigFunc
type TestRuntime ¶
type TestRuntime struct { *Runtime TestStorage storage.TestStore TestClaims *claims.TestClaimProvider TestCredentials *credentials.TestCredentialProvider TestParameters *parameters.TestParameterProvider TestConfig *config.TestConfig }
func NewTestRuntime ¶
func NewTestRuntime(t *testing.T) *TestRuntime
func NewTestRuntimeFor ¶ added in v1.0.1
func NewTestRuntimeFor(tc *config.TestConfig, testClaims *claims.TestClaimProvider, testCredentials *credentials.TestCredentialProvider, testParameters *parameters.TestParameterProvider) *TestRuntime
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()
func (*TestRuntime) Teardown ¶
func (t *TestRuntime) Teardown() error
Click to show internal directories.
Click to hide internal directories.