vsnapshot

package
v1.12.1 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 = "snapshot"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PredicateFunc

type PredicateFunc func(*VolumeSnapshot) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsDatasetSet

func IsDatasetSet() PredicateFunc

IsDatasetSet method check if the Dataset field of VolumeSnapshot object is set.

func IsPropertySet

func IsPropertySet() PredicateFunc

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

func IsRecursiveSet

func IsRecursiveSet() PredicateFunc

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

func IsSnapshotSet

func IsSnapshotSet() PredicateFunc

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

type VolumeSnapshot

type VolumeSnapshot struct {
	//list of property
	Property []string

	//name of snapshot
	Snapshot string

	//name of dataset on which snapshot should be taken
	Dataset string

	//Recursively create snapshots of all descendent datasets
	Recursive bool

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

VolumeSnapshot defines structure for volume 'Snapshot' operation

func NewVolumeSnapshot

func NewVolumeSnapshot() *VolumeSnapshot

NewVolumeSnapshot returns new instance of object VolumeSnapshot

func (*VolumeSnapshot) Build

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

Build returns the VolumeSnapshot object generated by builder

func (*VolumeSnapshot) Execute

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

Execute is to execute generated VolumeSnapshot object

func (*VolumeSnapshot) GetCommand

func (v *VolumeSnapshot) GetCommand() string

GetCommand method get the Command field of VolumeSnapshot object.

func (*VolumeSnapshot) GetDataset

func (v *VolumeSnapshot) GetDataset() string

GetDataset method get the Dataset field of VolumeSnapshot object.

func (*VolumeSnapshot) GetProperty

func (v *VolumeSnapshot) GetProperty() []string

GetProperty method get the Property field of VolumeSnapshot object.

func (*VolumeSnapshot) GetRecursive

func (v *VolumeSnapshot) GetRecursive() bool

GetRecursive method get the Recursive field of VolumeSnapshot object.

func (*VolumeSnapshot) GetSnapshot

func (v *VolumeSnapshot) GetSnapshot() string

GetSnapshot method get the Snapshot field of VolumeSnapshot object.

func (*VolumeSnapshot) SetCommand

func (v *VolumeSnapshot) SetCommand(Command string)

SetCommand method set the Command field of VolumeSnapshot object.

func (*VolumeSnapshot) SetDataset

func (v *VolumeSnapshot) SetDataset(Dataset string)

SetDataset method set the Dataset field of VolumeSnapshot object.

func (*VolumeSnapshot) SetProperty

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

SetProperty method set the Property field of VolumeSnapshot object.

func (*VolumeSnapshot) SetRecursive

func (v *VolumeSnapshot) SetRecursive(Recursive bool)

SetRecursive method set the Recursive field of VolumeSnapshot object.

func (*VolumeSnapshot) SetSnapshot

func (v *VolumeSnapshot) SetSnapshot(Snapshot string)

SetSnapshot method set the Snapshot field of VolumeSnapshot object.

func (*VolumeSnapshot) Validate

func (v *VolumeSnapshot) Validate() *VolumeSnapshot

Validate is to validate generated VolumeSnapshot object by builder

func (*VolumeSnapshot) WithCheck

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

WithCheck add given check to checks list

func (*VolumeSnapshot) WithCommand

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

WithCommand method fills the Command field of VolumeSnapshot object.

func (*VolumeSnapshot) WithDataset

func (v *VolumeSnapshot) WithDataset(Dataset string) *VolumeSnapshot

WithDataset method fills the Dataset field of VolumeSnapshot object.

func (*VolumeSnapshot) WithProperty

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

WithProperty method fills the Property field of VolumeSnapshot object.

func (*VolumeSnapshot) WithRecursive

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

WithRecursive method fills the Recursive field of VolumeSnapshot object.

func (*VolumeSnapshot) WithSnapshot

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

WithSnapshot method fills the Snapshot field of VolumeSnapshot object.

Jump to

Keyboard shortcuts

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