pattach

package
v1.12.0 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 = "attach"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolAttach

type PoolAttach struct {
	//list of property
	Property []string

	//forcefully attach
	Forcefully bool

	//device name
	Device string

	//new device name
	NewDevice string

	//pool name
	Pool string

	// command string
	Command string

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

PoolAttach defines structure for pool 'Attach' operation

func NewPoolAttach

func NewPoolAttach() *PoolAttach

NewPoolAttach returns new instance of object PoolAttach

func (*PoolAttach) Build

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

Build returns the PoolAttach object generated by builder

func (*PoolAttach) Execute

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

Execute is to execute generated PoolAttach object

func (*PoolAttach) GetCommand

func (p *PoolAttach) GetCommand() string

GetCommand method get the Command field of PoolAttach object.

func (*PoolAttach) GetDevice

func (p *PoolAttach) GetDevice() string

GetDevice method get the Device field of PoolAttach object.

func (*PoolAttach) GetForcefully

func (p *PoolAttach) GetForcefully() bool

GetForcefully method get the Forcefully field of PoolAttach object.

func (*PoolAttach) GetNewDevice

func (p *PoolAttach) GetNewDevice() string

GetNewDevice method get the NewDevice field of PoolAttach object.

func (*PoolAttach) GetPool

func (p *PoolAttach) GetPool() string

GetPool method get the Pool field of PoolAttach object.

func (*PoolAttach) GetProperty

func (p *PoolAttach) GetProperty() []string

GetProperty method get the Property field of PoolAttach object.

func (*PoolAttach) SetCommand

func (p *PoolAttach) SetCommand(Command string)

SetCommand method set the Command field of PoolAttach object.

func (*PoolAttach) SetDevice

func (p *PoolAttach) SetDevice(Device string)

SetDevice method set the Device field of PoolAttach object.

func (*PoolAttach) SetForcefully

func (p *PoolAttach) SetForcefully(Forcefully bool)

SetForcefully method set the Forcefully field of PoolAttach object.

func (*PoolAttach) SetNewDevice

func (p *PoolAttach) SetNewDevice(NewDevice string)

SetNewDevice method set the NewDevice field of PoolAttach object.

func (*PoolAttach) SetPool

func (p *PoolAttach) SetPool(Pool string)

SetPool method set the Pool field of PoolAttach object.

func (*PoolAttach) SetProperty

func (p *PoolAttach) SetProperty(key, value string)

SetProperty method set the Property field of PoolAttach object.

func (*PoolAttach) Validate

func (p *PoolAttach) Validate() *PoolAttach

Validate is to validate generated PoolAttach object by builder

func (*PoolAttach) WithCheck

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

WithCheck add given check to checks list

func (*PoolAttach) WithCommand

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

WithCommand method fills the Command field of PoolAttach object.

func (*PoolAttach) WithDevice

func (p *PoolAttach) WithDevice(Device string) *PoolAttach

WithDevice method fills the Device field of PoolAttach object.

func (*PoolAttach) WithExecutor added in v1.11.0

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

WithExecutor method fills the Executor field of PoolDump object.

func (*PoolAttach) WithForcefully

func (p *PoolAttach) WithForcefully(Forcefully bool) *PoolAttach

WithForcefully method fills the Forcefully field of PoolAttach object.

func (*PoolAttach) WithNewDevice

func (p *PoolAttach) WithNewDevice(NewDevice string) *PoolAttach

WithNewDevice method fills the NewDevice field of PoolAttach object.

func (*PoolAttach) WithPool

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

WithPool method fills the Pool field of PoolAttach object.

func (*PoolAttach) WithProperty

func (p *PoolAttach) WithProperty(key, value string) *PoolAttach

WithProperty method fills the Property field of PoolAttach object.

type PredicateFunc

type PredicateFunc func(*PoolAttach) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsDeviceSet

func IsDeviceSet() PredicateFunc

IsDeviceSet method check if the Device field of PoolAttach object is set.

func IsExecutorSet added in v1.11.0

func IsExecutorSet() PredicateFunc

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

func IsForcefullySet

func IsForcefullySet() PredicateFunc

IsForcefullySet method check if the Forcefully field of PoolAttach object is set.

func IsNewDeviceSet

func IsNewDeviceSet() PredicateFunc

IsNewDeviceSet method check if the NewDevice field of PoolAttach object is set.

func IsPoolSet

func IsPoolSet() PredicateFunc

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

func IsPropertySet

func IsPropertySet() PredicateFunc

IsPropertySet method check if the Property field of PoolAttach object is set.

Jump to

Keyboard shortcuts

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