Documentation ¶
Index ¶
- Constants
- type PredicateFunc
- type VolumeList
- func (v *VolumeList) Build() (*VolumeList, error)
- func (v *VolumeList) Execute() ([]byte, error)
- func (v *VolumeList) Validate() *VolumeList
- func (v *VolumeList) WithCheck(check ...PredicateFunc) *VolumeList
- func (v *VolumeList) WithCommand(Command string) *VolumeList
- func (v *VolumeList) WithDataset(Dataset string) *VolumeList
- func (v *VolumeList) WithExecutor(executor bin.Executor) *VolumeList
- func (v *VolumeList) WithField(field string) *VolumeList
- func (v *VolumeList) WithParsableMode(IsParsableMode bool) *VolumeList
- func (v *VolumeList) WithProperty(key string) *VolumeList
- func (v *VolumeList) WithScriptedMode(IsScriptedMode bool) *VolumeList
Constants ¶
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.