pset

package
v1.12.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolSProperty

type PoolSProperty struct {
	//list of property
	PropList []string

	//pool name
	Pool string

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

PoolSProperty defines structure for pool 'set Property' operation

func NewPoolSetProperty

func NewPoolSetProperty() *PoolSProperty

NewPoolSetProperty returns new instance of object PoolSProperty

func (*PoolSProperty) Build

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

Build returns the PoolSProperty object generated by builder

func (*PoolSProperty) Execute

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

Execute is to execute generated PoolSProperty object

func (*PoolSProperty) GetCommand

func (p *PoolSProperty) GetCommand() string

GetCommand method get the Command field of PoolSProperty object.

func (*PoolSProperty) GetPool

func (p *PoolSProperty) GetPool() string

GetPool method get the Pool field of PoolSProperty object.

func (*PoolSProperty) GetPropList

func (p *PoolSProperty) GetPropList() []string

GetPropList method get the PropList field of PoolSProperty object.

func (*PoolSProperty) SetCommand

func (p *PoolSProperty) SetCommand(Command string)

SetCommand method set the Command field of PoolSProperty object.

func (*PoolSProperty) SetPool

func (p *PoolSProperty) SetPool(Pool string)

SetPool method set the Pool field of PoolSProperty object.

func (*PoolSProperty) SetPropList

func (p *PoolSProperty) SetPropList(key, value string)

SetPropList method set the PropList field of PoolSProperty object.

func (*PoolSProperty) Validate

func (p *PoolSProperty) Validate() *PoolSProperty

Validate is to validate generated PoolSProperty object by builder

func (*PoolSProperty) WithCheck

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

WithCheck add given check to checks list

func (*PoolSProperty) WithCommand

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

WithCommand method fills the Command field of PoolSProperty object.

func (*PoolSProperty) WithPool

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

WithPool method fills the Pool field of PoolSProperty object.

func (*PoolSProperty) WithProperty

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

WithProperty method fills the PropList field of PoolSProperty object.

type PredicateFunc

type PredicateFunc func(*PoolSProperty) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsPoolSet

func IsPoolSet() PredicateFunc

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

func IsPropListSet

func IsPropListSet() PredicateFunc

IsPropListSet method check if the PropList field of PoolSProperty object is set.

Jump to

Keyboard shortcuts

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