action

package
v0.3.1-beta1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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, io.Writer) error
}

Action describes one of the primary actions that can be executed in CNAB.

The actions are: - install - upgrade - uninstall - downgrade - status

type Install

type Install struct {
	Driver driver.Driver // Needs to be more than a string
}

Install describes an installation action

func (*Install) Run

func (i *Install) Run(c *claim.Claim, creds credentials.Set, w io.Writer) error

Run performs an installation and updates the Claim accordingly

type RunCustom

type RunCustom struct {
	Driver driver.Driver
	Action string
}

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, w io.Writer) error

Run executes a status action in an image

type Status

type Status struct {
	Driver driver.Driver
}

Status runs a status action on a CNAB bundle.

func (*Status) Run

func (i *Status) Run(c *claim.Claim, creds credentials.Set, w io.Writer) error

Run executes a status action in an image

type Uninstall

type Uninstall struct {
	Driver driver.Driver
}

Uninstall runs an uninstall action

func (*Uninstall) Run

func (u *Uninstall) Run(c *claim.Claim, creds credentials.Set, w io.Writer) error

Run performs the uninstall steps and updates the Claim

type Upgrade

type Upgrade struct {
	Driver driver.Driver
}

Upgrade runs an upgrade action

func (*Upgrade) Run

func (u *Upgrade) Run(c *claim.Claim, creds credentials.Set, w io.Writer) error

Run performs the upgrade steps and updates the Claim

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL