padd

package
v1.10.0-RC2 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolExpansion

type PoolExpansion struct {
	// list of vdev to add
	VdevList []string

	// property list
	Property []string

	// name of pool
	Pool string

	// Forcefully .. with -f
	Forcefully bool

	// command string
	Command string

	// DeviceType
	DeviceType string

	// Type of config.. like mirror
	Type string
	// contains filtered or unexported fields
}

PoolExpansion defines structure for pool 'Expansion' operation

func NewPoolExpansion

func NewPoolExpansion() *PoolExpansion

NewPoolExpansion returns new instance of object PoolExpansion

func (*PoolExpansion) Build

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

Build returns the PoolExpansion object generated by builder

func (*PoolExpansion) Execute

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

Execute is to execute generated PoolExpansion object

func (*PoolExpansion) GetCommand

func (p *PoolExpansion) GetCommand() string

GetCommand method get the Command field of PoolExpansion object.

func (*PoolExpansion) GetPool

func (p *PoolExpansion) GetPool() string

GetPool method get the Pool field of PoolExpansion object.

func (*PoolExpansion) GetProperty

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

GetProperty method get the Property field of PoolExpansion object.

func (*PoolExpansion) GetVdevList

func (p *PoolExpansion) GetVdevList() []string

GetVdevList method get the VdevList field of PoolExpansion object.

func (*PoolExpansion) SetCommand

func (p *PoolExpansion) SetCommand(Command string)

SetCommand method set the Command field of PoolExpansion object.

func (*PoolExpansion) SetPool

func (p *PoolExpansion) SetPool(Pool string)

SetPool method set the Pool field of PoolExpansion object.

func (*PoolExpansion) SetProperty

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

SetProperty method set the Property field of PoolExpansion object.

func (*PoolExpansion) SetVdev

func (p *PoolExpansion) SetVdev(Vdev string)

SetVdev method set the VdevList field of PoolExpansion object.

func (*PoolExpansion) Validate

func (p *PoolExpansion) Validate() *PoolExpansion

Validate is to validate generated PoolExpansion object by builder

func (*PoolExpansion) WithCheck

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

WithCheck add given check to checks list

func (*PoolExpansion) WithCommand

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

WithCommand method fills the Command field of PoolExpansion object.

func (*PoolExpansion) WithDeviceType

func (p *PoolExpansion) WithDeviceType(DeviceType string) *PoolExpansion

WithDeviceType method fills the DeviceType field of PoolExpansion object.

func (*PoolExpansion) WithForcefully

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

WithForcefully method fills the Forcefully field of PoolExpansion object.

func (*PoolExpansion) WithPool

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

WithPool method fills the Pool field of PoolExpansion object.

func (*PoolExpansion) WithProperty

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

WithProperty method fills the Property field of PoolExpansion object.

func (*PoolExpansion) WithType

func (p *PoolExpansion) WithType(Type string) *PoolExpansion

WithType method fills the Type field of PoolExpansion object.

func (*PoolExpansion) WithVdevList

func (p *PoolExpansion) WithVdevList(vdevlist []string) *PoolExpansion

WithVdevList method fills the VdevList field of PoolExpansion object.

type PredicateFunc

type PredicateFunc func(*PoolExpansion) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsDeviceTypeSet

func IsDeviceTypeSet() PredicateFunc

IsDeviceTypeSet method check if the DeviceType field of PoolExpansion object is set.

func IsForcefullySet

func IsForcefullySet() PredicateFunc

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

func IsPoolSet

func IsPoolSet() PredicateFunc

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

func IsPropertySet

func IsPropertySet() PredicateFunc

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

func IsTypeSet

func IsTypeSet() PredicateFunc

IsTypeSet method check if the Type field of PoolExpansion object is set.

func IsVdevListSet

func IsVdevListSet() PredicateFunc

IsVdevListSet method check if the VdevList field of PoolExpansion object is set.

Jump to

Keyboard shortcuts

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