Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrBlockedAction indicates that the requested action was not allowed. ErrBlockedAction = errors.New("action not allowed") // ErrUndefinedAction indicates that a bundle does not define this action. ErrUndefinedAction = errors.New("action not defined for bundle") )
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface { // Run an action, and record the status in the given claim Run(*claim.Claim, credentials.Set, ...OperationConfigFunc) error }
Action describes one of the primary actions that can be executed in CNAB.
The actions are: - install - upgrade - uninstall - downgrade - status
type Install ¶
Install describes an installation action
func (*Install) Run ¶
func (i *Install) Run(c *claim.Claim, creds credentials.Set, opCfgs ...OperationConfigFunc) error
Run performs an installation and updates the Claim accordingly
type OperationConfigFunc ¶
OperationConfigFunc is a configuration function that can be applied to an operation.
type OperationConfigs ¶
type OperationConfigs []OperationConfigFunc
OperationConfigs is a set of configuration functions that can be applied as a unit to an operation.
func (OperationConfigs) ApplyConfig ¶
func (cfgs OperationConfigs) ApplyConfig(op *driver.Operation) error
ApplyConfig safely applies the configuration function to the operation, if defined, and stops immediately upon the first error.
type RunCustom ¶
RunCustom allows the execution of an arbitrary target in a CNAB bundle.
func (*RunCustom) Run ¶
func (i *RunCustom) Run(c *claim.Claim, creds credentials.Set, opCfgs ...OperationConfigFunc) error
Run executes a status action in an image
type Status ¶
Status runs a status action on a CNAB bundle.
func (*Status) Run ¶
func (i *Status) Run(c *claim.Claim, creds credentials.Set, opCfgs ...OperationConfigFunc) error
Run executes a status action in an image