pdestroy

package
v1.12.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation defines type of zfs operation
	Operation = "destroy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolDestroy

type PoolDestroy struct {
	//pool name
	Pool string

	//forcefully destroy
	Forcefully bool

	// command string
	Command string

	// Executor is to execute the commands
	Executor bin.Executor
	// contains filtered or unexported fields
}

PoolDestroy defines structure for pool 'Destroy' operation

func NewPoolDestroy

func NewPoolDestroy() *PoolDestroy

NewPoolDestroy returns new instance of object PoolDestroy

func (*PoolDestroy) Build

func (p *PoolDestroy) Build() (*PoolDestroy, error)

Build returns the PoolDestroy object generated by builder

func (*PoolDestroy) Execute

func (p *PoolDestroy) Execute() ([]byte, error)

Execute is to execute generated PoolCreate object

func (*PoolDestroy) GetCommand

func (p *PoolDestroy) GetCommand() string

GetCommand method get the Command field of PoolDestroy object.

func (*PoolDestroy) GetForcefully

func (p *PoolDestroy) GetForcefully() bool

GetForcefully method get the Forcefully field of PoolDestroy object.

func (*PoolDestroy) GetPool

func (p *PoolDestroy) GetPool() string

GetPool method get the Pool field of PoolDestroy object.

func (*PoolDestroy) SetCommand

func (p *PoolDestroy) SetCommand(Command string)

SetCommand method set the Command field of PoolDestroy object.

func (*PoolDestroy) SetForcefully

func (p *PoolDestroy) SetForcefully(Forcefully bool)

SetForcefully method set the Forcefully field of PoolDestroy object.

func (*PoolDestroy) SetPool

func (p *PoolDestroy) SetPool(Pool string)

SetPool method set the Pool field of PoolDestroy object.

func (*PoolDestroy) Validate

func (p *PoolDestroy) Validate() *PoolDestroy

Validate is to validate generated PoolDestroy object by builder

func (*PoolDestroy) WithCheck

func (p *PoolDestroy) WithCheck(check ...PredicateFunc) *PoolDestroy

WithCheck add given check to checks list

func (*PoolDestroy) WithCommand

func (p *PoolDestroy) WithCommand(Command string) *PoolDestroy

WithCommand method fills the Command field of PoolDestroy object.

func (*PoolDestroy) WithExecutor added in v1.11.0

func (p *PoolDestroy) WithExecutor(executor bin.Executor) *PoolDestroy

WithExecutor method fills the Executor field of PoolDestroy object.

func (*PoolDestroy) WithForcefully

func (p *PoolDestroy) WithForcefully(Forcefully bool) *PoolDestroy

WithForcefully method fills the Forcefully field of PoolDestroy object.

func (*PoolDestroy) WithPool

func (p *PoolDestroy) WithPool(Pool string) *PoolDestroy

WithPool method fills the Pool field of PoolDestroy object.

type PredicateFunc

type PredicateFunc func(*PoolDestroy) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

IsCommandSet method check if the Command field of PoolDestroy object is set.

func IsExecutorSet added in v1.11.0

func IsExecutorSet() PredicateFunc

IsExecutorSet method check if the Executor field of PoolDestroy object is set.

func IsForcefullySet

func IsForcefullySet() PredicateFunc

IsForcefullySet method check if the Forcefully field of PoolDestroy object is set.

func IsPoolSet

func IsPoolSet() PredicateFunc

IsPoolSet method check if the Pool field of PoolDestroy object is set.

Jump to

Keyboard shortcuts

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