vrollback

package
v1.12.1 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 = "rollback"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PredicateFunc

type PredicateFunc func(*VolumeRollback) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

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

func IsDestroySet

func IsDestroySet() PredicateFunc

IsDestroySet method check if the Destroy field of VolumeRollback object is set.

func IsDestroySnapSet

func IsDestroySnapSet() PredicateFunc

IsDestroySnapSet method check if the DestroySnap field of VolumeRollback object is set.

func IsForceUnmountSet

func IsForceUnmountSet() PredicateFunc

IsForceUnmountSet method check if the ForceUnmount field of VolumeRollback object is set.

func IsSnapshotSet

func IsSnapshotSet() PredicateFunc

IsSnapshotSet method check if the Snapshot field of VolumeRollback object is set.

type VolumeRollback

type VolumeRollback struct {
	//destroy any more recent snapshots and bookmarks, as well as any clones of those snapshots
	Destroy bool

	//forceunmount the file-system
	ForceUnmount bool

	//Destroy any snapshots and bookmarks more recent than the one specified.
	DestroySnap bool

	//snapshot name
	Snapshot string

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

VolumeRollback defines structure for volume 'Rollback' operation

func NewVolumeRollback

func NewVolumeRollback() *VolumeRollback

NewVolumeRollback returns new instance of object VolumeRollback

func (*VolumeRollback) Build

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

Build returns the VolumeRollback object generated by builder

func (*VolumeRollback) Execute

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

Execute is to execute generated VolumeRollback object

func (*VolumeRollback) GetCommand

func (v *VolumeRollback) GetCommand() string

GetCommand method get the Command field of VolumeRollback object.

func (*VolumeRollback) GetDestroy

func (v *VolumeRollback) GetDestroy() bool

GetDestroy method get the Destroy field of VolumeRollback object.

func (*VolumeRollback) GetDestroySnap

func (v *VolumeRollback) GetDestroySnap() bool

GetDestroySnap method get the DestroySnap field of VolumeRollback object.

func (*VolumeRollback) GetForceUnmount

func (v *VolumeRollback) GetForceUnmount() bool

GetForceUnmount method get the ForceUnmount field of VolumeRollback object.

func (*VolumeRollback) GetSnapshot

func (v *VolumeRollback) GetSnapshot() string

GetSnapshot method get the Snapshot field of VolumeRollback object.

func (*VolumeRollback) SetCommand

func (v *VolumeRollback) SetCommand(Command string)

SetCommand method set the Command field of VolumeRollback object.

func (*VolumeRollback) SetDestroy

func (v *VolumeRollback) SetDestroy(Destroy bool)

SetDestroy method set the Destroy field of VolumeRollback object.

func (*VolumeRollback) SetDestroySnap

func (v *VolumeRollback) SetDestroySnap(DestroySnap bool)

SetDestroySnap method set the DestroySnap field of VolumeRollback object.

func (*VolumeRollback) SetForceUnmount

func (v *VolumeRollback) SetForceUnmount(ForceUnmount bool)

SetForceUnmount method set the ForceUnmount field of VolumeRollback object.

func (*VolumeRollback) SetSnapshot

func (v *VolumeRollback) SetSnapshot(Snapshot string)

SetSnapshot method set the Snapshot field of VolumeRollback object.

func (*VolumeRollback) Validate

func (v *VolumeRollback) Validate() *VolumeRollback

Validate is to validate generated VolumeRollback object by builder

func (*VolumeRollback) WithCheck

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

WithCheck add given check to checks list

func (*VolumeRollback) WithCommand

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

WithCommand method fills the Command field of VolumeRollback object.

func (*VolumeRollback) WithDestroy

func (v *VolumeRollback) WithDestroy(Destroy bool) *VolumeRollback

WithDestroy method fills the Destroy field of VolumeRollback object.

func (*VolumeRollback) WithDestroySnap

func (v *VolumeRollback) WithDestroySnap(DestroySnap bool) *VolumeRollback

WithDestroySnap method fills the DestroySnap field of VolumeRollback object.

func (*VolumeRollback) WithForceUnmount

func (v *VolumeRollback) WithForceUnmount(ForceUnmount bool) *VolumeRollback

WithForceUnmount method fills the ForceUnmount field of VolumeRollback object.

func (*VolumeRollback) WithSnapshot

func (v *VolumeRollback) WithSnapshot(Snapshot string) *VolumeRollback

WithSnapshot method fills the Snapshot field of VolumeRollback object.

Jump to

Keyboard shortcuts

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