Documentation ¶
Index ¶
- Constants
- type PoolCreate
- func (p *PoolCreate) Build() (*PoolCreate, error)
- func (p *PoolCreate) Execute() ([]byte, error)
- func (p *PoolCreate) GetCommand() string
- func (p *PoolCreate) GetForcefully() bool
- func (p *PoolCreate) GetPool() string
- func (p *PoolCreate) GetProperty() []string
- func (p *PoolCreate) GetVdev() []string
- func (p *PoolCreate) SetCommand(Command string)
- func (p *PoolCreate) SetForcefully(Forcefully bool)
- func (p *PoolCreate) SetPool(Pool string)
- func (p *PoolCreate) SetProperty(key, value string)
- func (p *PoolCreate) SetVdev(Vdev string)
- func (p *PoolCreate) Validate() *PoolCreate
- func (p *PoolCreate) WithCheck(check ...PredicateFunc) *PoolCreate
- func (p *PoolCreate) WithCommand(Command string) *PoolCreate
- func (p *PoolCreate) WithForcefully(Forcefully bool) *PoolCreate
- func (p *PoolCreate) WithPool(Pool string) *PoolCreate
- func (p *PoolCreate) WithProperty(key, value string) *PoolCreate
- func (p *PoolCreate) WithType(t string) *PoolCreate
- func (p *PoolCreate) WithVdev(vdev string) *PoolCreate
- func (p *PoolCreate) WithVdevList(vdevlist []string) *PoolCreate
- type PredicateFunc
Constants ¶
const (
// Operation defines type of zfs operation
Operation = "create"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PoolCreate ¶
type PoolCreate struct { // property list Property []string // pool name Pool string // pool type Type string //vdev list Vdev []string // force use of vdevs Forcefully bool // command string Command string // contains filtered or unexported fields }
PoolCreate defines structure for pool 'Create' operation
func NewPoolCreate ¶
func NewPoolCreate() *PoolCreate
NewPoolCreate returns new instance of object PoolCreate
func (*PoolCreate) Build ¶
func (p *PoolCreate) Build() (*PoolCreate, error)
Build returns the PoolCreate object generated by builder
func (*PoolCreate) Execute ¶
func (p *PoolCreate) Execute() ([]byte, error)
Execute is to execute generated PoolCreate object
func (*PoolCreate) GetCommand ¶
func (p *PoolCreate) GetCommand() string
GetCommand method get the Command field of PoolCreate object.
func (*PoolCreate) GetForcefully ¶
func (p *PoolCreate) GetForcefully() bool
GetForcefully method get the Forcefully field of PoolCreate object.
func (*PoolCreate) GetPool ¶
func (p *PoolCreate) GetPool() string
GetPool method get the Pool field of PoolCreate object.
func (*PoolCreate) GetProperty ¶
func (p *PoolCreate) GetProperty() []string
GetProperty method get the Property field of PoolCreate object.
func (*PoolCreate) GetVdev ¶
func (p *PoolCreate) GetVdev() []string
GetVdev method get the Vdev field of PoolCreate object.
func (*PoolCreate) SetCommand ¶
func (p *PoolCreate) SetCommand(Command string)
SetCommand method set the Command field of PoolCreate object.
func (*PoolCreate) SetForcefully ¶
func (p *PoolCreate) SetForcefully(Forcefully bool)
SetForcefully method set the Forcefully field of PoolCreate object.
func (*PoolCreate) SetPool ¶
func (p *PoolCreate) SetPool(Pool string)
SetPool method set the Pool field of PoolCreate object.
func (*PoolCreate) SetProperty ¶
func (p *PoolCreate) SetProperty(key, value string)
SetProperty method append the Property to PoolCreate object.
func (*PoolCreate) SetVdev ¶
func (p *PoolCreate) SetVdev(Vdev string)
SetVdev method set the Vdev field of PoolCreate object.
func (*PoolCreate) Validate ¶
func (p *PoolCreate) Validate() *PoolCreate
Validate is to validate generated PoolCreate object by builder
func (*PoolCreate) WithCheck ¶
func (p *PoolCreate) WithCheck(check ...PredicateFunc) *PoolCreate
WithCheck add given check to checks list
func (*PoolCreate) WithCommand ¶
func (p *PoolCreate) WithCommand(Command string) *PoolCreate
WithCommand method fills the Command field of PoolCreate object.
func (*PoolCreate) WithForcefully ¶
func (p *PoolCreate) WithForcefully(Forcefully bool) *PoolCreate
WithForcefully method fills the Forcefully field of PoolCreate object.
func (*PoolCreate) WithPool ¶
func (p *PoolCreate) WithPool(Pool string) *PoolCreate
WithPool method fills the Pool field of PoolCreate object.
func (*PoolCreate) WithProperty ¶
func (p *PoolCreate) WithProperty(key, value string) *PoolCreate
WithProperty method fills the Property field of PoolCreate object.
func (*PoolCreate) WithType ¶
func (p *PoolCreate) WithType(t string) *PoolCreate
WithType method fills the Type field of PoolCreate object.
func (*PoolCreate) WithVdev ¶
func (p *PoolCreate) WithVdev(vdev string) *PoolCreate
WithVdev method fills the Vdev field of PoolCreate object.
func (*PoolCreate) WithVdevList ¶
func (p *PoolCreate) WithVdevList(vdevlist []string) *PoolCreate
WithVdevList method fills the Vdev field of PoolCreate object.
type PredicateFunc ¶
type PredicateFunc func(*PoolCreate) bool
PredicateFunc defines data-type for validation function
func IsCommandSet ¶
func IsCommandSet() PredicateFunc
IsCommandSet method check if the Command field of PoolCreate object is set.
func IsForcefullySet ¶
func IsForcefullySet() PredicateFunc
IsForcefullySet method check if the Forcefully field of PoolCreate object is set.
func IsPoolSet ¶
func IsPoolSet() PredicateFunc
IsPoolSet method check if the Pool field of PoolCreate object is set.
func IsPropertySet ¶
func IsPropertySet() PredicateFunc
IsPropertySet method check if the Property field of PoolCreate object is set.
func IsTypeSet ¶
func IsTypeSet() PredicateFunc
IsTypeSet method check if the Type field of PoolCreate object is set.
func IsVdevSet ¶
func IsVdevSet() PredicateFunc
IsVdevSet method check if the Vdev field of PoolCreate object is set.