vcreate

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PredicateFunc

type PredicateFunc func(*VolumeCreate) bool

PredicateFunc defines data-type for validation function

func IsBlockSizeSet

func IsBlockSizeSet() PredicateFunc

IsBlockSizeSet method check if the BlockSize field of VolumeCreate object is set.

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsCreateParentSet

func IsCreateParentSet() PredicateFunc

IsCreateParentSet method check if the CreateParent field of VolumeCreate object is set.

func IsNameSet

func IsNameSet() PredicateFunc

IsNameSet method check if the Name field of VolumeCreate object is set.

func IsPropertySet

func IsPropertySet() PredicateFunc

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

func IsReservationSet

func IsReservationSet() PredicateFunc

IsReservationSet method check if the Reservation field of VolumeCreate object is set.

func IsSizeSet

func IsSizeSet() PredicateFunc

IsSizeSet method check if the Size field of VolumeCreate object is set.

type VolumeCreate

type VolumeCreate struct {
	//name of dataset
	Name string

	//size of dataset
	Size string

	//blocksize of dataset
	BlockSize string

	//property for dataset
	Property []string

	//enable reservation for dataset
	Reservation bool

	//createall the non-existing parent datasets
	CreateParent bool

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

VolumeCreate defines structure for volume 'Create' operation

func NewVolumeCreate

func NewVolumeCreate() *VolumeCreate

NewVolumeCreate returns new instance of object VolumeCreate

func (*VolumeCreate) Build

func (v *VolumeCreate) Build() (*VolumeCreate, error)

Build returns the VolumeCreate object generated by builder

func (*VolumeCreate) Execute

func (v *VolumeCreate) Execute() ([]byte, error)

Execute is to execute generated VolumeCreate object

func (*VolumeCreate) SetBlockSize

func (v *VolumeCreate) SetBlockSize(BlockSize string)

SetBlockSize method set the BlockSize field of VolumeCreate object.

func (*VolumeCreate) SetCommand

func (v *VolumeCreate) SetCommand(Command string)

SetCommand method set the Command field of VolumeCreate object.

func (*VolumeCreate) SetCreateParent

func (v *VolumeCreate) SetCreateParent(CreateParent bool)

SetCreateParent method set the CreateParent field of VolumeCreate object.

func (*VolumeCreate) SetName

func (v *VolumeCreate) SetName(Name string)

SetName method set the Name field of VolumeCreate object.

func (*VolumeCreate) SetProperty

func (v *VolumeCreate) SetProperty(key, value string)

SetProperty method set the Property field of VolumeCreate object.

func (*VolumeCreate) SetReservation

func (v *VolumeCreate) SetReservation(Reservation bool)

SetReservation method set the Reservation field of VolumeCreate object.

func (*VolumeCreate) SetSize

func (v *VolumeCreate) SetSize(Size string)

SetSize method set the Size field of VolumeCreate object.

func (*VolumeCreate) Validate

func (v *VolumeCreate) Validate() *VolumeCreate

Validate is to validate generated VolumeCreate object by builder

func (*VolumeCreate) WithBlockSize

func (v *VolumeCreate) WithBlockSize(BlockSize string) *VolumeCreate

WithBlockSize method fills the BlockSize field of VolumeCreate object.

func (*VolumeCreate) WithCheck

func (v *VolumeCreate) WithCheck(check ...PredicateFunc) *VolumeCreate

WithCheck add given check to checks list

func (*VolumeCreate) WithCommand

func (v *VolumeCreate) WithCommand(Command string) *VolumeCreate

WithCommand method fills the Command field of VolumeCreate object.

func (*VolumeCreate) WithCreateParent

func (v *VolumeCreate) WithCreateParent(CreateParent bool) *VolumeCreate

WithCreateParent method fills the CreateParent field of VolumeCreate object.

func (*VolumeCreate) WithName

func (v *VolumeCreate) WithName(Name string) *VolumeCreate

WithName method fills the Name field of VolumeCreate object.

func (*VolumeCreate) WithProperty

func (v *VolumeCreate) WithProperty(key, value string) *VolumeCreate

WithProperty method fills the Property field of VolumeCreate object.

func (*VolumeCreate) WithReservation

func (v *VolumeCreate) WithReservation(Reservation bool) *VolumeCreate

WithReservation method fills the Reservation field of VolumeCreate object.

func (*VolumeCreate) WithSize

func (v *VolumeCreate) WithSize(Size string) *VolumeCreate

WithSize method fills the Size field of VolumeCreate object.

Jump to

Keyboard shortcuts

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