pexport

package
v0.0.0-...-a88c85e Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolExport

type PoolExport struct {
	// all pools
	AllPool bool

	//forcefully export
	Forcefully bool

	//list of pool to be exported
	PoolList []string

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

PoolExport defines structure for pool 'Export' operation

func NewPoolExport

func NewPoolExport() *PoolExport

NewPoolExport returns new instance of object PoolExport

func (*PoolExport) Build

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

Build returns the PoolExport object generated by builder

func (*PoolExport) Execute

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

Execute is to execute generated PoolExport object

func (*PoolExport) GetAllPool

func (p *PoolExport) GetAllPool() bool

GetAllPool method get the AllPool field of PoolExport object.

func (*PoolExport) GetCommand

func (p *PoolExport) GetCommand() string

GetCommand method get the Command field of PoolExport object.

func (*PoolExport) GetForcefully

func (p *PoolExport) GetForcefully() bool

GetForcefully method get the Forcefully field of PoolExport object.

func (*PoolExport) GetPoolList

func (p *PoolExport) GetPoolList() []string

GetPoolList method get the PoolList field of PoolExport object.

func (*PoolExport) SetAllPool

func (p *PoolExport) SetAllPool(AllPool bool)

SetAllPool method set the AllPool field of PoolExport object.

func (*PoolExport) SetCommand

func (p *PoolExport) SetCommand(Command string)

SetCommand method set the Command field of PoolExport object.

func (*PoolExport) SetForcefully

func (p *PoolExport) SetForcefully(Forcefully bool)

SetForcefully method set the Forcefully field of PoolExport object.

func (*PoolExport) SetPoolList

func (p *PoolExport) SetPoolList(pool string)

SetPoolList method append the pool to PoolList field of PoolExport object.

func (*PoolExport) Validate

func (p *PoolExport) Validate() *PoolExport

Validate is to validate generated PoolExport object by builder

func (*PoolExport) WithAllPool

func (p *PoolExport) WithAllPool(AllPool bool) *PoolExport

WithAllPool method fills the AllPool field of PoolExport object.

func (*PoolExport) WithCheck

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

WithCheck add given check to checks list

func (*PoolExport) WithCommand

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

WithCommand method fills the Command field of PoolExport object.

func (*PoolExport) WithForcefully

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

WithForcefully method fills the Forcefully field of PoolExport object.

func (*PoolExport) WithPool

func (p *PoolExport) WithPool(pool string) *PoolExport

WithPool method fills the PoolList field of PoolExport object.

type PredicateFunc

type PredicateFunc func(*PoolExport) bool

PredicateFunc defines data-type for validation function

func IsAllPoolSet

func IsAllPoolSet() PredicateFunc

IsAllPoolSet method check if the AllPool field of PoolExport object is set.

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsForcefullySet

func IsForcefullySet() PredicateFunc

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

func IsPoolListSet

func IsPoolListSet() PredicateFunc

IsPoolListSet method check if the PoolList field of PoolExport object is set.

Jump to

Keyboard shortcuts

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