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(args ActionArguments) error
- func (r *Runtime) LoadBundle(bundleFile string) (bundle.Bundle, error)
- func (r *Runtime) ProcessBundle(bundleFile string) (bundle.Bundle, error)
- func (r *Runtime) ProcessRequiredExtensions(b bundle.Bundle) error
- func (r *Runtime) SetOutput() action.OperationConfigFunc
- type TestRuntime
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 string // Either a filepath to the bundle or the name of the bundle. BundlePath string // Additional files to copy into the bundle // Target Path => File Contents Files map[string]string // Params is the set of user-specified parameter values to pass to the bundle. Params map[string]string // Either a filepath to a credential file or the name of a set of a credentials. CredentialIdentifiers []string // Driver is the CNAB-compliant driver used to run bundle actions. Driver string // Path to an optional relocation mapping file RelocationMapping string // Give the bundle privileged access to the docker daemon. AllowDockerHostAccess bool }
Shared arguments for all CNAB actions
type CNABProvider ¶
type CNABProvider interface { LoadBundle(bundleFile string) (bundle.Bundle, error) Execute(arguments ActionArguments) error }
CNABProvider is the interface Porter uses to communicate with the CNAB runtime
type Runtime ¶
type Runtime struct { *config.Config Extensions extensions.ProcessedExtensions // contains filtered or unexported fields }
func NewRuntime ¶
func NewRuntime(c *config.Config, claims claim.Provider, credentials credentials.CredentialProvider, parameters parameters.ParameterProvider) *Runtime
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(args ActionArguments) error
func (*Runtime) ProcessBundle ¶ added in v0.28.0
func (*Runtime) ProcessRequiredExtensions ¶ added in v0.28.0
func (*Runtime) SetOutput ¶
func (r *Runtime) SetOutput() action.OperationConfigFunc
type TestRuntime ¶
type TestRuntime struct { *Runtime TestClaims claims.TestClaimProvider TestCredentials credentials.TestCredentialProvider TestParameters *parameters.TestParameterProvider TestConfig *config.TestConfig }
func NewTestRuntime ¶
func NewTestRuntime(t *testing.T) *TestRuntime
func NewTestRuntimeWithConfig ¶
func NewTestRuntimeWithConfig(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(args ActionArguments) error
func (*TestRuntime) LoadBundle ¶
func (t *TestRuntime) LoadBundle(bundleFile string) (bundle.Bundle, error)
Click to show internal directories.
Click to hide internal directories.