juju: github.com/juju/juju/cmd/juju/block Index | Files

package block

import "github.com/juju/juju/cmd/juju/block"


Package Files

disablecommand.go doc.go enablecommand.go list.go protection.go

func FormatModelBlockInfo Uses

func FormatModelBlockInfo(all []params.ModelBlockInfo) ([]modelBlockInfo, error)

func FormatTabularBlockedModels Uses

func FormatTabularBlockedModels(writer io.Writer, value interface{}) error

FormatTabularBlockedModels writes out tabular format for blocked models. This method is exported as it is also used by destroy-model.

func NewDisableCommand Uses

func NewDisableCommand() cmd.Command

NewDisableCommand returns a disable-command command instance that will use the default API.

func NewEnableCommand Uses

func NewEnableCommand() cmd.Command

NewEnableCommand returns a new command that eanbles previously disabled command sets.

func NewListCommand Uses

func NewListCommand() cmd.Command

NewListCommand returns the command that lists the disabled commands for the model.

func ProcessBlockedError Uses

func ProcessBlockedError(err error, block Block) error

ProcessBlockedError ensures that correct and user-friendly message is displayed to the user based on the block type.

type Block Uses

type Block int8

Block describes block type

const (
    // BlockDestroy describes the block that
    // blocks destroy- commands
    BlockDestroy Block = iota

    // BlockRemove describes the block that
    // blocks remove- commands

    // BlockChange describes the block that
    // blocks change commands

type BlockInfo Uses

type BlockInfo struct {
    Commands string `yaml:"command-set" json:"command-set"`
    Message  string `yaml:"message,omitempty" json:"message,omitempty"`

BlockInfo defines the serialization behaviour of the block information.

Package block imports 16 packages (graph) and is imported by 250 packages. Updated 2020-09-02. Refresh now. Tools for package owners.