Documentation ¶
Index ¶
- Constants
- type PoolSProperty
- func (p *PoolSProperty) Build() (*PoolSProperty, error)
- func (p *PoolSProperty) Execute() ([]byte, error)
- func (p *PoolSProperty) GetCommand() string
- func (p *PoolSProperty) GetPool() string
- func (p *PoolSProperty) GetPropList() []string
- func (p *PoolSProperty) SetCommand(Command string)
- func (p *PoolSProperty) SetPool(Pool string)
- func (p *PoolSProperty) SetPropList(key, value string)
- func (p *PoolSProperty) Validate() *PoolSProperty
- func (p *PoolSProperty) WithCheck(check ...PredicateFunc) *PoolSProperty
- func (p *PoolSProperty) WithCommand(Command string) *PoolSProperty
- func (p *PoolSProperty) WithExecutor(executor bin.Executor) *PoolSProperty
- func (p *PoolSProperty) WithPool(Pool string) *PoolSProperty
- func (p *PoolSProperty) WithProperty(key, value string) *PoolSProperty
- type PredicateFunc
Constants ¶
const (
// Operation defines type of zfs operation
Operation = "set"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PoolSProperty ¶
type PoolSProperty struct { //list of property PropList []string //pool name Pool string //command string Command string // Executor is to execute the commands Executor bin.Executor // contains filtered or unexported fields }
PoolSProperty defines structure for pool 'set Property' operation
func NewPoolSetProperty ¶
func NewPoolSetProperty() *PoolSProperty
NewPoolSetProperty returns new instance of object PoolSProperty
func (*PoolSProperty) Build ¶
func (p *PoolSProperty) Build() (*PoolSProperty, error)
Build returns the PoolSProperty object generated by builder
func (*PoolSProperty) Execute ¶
func (p *PoolSProperty) Execute() ([]byte, error)
Execute is to execute generated PoolSProperty object
func (*PoolSProperty) GetCommand ¶
func (p *PoolSProperty) GetCommand() string
GetCommand method get the Command field of PoolSProperty object.
func (*PoolSProperty) GetPool ¶
func (p *PoolSProperty) GetPool() string
GetPool method get the Pool field of PoolSProperty object.
func (*PoolSProperty) GetPropList ¶
func (p *PoolSProperty) GetPropList() []string
GetPropList method get the PropList field of PoolSProperty object.
func (*PoolSProperty) SetCommand ¶
func (p *PoolSProperty) SetCommand(Command string)
SetCommand method set the Command field of PoolSProperty object.
func (*PoolSProperty) SetPool ¶
func (p *PoolSProperty) SetPool(Pool string)
SetPool method set the Pool field of PoolSProperty object.
func (*PoolSProperty) SetPropList ¶
func (p *PoolSProperty) SetPropList(key, value string)
SetPropList method set the PropList field of PoolSProperty object.
func (*PoolSProperty) Validate ¶
func (p *PoolSProperty) Validate() *PoolSProperty
Validate is to validate generated PoolSProperty object by builder
func (*PoolSProperty) WithCheck ¶
func (p *PoolSProperty) WithCheck(check ...PredicateFunc) *PoolSProperty
WithCheck add given check to checks list
func (*PoolSProperty) WithCommand ¶
func (p *PoolSProperty) WithCommand(Command string) *PoolSProperty
WithCommand method fills the Command field of PoolSProperty object.
func (*PoolSProperty) WithExecutor ¶ added in v1.11.0
func (p *PoolSProperty) WithExecutor(executor bin.Executor) *PoolSProperty
WithExecutor method fills the Executor field of PoolDump object.
func (*PoolSProperty) WithPool ¶
func (p *PoolSProperty) WithPool(Pool string) *PoolSProperty
WithPool method fills the Pool field of PoolSProperty object.
func (*PoolSProperty) WithProperty ¶
func (p *PoolSProperty) WithProperty(key, value string) *PoolSProperty
WithProperty method fills the PropList field of PoolSProperty object.
type PredicateFunc ¶
type PredicateFunc func(*PoolSProperty) bool
PredicateFunc defines data-type for validation function
func IsCommandSet ¶
func IsCommandSet() PredicateFunc
IsCommandSet method check if the Command field of PoolSProperty object is set.
func IsExecutorSet ¶ added in v1.11.0
func IsExecutorSet() PredicateFunc
IsExecutorSet method check if the Executor field of PoolSproperty object is set.
func IsPoolSet ¶
func IsPoolSet() PredicateFunc
IsPoolSet method check if the Pool field of PoolSProperty object is set.
func IsPropListSet ¶
func IsPropListSet() PredicateFunc
IsPropListSet method check if the PropList field of PoolSProperty object is set.