vlistsnap

package
v1.12.1-RC1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type PredicateFunc

type PredicateFunc func(*VolumeListSnapshot) bool

PredicateFunc defines data-type for validation function

func IsDatasetSet

func IsDatasetSet() PredicateFunc

IsDatasetSet method check if the Dataset field of VolumeListSnapshot object is set.

type SnapshotList

type SnapshotList struct {
	Name     string            `json:"name"`
	SnapList map[string]string `json:"snaplist"`
}

SnapshotList is used to convert json format into go structure

type VolumeListSnapshot

type VolumeListSnapshot struct {
	//name of dataset on which snapshot should be taken
	Dataset string

	// Command  command needs to be executed
	Command string
	// contains filtered or unexported fields
}

func NewVolumeListSnapshot

func NewVolumeListSnapshot() *VolumeListSnapshot

NewVolumeListSnapshot initilize the VolumeListSnapshot

func (*VolumeListSnapshot) Build

Build returns the VolumeListSnapshot object generated by builder

func (*VolumeListSnapshot) Execute

func (v *VolumeListSnapshot) Execute() (SnapshotList, error)

Execute is to execute generated VolumeListSnapshot object

func (*VolumeListSnapshot) Validate

func (v *VolumeListSnapshot) Validate() *VolumeListSnapshot

Validate is to validate generated VolumeListSnapshot object by builder

func (*VolumeListSnapshot) WithCheck

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

WithCheck add given check to checks list

func (*VolumeListSnapshot) WithDataset

func (v *VolumeListSnapshot) WithDataset(Dataset string) *VolumeListSnapshot

WithDataset method fills the Dataset field of VolumeListSnapshot object.

Jump to

Keyboard shortcuts

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