mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 23:14:17 +00:00
Refactor code to make it easier to add future version.
This commit is contained in:
committed by
Bridget McErlean
parent
b059030666
commit
5c707d20c1
@@ -60,12 +60,43 @@ const (
|
||||
|
||||
// PluginKindDeleteItemActionV2 represents a delete item action plugin version 2.
|
||||
PluginKindDeleteItemActionV2 PluginKind = "DeleteItemActionV2"
|
||||
|
||||
// TODO: we may not need this
|
||||
// PluginKindPluginListerV2 represents a plugin lister plugin version 2.
|
||||
PluginKindPluginListerV2 PluginKind = "PluginListerV2"
|
||||
)
|
||||
|
||||
func ObjectStoreKinds() []PluginKind {
|
||||
return []PluginKind{
|
||||
PluginKindObjectStoreV2,
|
||||
PluginKindObjectStore,
|
||||
}
|
||||
}
|
||||
|
||||
func VolumeSnapshotterKinds() []PluginKind {
|
||||
return []PluginKind{
|
||||
PluginKindVolumeSnapshotterV2,
|
||||
PluginKindVolumeSnapshotter,
|
||||
}
|
||||
}
|
||||
|
||||
func BackupItemActionKinds() []PluginKind {
|
||||
return []PluginKind{
|
||||
PluginKindBackupItemActionV2,
|
||||
PluginKindBackupItemAction,
|
||||
}
|
||||
}
|
||||
|
||||
func RestoreItemActionKinds() []PluginKind {
|
||||
return []PluginKind{
|
||||
PluginKindRestoreItemActionV2,
|
||||
PluginKindRestoreItemAction,
|
||||
}
|
||||
}
|
||||
|
||||
func DeleteItemActionKinds() []PluginKind {
|
||||
return []PluginKind{
|
||||
PluginKindDeleteItemActionV2,
|
||||
PluginKindDeleteItemAction,
|
||||
}
|
||||
}
|
||||
|
||||
// AllPluginKinds contains all the valid plugin kinds that Velero supports, excluding PluginLister because that is not a
|
||||
// kind that a developer would ever need to implement (it's handled by Velero and the Velero plugin library code).
|
||||
func AllPluginKinds() map[string]PluginKind {
|
||||
|
||||
Reference in New Issue
Block a user