vrename

package
v1.12.1-RC1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PredicateFunc

type PredicateFunc func(*VolumeRename) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsCreateParentSet

func IsCreateParentSet() PredicateFunc

IsCreateParentSet method check if the CreateParent field of VolumeRename object is set.

func IsDestSet

func IsDestSet() PredicateFunc

IsDestSet method check if the Dest field of VolumeRename object is set.

func IsForceUnmountSet

func IsForceUnmountSet() PredicateFunc

IsForceUnmountSet method check if the ForceUnmount field of VolumeRename object is set.

func IsSourceSet

func IsSourceSet() PredicateFunc

IsSourceSet method check if the Source field of VolumeRename object is set.

type VolumeRename

type VolumeRename struct {
	//createall the non-existing parent datasets
	CreateParent bool

	//forceunmount the file-system
	ForceUnmount bool

	//name of the dataset/snapshot to be renamed
	Source string

	//new name for dataset/snapshot
	Dest string

	// command string
	Command string
	// contains filtered or unexported fields
}

VolumeRename defines structure for volume 'Rename' operation

func NewVolumeRename

func NewVolumeRename() *VolumeRename

NewVolumeRename returns new instance of object VolumeRename

func (*VolumeRename) Build

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

Build returns the VolumeRename object generated by builder

func (*VolumeRename) Execute

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

Execute is to execute generated VolumeRename object

func (*VolumeRename) GetCommand

func (v *VolumeRename) GetCommand() string

GetCommand method get the Command field of VolumeRename object.

func (*VolumeRename) GetCreateParent

func (v *VolumeRename) GetCreateParent() bool

GetCreateParent method get the CreateParent field of VolumeRename object.

func (*VolumeRename) GetDest

func (v *VolumeRename) GetDest() string

GetDest method get the Dest field of VolumeRename object.

func (*VolumeRename) GetForceUnmount

func (v *VolumeRename) GetForceUnmount() bool

GetForceUnmount method get the ForceUnmount field of VolumeRename object.

func (*VolumeRename) GetSource

func (v *VolumeRename) GetSource() string

GetSource method get the Source field of VolumeRename object.

func (*VolumeRename) SetCommand

func (v *VolumeRename) SetCommand(Command string)

SetCommand method set the Command field of VolumeRename object.

func (*VolumeRename) SetCreateParent

func (v *VolumeRename) SetCreateParent(CreateParent bool)

SetCreateParent method set the CreateParent field of VolumeRename object.

func (*VolumeRename) SetDest

func (v *VolumeRename) SetDest(Dest string)

SetDest method set the Dest field of VolumeRename object.

func (*VolumeRename) SetForceUnmount

func (v *VolumeRename) SetForceUnmount(ForceUnmount bool)

SetForceUnmount method set the ForceUnmount field of VolumeRename object.

func (*VolumeRename) SetSource

func (v *VolumeRename) SetSource(Source string)

SetSource method set the Source field of VolumeRename object.

func (*VolumeRename) Validate

func (v *VolumeRename) Validate() *VolumeRename

Validate is to validate generated VolumeRename object by builder

func (*VolumeRename) WithCheck

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

WithCheck add given check to checks list

func (*VolumeRename) WithCommand

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

WithCommand method fills the Command field of VolumeRename object.

func (*VolumeRename) WithCreateParent

func (v *VolumeRename) WithCreateParent(CreateParent bool) *VolumeRename

WithCreateParent method fills the CreateParent field of VolumeRename object.

func (*VolumeRename) WithDest

func (v *VolumeRename) WithDest(Dest string) *VolumeRename

WithDest method fills the Dest field of VolumeRename object.

func (*VolumeRename) WithForceUnmount

func (v *VolumeRename) WithForceUnmount(ForceUnmount bool) *VolumeRename

WithForceUnmount method fills the ForceUnmount field of VolumeRename object.

func (*VolumeRename) WithSource

func (v *VolumeRename) WithSource(Source string) *VolumeRename

WithSource method fills the Source field of VolumeRename object.

Jump to

Keyboard shortcuts

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