vlist

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PredicateFunc

type PredicateFunc func(*VolumeList) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsDatasetSet

func IsDatasetSet() PredicateFunc

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

func IsExecutorSet

func IsExecutorSet() PredicateFunc

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

func IsFieldListSet

func IsFieldListSet() PredicateFunc

IsFieldListSet method check if the FieldList field of VolumeList object is set.

func IsParsableModeSet

func IsParsableModeSet() PredicateFunc

IsParsableModeSet method check if the IsParsableMode field of VolumeList object is set.

func IsProplistSet

func IsProplistSet() PredicateFunc

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

func IsScriptedModeSet

func IsScriptedModeSet() PredicateFunc

IsScriptedModeSet method check if the IsScriptedMode field of VolumeList object is set.

type VolumeList

type VolumeList struct {
	//list of property
	PropList []string

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

	// command string
	Command string

	// scripted mode. Will not display headers, and separate fields by a single tab instead of arbitrary space
	IsScriptedMode bool

	// Display numbers in parsable (exact) values
	IsParsableMode bool

	// Field list to display
	FieldList []string

	// Executor executes zfs commands
	Executor bin.Executor
	// contains filtered or unexported fields
}

VolumeList defines structure for volume 'Stats' operation

func NewVolumeList

func NewVolumeList() *VolumeList

NewVolumeList returns new instance of object VolumeList

func (*VolumeList) Build

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

Build returns the VolumeList object generated by builder

func (*VolumeList) Execute

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

Execute is to execute generated VolumeList object

func (*VolumeList) Validate

func (v *VolumeList) Validate() *VolumeList

Validate is to validate generated VolumeList object by builder

func (*VolumeList) WithCheck

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

WithCheck add given check to checks list

func (*VolumeList) WithCommand

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

WithCommand method fills the Command field of VolumeList object.

func (*VolumeList) WithDataset

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

WithDataset method fills the Dataset field of VolumeList object.

func (*VolumeList) WithExecutor

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

WithExecutor method fills the Executor field of VolumeList object.

func (*VolumeList) WithField

func (v *VolumeList) WithField(field string) *VolumeList

WithField method fills the FieldList field of VolumeList object.

func (*VolumeList) WithParsableMode

func (v *VolumeList) WithParsableMode(IsParsableMode bool) *VolumeList

WithParsableMode method update the IsParsableMode field of VolumeList object.

func (*VolumeList) WithProperty

func (v *VolumeList) WithProperty(key string) *VolumeList

WithProperty method fills the Proplist field of VolumeList object.

func (*VolumeList) WithScriptedMode

func (v *VolumeList) WithScriptedMode(IsScriptedMode bool) *VolumeList

WithScriptedMode method update the IsScriptedMode field of VolumeList object.

Jump to

Keyboard shortcuts

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