Documentation ¶
Index ¶
Constants ¶
const ( ActionDryRun = "io.cnab.dry-run" ActionHelp = "io.cnab.help" ActionLog = "io.cnab.log" ActionStatus = "io.cnab.status" )
Well known constants define the Well Known CNAB actions to be taken
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
type DryRun ¶
DryRun runs a dry-run action on a CNAB bundle.
func (*DryRun) Run ¶
func (i *DryRun) Run(c *claim.Claim, creds credentials.Set, opCfgs ...OperationConfigFunc) error
Run executes a dry-run action in an image
type Help ¶
Help runs a help action on a CNAB bundle.
func (*Help) Run ¶
func (i *Help) Run(c *claim.Claim, creds credentials.Set, opCfgs ...OperationConfigFunc) error
Run executes a help action in an image
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 Log ¶
Log runs a log action on a CNAB bundle.
func (*Log) Run ¶
func (i *Log) Run(c *claim.Claim, creds credentials.Set, opCfgs ...OperationConfigFunc) error
Run executes a log action in an image
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