poffline

package
v1.10.0-RC1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolOffline

type PoolOffline struct {
	// force fault
	ForceOffline bool

	// pool name
	Pool string

	//list of offline devices
	Devicelist []string

	// command string
	Command string
	// contains filtered or unexported fields
}

PoolOffline defines structure for pool 'Offline' operation

func NewPoolOffline

func NewPoolOffline() *PoolOffline

NewPoolOffline returns new instance of object PoolOffline

func (*PoolOffline) Build

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

Build returns the PoolOffline object generated by builder

func (*PoolOffline) Execute

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

Execute is to execute generated PoolOffline object

func (*PoolOffline) GetCommand

func (p *PoolOffline) GetCommand() string

GetCommand method get the Command field of PoolOffline object.

func (*PoolOffline) GetDevicelist

func (p *PoolOffline) GetDevicelist() []string

GetDevicelist method get the Devicelist field of PoolOffline object.

func (*PoolOffline) GetForceOffline

func (p *PoolOffline) GetForceOffline() bool

GetForceOffline method get the ForceOffline field of PoolOffline object.

func (*PoolOffline) GetPool

func (p *PoolOffline) GetPool() string

GetPool method get the Pool field of PoolOffline object.

func (*PoolOffline) GetisTemporary

func (p *PoolOffline) GetisTemporary() bool

GetisTemporary method get the isTemporary field of PoolOffline object.

func (*PoolOffline) SetCommand

func (p *PoolOffline) SetCommand(Command string)

SetCommand method set the Command field of PoolOffline object.

func (*PoolOffline) SetDevice

func (p *PoolOffline) SetDevice(device string)

SetDevice method add the device to DeviceList field of PoolOffline object.

func (*PoolOffline) SetForceOffline

func (p *PoolOffline) SetForceOffline(ForceOffline bool)

SetForceOffline method set the ForceOffline field of PoolOffline object.

func (*PoolOffline) SetPool

func (p *PoolOffline) SetPool(Pool string)

SetPool method set the Pool field of PoolOffline object.

func (*PoolOffline) SetisTemporary

func (p *PoolOffline) SetisTemporary(isTemporary bool)

SetisTemporary method set the isTemporary field of PoolOffline object.

func (*PoolOffline) Validate

func (p *PoolOffline) Validate() *PoolOffline

Validate is to validate generated PoolOffline object by builder

func (*PoolOffline) WithCheck

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

WithCheck add given check to checks list

func (*PoolOffline) WithCommand

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

WithCommand method fills the Command field of PoolOffline object.

func (*PoolOffline) WithDevicelist

func (p *PoolOffline) WithDevicelist(device string) *PoolOffline

WithDevicelist method fills the Devicelist field of PoolOffline object.

func (*PoolOffline) WithForceOffline

func (p *PoolOffline) WithForceOffline(ForceOffline bool) *PoolOffline

WithForceOffline method fills the ForceOffline field of PoolOffline object.

func (*PoolOffline) WithPool

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

WithPool method fills the Pool field of PoolOffline object.

func (*PoolOffline) WithisTemporary

func (p *PoolOffline) WithisTemporary(isTemporary bool) *PoolOffline

WithisTemporary method fills the isTemporary field of PoolOffline object.

type PredicateFunc

type PredicateFunc func(*PoolOffline) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsDevicelistSet

func IsDevicelistSet() PredicateFunc

IsDevicelistSet method check if the Devicelist field of PoolOffline object is set.

func IsForceOfflineSet

func IsForceOfflineSet() PredicateFunc

IsForceOfflineSet method check if the ForceOffline field of PoolOffline object is set.

func IsPoolSet

func IsPoolSet() PredicateFunc

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

func IsTemporarySet

func IsTemporarySet() PredicateFunc

IsTemporarySet method check if the isTemporary field of PoolOffline object is set.

Jump to

Keyboard shortcuts

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