pget

package
v1.12.0-RC1 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolGProperty

type PoolGProperty struct {
	//list of property
	PropList []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

	//pool name
	Pool string

	//command string
	Command string

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

PoolGProperty defines structure for pool 'get Property' operation

func NewPoolGetProperty

func NewPoolGetProperty() *PoolGProperty

NewPoolGetProperty returns new instance of object PoolGProperty

func (*PoolGProperty) Build

func (p *PoolGProperty) Build() (*PoolGProperty, error)

Build returns the PoolGProperty object generated by builder

func (*PoolGProperty) Execute

func (p *PoolGProperty) Execute() ([]byte, error)

Execute is to execute generated PoolGProperty object

func (*PoolGProperty) GetCommand

func (p *PoolGProperty) GetCommand() string

GetCommand method get the Command field of PoolGProperty object.

func (*PoolGProperty) GetPool

func (p *PoolGProperty) GetPool() string

GetPool method get the Pool field of PoolGProperty object.

func (*PoolGProperty) GetPropList

func (p *PoolGProperty) GetPropList() []string

GetPropList method get the PropList field of PoolGProperty object.

func (*PoolGProperty) SetCommand

func (p *PoolGProperty) SetCommand(Command string)

SetCommand method set the Command field of PoolGProperty object.

func (*PoolGProperty) SetPool

func (p *PoolGProperty) SetPool(Pool string)

SetPool method set the Pool field of PoolGProperty object.

func (*PoolGProperty) SetPropList

func (p *PoolGProperty) SetPropList(key string)

SetPropList method set the PropList field of PoolGProperty object.

func (*PoolGProperty) Validate

func (p *PoolGProperty) Validate() *PoolGProperty

Validate is to validate generated PoolGProperty object by builder

func (*PoolGProperty) WithCheck

func (p *PoolGProperty) WithCheck(check ...PredicateFunc) *PoolGProperty

WithCheck add given check to checks list

func (*PoolGProperty) WithCommand

func (p *PoolGProperty) WithCommand(Command string) *PoolGProperty

WithCommand method fills the Command field of PoolGProperty object.

func (*PoolGProperty) WithExecutor added in v1.11.0

func (p *PoolGProperty) WithExecutor(executor bin.Executor) *PoolGProperty

WithExecutor method fills the Executor field of PoolDump object.

func (*PoolGProperty) WithField

func (p *PoolGProperty) WithField(Field string) *PoolGProperty

WithField method fills the FieldList field of PoolGProperty object.

func (*PoolGProperty) WithParsableMode

func (p *PoolGProperty) WithParsableMode(IsParsableMode bool) *PoolGProperty

WithParsableMode method update the IsParsableMode field of PoolGProperty object.

func (*PoolGProperty) WithPool

func (p *PoolGProperty) WithPool(Pool string) *PoolGProperty

WithPool method fills the Pool field of PoolGProperty object.

func (*PoolGProperty) WithProperty

func (p *PoolGProperty) WithProperty(key string) *PoolGProperty

WithProperty method fills the PropList field of PoolGProperty object.

func (*PoolGProperty) WithPropertyList

func (p *PoolGProperty) WithPropertyList(keys []string) *PoolGProperty

WithPropertyList method fills the PropList field of PoolGProperty object.

func (*PoolGProperty) WithScriptedMode

func (p *PoolGProperty) WithScriptedMode(IsScriptedMode bool) *PoolGProperty

WithScriptedMode method update the IsScriptedMode field of PoolGProperty object.

type PredicateFunc

type PredicateFunc func(*PoolGProperty) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsExecutorSet added in v1.11.0

func IsExecutorSet() PredicateFunc

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

func IsFieldListSet

func IsFieldListSet() PredicateFunc

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

func IsParsableModeSet

func IsParsableModeSet() PredicateFunc

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

func IsPoolSet

func IsPoolSet() PredicateFunc

IsPoolSet method check if the Pool field of PoolGProperty object is set.

func IsPropListSet

func IsPropListSet() PredicateFunc

IsPropListSet method check if the PropList field of PoolGProperty object is set.

func IsScriptedModeSet

func IsScriptedModeSet() PredicateFunc

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

Jump to

Keyboard shortcuts

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