dataprotection

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrueValue = "true"

	DPEnvRestoreKeyPatterns     = "DP_RESTORE_KEY_PATTERNS"
	DPEnvRestoreKeyIgnoreErrors = "DP_RESTORE_KEY_IGNORE_ERRORS"
)

Variables

This section is empty.

Functions

func DescribeBackupPolicies added in v1.0.0

func DescribeBackupPolicies(o *DescribeDPOptions, bpNames []string) error

func DescribeBackups added in v1.0.0

func DescribeBackups(o *DescribeDPOptions, backupNames []string) error

func DescribeRestores added in v1.0.0

func DescribeRestores(o *DescribeDPOptions, restoreNames []string) error

func GetBackupByName added in v1.0.0

func GetBackupByName(dynamic dynamic.Interface, name string, namespace string) (*dpv1alpha1.Backup, error)

func NewDataProtectionCmd

func NewDataProtectionCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

func PrintBackupList added in v1.0.0

func PrintBackupList(o *action.ListOptions) error

func PrintBackupObjDescribe added in v1.0.0

func PrintBackupObjDescribe(o *DescribeDPOptions, obj *dpv1alpha1.Backup) error

func PrintBackupPolicyDescribe added in v1.0.0

func PrintBackupPolicyDescribe(o *DescribeDPOptions, obj *dpv1alpha1.BackupPolicy)

func PrintBackupPolicyList added in v1.0.0

func PrintBackupPolicyList(o *action.ListOptions) error

PrintBackupPolicyList prints the backup policy list.

func PrintRestoreDescribe added in v1.0.0

func PrintRestoreDescribe(o *DescribeDPOptions, obj *dpv1alpha1.Restore) error

func PrintRestoreList added in v1.0.0

func PrintRestoreList(o *action.ListOptions) error

Types

type CreateBackupOptions added in v1.0.0

type CreateBackupOptions struct {
	BackupSpec     opsv1alpha1.Backup `json:"backupSpec"`
	ClusterName    string             `json:"clusterName"`
	OpsType        string             `json:"opsType"`
	OpsRequestName string             `json:"opsRequestName"`
	Force          bool               `json:"force"`

	action.CreateOptions `json:"-"`
}

func (*CreateBackupOptions) CompleteBackup added in v1.0.0

func (o *CreateBackupOptions) CompleteBackup() error

func (*CreateBackupOptions) RegisterBackupFlagCompletionFunc added in v1.0.0

func (o *CreateBackupOptions) RegisterBackupFlagCompletionFunc(cmd *cobra.Command, f cmdutil.Factory)

func (*CreateBackupOptions) Validate added in v1.0.0

func (o *CreateBackupOptions) Validate() error

type CreateRestoreOptions added in v1.0.0

type CreateRestoreOptions struct {
	RestoreSpec    opsv1alpha1.Restore `json:"restoreSpec"`
	ClusterName    string              `json:"clusterName"`
	OpsType        string              `json:"opsType"`
	OpsRequestName string              `json:"opsRequestName"`
	Force          bool                `json:"force"`

	action.CreateOptions `json:"-"`
}

func (*CreateRestoreOptions) Validate added in v1.0.0

func (o *CreateRestoreOptions) Validate() error

type DescribeDPOptions added in v1.0.0

type DescribeDPOptions struct {
	Factory   cmdutil.Factory
	Client    clientset.Interface
	Dynamic   dynamic.Interface
	Namespace string
	Names     []string

	// resource type and names
	Gvr schema.GroupVersionResource

	genericiooptions.IOStreams
}

func (*DescribeDPOptions) Complete added in v1.0.0

func (o *DescribeDPOptions) Complete() error

func (*DescribeDPOptions) GetObjListByArgs added in v1.0.0

func (o *DescribeDPOptions) GetObjListByArgs(args []string) (*unstructured.UnstructuredList, error)

func (*DescribeDPOptions) Validate added in v1.0.0

func (o *DescribeDPOptions) Validate(args []string) error

func (*DescribeDPOptions) ValidateForClusterCmd added in v1.0.0

func (o *DescribeDPOptions) ValidateForClusterCmd(args []string) error

type EditBackupPolicyOptions added in v1.0.0

type EditBackupPolicyOptions struct {
	Namespace string
	Name      string
	Dynamic   dynamic.Interface
	Client    clientset.Interface
	Factory   cmdutil.Factory

	GVR schema.GroupVersionResource
	genericiooptions.IOStreams
}

func (*EditBackupPolicyOptions) Complete added in v1.0.0

func (o *EditBackupPolicyOptions) Complete(args []string) error

func (*EditBackupPolicyOptions) RunEditBackupPolicy added in v1.0.0

func (o *EditBackupPolicyOptions) RunEditBackupPolicy() error

Jump to

Keyboard shortcuts

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