vclone

package
v1.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PredicateFunc

type PredicateFunc func(*VolumeClone) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsCreateParentSet

func IsCreateParentSet() PredicateFunc

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

func IsPropertySet

func IsPropertySet() PredicateFunc

IsPropertySet method check if the Property field of VolumeClone object is set.

func IsSnapshotSet

func IsSnapshotSet() PredicateFunc

IsSnapshotSet method check if the Snapshot field of VolumeClone object is set.

func IsSourceDatasetSet

func IsSourceDatasetSet() PredicateFunc

IsSourceDatasetSet method check if the SourceDataset field of VolumeClone object is set.

func IsTargetDatasetSet

func IsTargetDatasetSet() PredicateFunc

IsTargetDatasetSet method check if the TargetDataset field of VolumeClone object is set.

type VolumeClone

type VolumeClone struct {
	//snapshot from where clone needs to be created
	Snapshot string

	//targeted dataset name
	TargetDataset string

	//source dataset name
	SourceDataset string

	//property for dataset
	Property []string

	//createall the non-existing parent datasets
	CreateParent bool

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

VolumeClone defines structure for volume 'Clone' operation

func NewVolumeClone

func NewVolumeClone() *VolumeClone

NewVolumeClone returns new instance of object VolumeClone

func (*VolumeClone) Build

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

Build returns the VolumeClone object generated by builder

func (*VolumeClone) Execute

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

Execute is to execute generated VolumeClone object

func (*VolumeClone) SetCommand

func (v *VolumeClone) SetCommand(Command string)

SetCommand method set the Command field of VolumeClone object.

func (*VolumeClone) SetCreateParent

func (v *VolumeClone) SetCreateParent(CreateParent bool)

SetCreateParent method set the CreateParent field of VolumeClone object.

func (*VolumeClone) SetProperty

func (v *VolumeClone) SetProperty(key, value string)

SetProperty method append the Property to VolumeClone object's property.

func (*VolumeClone) SetSnapshot

func (v *VolumeClone) SetSnapshot(Snapshot string)

SetSnapshot method set the Snapshot field of VolumeClone object.

func (*VolumeClone) SetSourceDataset

func (v *VolumeClone) SetSourceDataset(SourceDataset string)

SetSourceDataset method set the SourceDataset field of VolumeClone object.

func (*VolumeClone) SetTargetDataset

func (v *VolumeClone) SetTargetDataset(TargetDataset string)

SetTargetDataset method set the TargetDataset field of VolumeClone object.

func (*VolumeClone) Validate

func (v *VolumeClone) Validate() *VolumeClone

Validate is to validate generated VolumeClone object by builder

func (*VolumeClone) WithCheck

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

WithCheck add given check to checks list

func (*VolumeClone) WithCommand

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

WithCommand method fills the Command field of VolumeClone object.

func (*VolumeClone) WithCreateParent

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

WithCreateParent method fills the CreateParent field of VolumeClone object.

func (*VolumeClone) WithProperty

func (v *VolumeClone) WithProperty(key, value string) *VolumeClone

WithProperty method fills the Property field of VolumeClone object.

func (*VolumeClone) WithSnapshot

func (v *VolumeClone) WithSnapshot(Snapshot string) *VolumeClone

WithSnapshot method fills the Snapshot field of VolumeClone object.

func (*VolumeClone) WithSourceDataset

func (v *VolumeClone) WithSourceDataset(SourceDataset string) *VolumeClone

WithSourceDataset method fills the SourceDataset field of VolumeClone object.

func (*VolumeClone) WithTargetDataset

func (v *VolumeClone) WithTargetDataset(TargetDataset string) *VolumeClone

WithTargetDataset method fills the TargetDataset field of VolumeClone object.

Jump to

Keyboard shortcuts

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