pcreate

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 = "create"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolCreate

type PoolCreate struct {
	// property list
	Property []string
	// file system property list
	FSProperty []string
	// pool name
	Pool string

	// pool type
	Type string

	//vdev list
	Vdev []string

	// force use of vdevs
	Forcefully bool

	// command string
	Command string

	// Executor is to execute the commands
	Executor bin.Executor
	// 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) WithExecutor added in v1.11.0

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

WithExecutor method fills the Executor field of PoolCreate object.

func (*PoolCreate) WithFSProperty

func (p *PoolCreate) WithFSProperty(key, value string) *PoolCreate

WithFSProperty method fills the file system Property 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 IsExecutorSet added in v1.11.0

func IsExecutorSet() PredicateFunc

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

func IsFSPropertySet

func IsFSPropertySet() PredicateFunc

IsFSPropertySet method check if the file system Property 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.

Jump to

Keyboard shortcuts

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