vdestroy

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 PredicateFunc

type PredicateFunc func(*VolumeDestroy) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsDryRunSet

func IsDryRunSet() PredicateFunc

IsDryRunSet method check if the DryRun field of VolumeDestroy object is set.

func IsNameSet

func IsNameSet() PredicateFunc

IsNameSet method check if the Name field of VolumeDestroy object is set.

func IsRecursiveSet

func IsRecursiveSet() PredicateFunc

IsRecursiveSet method check if the Recursive field of VolumeDestroy object is set.

type VolumeDestroy

type VolumeDestroy struct {
	//Do a dry-run
	DryRun bool

	//recursively destroy all  the clones, snapshots, and children
	Recursive bool

	//name of the dataset or snapshot
	Name string

	// command for this structure
	Command string
	// contains filtered or unexported fields
}

VolumeDestroy defines structure for volume 'Destroy' operation

func NewVolumeDestroy

func NewVolumeDestroy() *VolumeDestroy

NewVolumeDestroy returns new instance of object VolumeDestroy

func (*VolumeDestroy) Build

func (v *VolumeDestroy) Build() (*VolumeDestroy, error)

Build returns the VolumeDestroy object generated by builder

func (*VolumeDestroy) Execute

func (v *VolumeDestroy) Execute() ([]byte, error)

Execute is to execute generated VolumeDestroy object

func (*VolumeDestroy) GetCommand

func (v *VolumeDestroy) GetCommand() string

GetCommand method get the Command field of VolumeDestroy object.

func (*VolumeDestroy) GetDryRun

func (v *VolumeDestroy) GetDryRun() bool

GetDryRun method get the DryRun field of VolumeDestroy object.

func (*VolumeDestroy) GetName

func (v *VolumeDestroy) GetName() string

GetName method get the Name field of VolumeDestroy object.

func (*VolumeDestroy) GetRecursive

func (v *VolumeDestroy) GetRecursive() bool

GetRecursive method get the Recursive field of VolumeDestroy object.

func (*VolumeDestroy) SetCommand

func (v *VolumeDestroy) SetCommand(Command string)

SetCommand method set the Command field of VolumeDestroy object.

func (*VolumeDestroy) SetDryRun

func (v *VolumeDestroy) SetDryRun(DryRun bool)

SetDryRun method set the DryRun field of VolumeDestroy object.

func (*VolumeDestroy) SetName

func (v *VolumeDestroy) SetName(Name string)

SetName method set the Name field of VolumeDestroy object.

func (*VolumeDestroy) SetRecursive

func (v *VolumeDestroy) SetRecursive(Recursive bool)

SetRecursive method set the Recursive field of VolumeDestroy object.

func (*VolumeDestroy) Validate

func (v *VolumeDestroy) Validate() *VolumeDestroy

Validate is to validate generated VolumeDestroy object by builder

func (*VolumeDestroy) WithCheck

func (v *VolumeDestroy) WithCheck(check ...PredicateFunc) *VolumeDestroy

WithCheck add given check to checks list

func (*VolumeDestroy) WithCommand

func (v *VolumeDestroy) WithCommand(Command string) *VolumeDestroy

WithCommand method fills the Command field of VolumeDestroy object.

func (*VolumeDestroy) WithDryRun

func (v *VolumeDestroy) WithDryRun(DryRun bool) *VolumeDestroy

WithDryRun method fills the DryRun field of VolumeDestroy object.

func (*VolumeDestroy) WithName

func (v *VolumeDestroy) WithName(Name string) *VolumeDestroy

WithName method fills the Name field of VolumeDestroy object.

func (*VolumeDestroy) WithRecursive

func (v *VolumeDestroy) WithRecursive(Recursive bool) *VolumeDestroy

WithRecursive method fills the Recursive field of VolumeDestroy object.

Jump to

Keyboard shortcuts

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