vset

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 = "set"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PredicateFunc

type PredicateFunc func(*VolumeSetProperty) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsDatasetSet

func IsDatasetSet() PredicateFunc

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

func IsExecutorSet added in v1.11.0

func IsExecutorSet() PredicateFunc

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

func IsProplistSet

func IsProplistSet() PredicateFunc

IsProplistSet method check if the Proplist field of VolumeSetProperty object is set.

func IsSnapshotSet

func IsSnapshotSet() PredicateFunc

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

type VolumeSetProperty

type VolumeSetProperty struct {
	//list of property
	Proplist []string

	//dataset name
	Dataset string

	//snapshot name
	Snapshot string

	//command for this structure
	Command string

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

VolumeSetProperty defines structure for volume 'Property' operation

func NewVolumeSetProperty

func NewVolumeSetProperty() *VolumeSetProperty

NewVolumeSetProperty returns new instance of object VolumeSetProperty

func (*VolumeSetProperty) Build

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

Build returns the VolumeSetProperty object generated by builder

func (*VolumeSetProperty) Execute

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

Execute is to execute generated VolumeSetProperty object

func (*VolumeSetProperty) GetCommand

func (v *VolumeSetProperty) GetCommand() string

GetCommand method get the Command field of VolumeSetProperty object.

func (*VolumeSetProperty) GetDataset

func (v *VolumeSetProperty) GetDataset() string

GetDataset method get the Dataset field of VolumeSetProperty object.

func (*VolumeSetProperty) GetProplist

func (v *VolumeSetProperty) GetProplist() []string

GetProplist method get the Proplist field of VolumeSetProperty object.

func (*VolumeSetProperty) GetSnapshot

func (v *VolumeSetProperty) GetSnapshot() string

GetSnapshot method get the Snapshot field of VolumeSetProperty object.

func (*VolumeSetProperty) SetCommand

func (v *VolumeSetProperty) SetCommand(Command string)

SetCommand method set the Command field of VolumeSetProperty object.

func (*VolumeSetProperty) SetDataset

func (v *VolumeSetProperty) SetDataset(Dataset string)

SetDataset method set the Dataset field of VolumeSetProperty object.

func (*VolumeSetProperty) SetProperty

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

SetProperty method append the property to Proplist field of VolumeSetProperty object.

func (*VolumeSetProperty) SetSnapshot

func (v *VolumeSetProperty) SetSnapshot(Snapshot string)

SetSnapshot method set the Snapshot field of VolumeSetProperty object.

func (*VolumeSetProperty) Validate

func (v *VolumeSetProperty) Validate() *VolumeSetProperty

Validate is to validate generated VolumeSetProperty object by builder

func (*VolumeSetProperty) WithCheck

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

WithCheck add given check to checks list

func (*VolumeSetProperty) WithCommand

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

WithCommand method fills the Command field of VolumeSetProperty object.

func (*VolumeSetProperty) WithDataset

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

WithDataset method fills the Dataset field of VolumeSetProperty object.

func (*VolumeSetProperty) WithExecutor added in v1.11.0

func (v *VolumeSetProperty) WithExecutor(executor bin.Executor) *VolumeSetProperty

WithExecutor method fills the Execute field of VolumeSetProperty object.

func (*VolumeSetProperty) WithProperty

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

WithProperty method fills the Proplist field of VolumeSetProperty object.

func (*VolumeSetProperty) WithSnapshot

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

WithSnapshot method fills the Snapshot field of VolumeSetProperty object.

Jump to

Keyboard shortcuts

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