mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-07-27 18:42:40 +00:00
remove Ark API pkg and generated code
Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
@@ -34,6 +34,6 @@ cd ${GOPATH}/src/k8s.io/code-generator
|
||||
all \
|
||||
github.com/heptio/velero/pkg/generated \
|
||||
github.com/heptio/velero/pkg/apis \
|
||||
"ark:v1 velero:v1" \
|
||||
"velero:v1" \
|
||||
--go-header-file ${GOPATH}/src/github.com/heptio/velero/hack/boilerplate.go.txt \
|
||||
$@
|
||||
|
||||
@@ -1,293 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// BackupSpec defines the specification for an Ark backup.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupSpec struct {
|
||||
// IncludedNamespaces is a slice of namespace names to include objects
|
||||
// from. If empty, all namespaces are included.
|
||||
IncludedNamespaces []string `json:"includedNamespaces"`
|
||||
|
||||
// ExcludedNamespaces contains a list of namespaces that are not
|
||||
// included in the backup.
|
||||
ExcludedNamespaces []string `json:"excludedNamespaces"`
|
||||
|
||||
// IncludedResources is a slice of resource names to include
|
||||
// in the backup. If empty, all resources are included.
|
||||
IncludedResources []string `json:"includedResources"`
|
||||
|
||||
// ExcludedResources is a slice of resource names that are not
|
||||
// included in the backup.
|
||||
ExcludedResources []string `json:"excludedResources"`
|
||||
|
||||
// LabelSelector is a metav1.LabelSelector to filter with
|
||||
// when adding individual objects to the backup. If empty
|
||||
// or nil, all objects are included. Optional.
|
||||
LabelSelector *metav1.LabelSelector `json:"labelSelector"`
|
||||
|
||||
// SnapshotVolumes specifies whether to take cloud snapshots
|
||||
// of any PV's referenced in the set of objects included
|
||||
// in the Backup.
|
||||
SnapshotVolumes *bool `json:"snapshotVolumes,omitempty"`
|
||||
|
||||
// TTL is a time.Duration-parseable string describing how long
|
||||
// the Backup should be retained for.
|
||||
TTL metav1.Duration `json:"ttl"`
|
||||
|
||||
// IncludeClusterResources specifies whether cluster-scoped resources
|
||||
// should be included for consideration in the backup.
|
||||
IncludeClusterResources *bool `json:"includeClusterResources"`
|
||||
|
||||
// Hooks represent custom behaviors that should be executed at different phases of the backup.
|
||||
Hooks BackupHooks `json:"hooks"`
|
||||
|
||||
// StorageLocation is a string containing the name of a BackupStorageLocation where the backup should be stored.
|
||||
StorageLocation string `json:"storageLocation"`
|
||||
|
||||
// VolumeSnapshotLocations is a list containing names of VolumeSnapshotLocations associated with this backup.
|
||||
VolumeSnapshotLocations []string `json:"volumeSnapshotLocations"`
|
||||
}
|
||||
|
||||
// BackupHooks contains custom behaviors that should be executed at different phases of the backup.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupHooks struct {
|
||||
// Resources are hooks that should be executed when backing up individual instances of a resource.
|
||||
Resources []BackupResourceHookSpec `json:"resources"`
|
||||
}
|
||||
|
||||
// BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on
|
||||
// the rules defined for namespaces, resources, and label selector.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupResourceHookSpec struct {
|
||||
// Name is the name of this hook.
|
||||
Name string `json:"name"`
|
||||
// IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies
|
||||
// to all namespaces.
|
||||
IncludedNamespaces []string `json:"includedNamespaces"`
|
||||
// ExcludedNamespaces specifies the namespaces to which this hook spec does not apply.
|
||||
ExcludedNamespaces []string `json:"excludedNamespaces"`
|
||||
// IncludedResources specifies the resources to which this hook spec applies. If empty, it applies
|
||||
// to all resources.
|
||||
IncludedResources []string `json:"includedResources"`
|
||||
// ExcludedResources specifies the resources to which this hook spec does not apply.
|
||||
ExcludedResources []string `json:"excludedResources"`
|
||||
// LabelSelector, if specified, filters the resources to which this hook spec applies.
|
||||
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
|
||||
// Hooks is a list of BackupResourceHooks to execute. DEPRECATED. Replaced by PreHooks.
|
||||
Hooks []BackupResourceHook `json:"hooks"`
|
||||
// PreHooks is a list of BackupResourceHooks to execute prior to storing the item in the backup.
|
||||
// These are executed before any "additional items" from item actions are processed.
|
||||
PreHooks []BackupResourceHook `json:"pre,omitempty"`
|
||||
// PostHooks is a list of BackupResourceHooks to execute after storing the item in the backup.
|
||||
// These are executed after all "additional items" from item actions are processed.
|
||||
PostHooks []BackupResourceHook `json:"post,omitempty"`
|
||||
}
|
||||
|
||||
// BackupResourceHook defines a hook for a resource.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupResourceHook struct {
|
||||
// Exec defines an exec hook.
|
||||
Exec *ExecHook `json:"exec"`
|
||||
}
|
||||
|
||||
// ExecHook is a hook that uses the pod exec API to execute a command in a container in a pod.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ExecHook struct {
|
||||
// Container is the container in the pod where the command should be executed. If not specified,
|
||||
// the pod's first container is used.
|
||||
Container string `json:"container"`
|
||||
// Command is the command and arguments to execute.
|
||||
Command []string `json:"command"`
|
||||
// OnError specifies how Ark should behave if it encounters an error executing this hook.
|
||||
OnError HookErrorMode `json:"onError"`
|
||||
// Timeout defines the maximum amount of time Ark should wait for the hook to complete before
|
||||
// considering the execution a failure.
|
||||
Timeout metav1.Duration `json:"timeout"`
|
||||
}
|
||||
|
||||
// HookErrorMode defines how Ark should treat an error from a hook.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type HookErrorMode string
|
||||
|
||||
const (
|
||||
// HookErrorModeContinue means that an error from a hook is acceptable, and the backup can
|
||||
// proceed.
|
||||
HookErrorModeContinue HookErrorMode = "Continue"
|
||||
// HookErrorModeFail means that an error from a hook is problematic, and the backup should be in
|
||||
// error.
|
||||
HookErrorModeFail HookErrorMode = "Fail"
|
||||
)
|
||||
|
||||
// BackupPhase is a string representation of the lifecycle phase
|
||||
// of an Ark backup.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupPhase string
|
||||
|
||||
const (
|
||||
// BackupPhaseNew means the backup has been created but not
|
||||
// yet processed by the BackupController.
|
||||
BackupPhaseNew BackupPhase = "New"
|
||||
|
||||
// BackupPhaseFailedValidation means the backup has failed
|
||||
// the controller's validations and therefore will not run.
|
||||
BackupPhaseFailedValidation BackupPhase = "FailedValidation"
|
||||
|
||||
// BackupPhaseInProgress means the backup is currently executing.
|
||||
BackupPhaseInProgress BackupPhase = "InProgress"
|
||||
|
||||
// BackupPhaseCompleted means the backup has run successfully without
|
||||
// errors.
|
||||
BackupPhaseCompleted BackupPhase = "Completed"
|
||||
|
||||
// BackupPhaseFailed means the backup ran but encountered an error that
|
||||
// prevented it from completing successfully.
|
||||
BackupPhaseFailed BackupPhase = "Failed"
|
||||
|
||||
// BackupPhaseDeleting means the backup and all its associated data are being deleted.
|
||||
BackupPhaseDeleting BackupPhase = "Deleting"
|
||||
)
|
||||
|
||||
// BackupStatus captures the current status of an Ark backup.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupStatus struct {
|
||||
// Version is the backup format version.
|
||||
Version int `json:"version"`
|
||||
|
||||
// Expiration is when this Backup is eligible for garbage-collection.
|
||||
Expiration metav1.Time `json:"expiration"`
|
||||
|
||||
// Phase is the current state of the Backup.
|
||||
Phase BackupPhase `json:"phase"`
|
||||
|
||||
// VolumeBackups is a map of PersistentVolume names to
|
||||
// information about the backed-up volume in the cloud
|
||||
// provider API.
|
||||
//
|
||||
// Deprecated: this field is considered read-only as of v0.10
|
||||
// and will be removed in a subsequent release. The information
|
||||
// previously contained here is now stored in a file in backup
|
||||
// storage.
|
||||
VolumeBackups map[string]*VolumeBackupInfo `json:"volumeBackups,omitempty"`
|
||||
|
||||
// ValidationErrors is a slice of all validation errors (if
|
||||
// applicable).
|
||||
ValidationErrors []string `json:"validationErrors"`
|
||||
|
||||
// StartTimestamp records the time a backup was started.
|
||||
// Separate from CreationTimestamp, since that value changes
|
||||
// on restores.
|
||||
// The server's time is used for StartTimestamps
|
||||
StartTimestamp metav1.Time `json:"startTimestamp"`
|
||||
|
||||
// CompletionTimestamp records the time a backup was completed.
|
||||
// Completion time is recorded even on failed backups.
|
||||
// Completion time is recorded before uploading the backup object.
|
||||
// The server's time is used for CompletionTimestamps
|
||||
CompletionTimestamp metav1.Time `json:"completionTimestamp"`
|
||||
|
||||
// VolumeSnapshotsAttempted is the total number of attempted
|
||||
// volume snapshots for this backup.
|
||||
VolumeSnapshotsAttempted int `json:"volumeSnapshotsAttempted"`
|
||||
|
||||
// VolumeSnapshotsCompleted is the total number of successfully
|
||||
// completed volume snapshots for this backup.
|
||||
VolumeSnapshotsCompleted int `json:"volumeSnapshotsCompleted"`
|
||||
}
|
||||
|
||||
// VolumeBackupInfo captures the required information about
|
||||
// a PersistentVolume at backup time to be able to restore
|
||||
// it later.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type VolumeBackupInfo struct {
|
||||
// SnapshotID is the ID of the snapshot taken in the cloud
|
||||
// provider API of this volume.
|
||||
SnapshotID string `json:"snapshotID"`
|
||||
|
||||
// Type is the type of the disk/volume in the cloud provider
|
||||
// API.
|
||||
Type string `json:"type"`
|
||||
|
||||
// AvailabilityZone is the where the volume is provisioned
|
||||
// in the cloud provider.
|
||||
AvailabilityZone string `json:"availabilityZone,omitempty"`
|
||||
|
||||
// Iops is the optional value of provisioned IOPS for the
|
||||
// disk/volume in the cloud provider API.
|
||||
Iops *int64 `json:"iops,omitempty"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Backup is an Ark resource that respresents the capture of Kubernetes
|
||||
// cluster state at a point in time (API objects and associated volume state).
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type Backup struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec BackupSpec `json:"spec"`
|
||||
Status BackupStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// BackupList is a list of Backups.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []Backup `json:"items"`
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// BackupStorageLocation is a location where Ark stores backup objects.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupStorageLocation struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec BackupStorageLocationSpec `json:"spec"`
|
||||
Status BackupStorageLocationStatus `json:"status"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// BackupStorageLocationList is a list of BackupStorageLocations.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupStorageLocationList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []BackupStorageLocation `json:"items"`
|
||||
}
|
||||
|
||||
// StorageType represents the type of storage that a backup location uses.
|
||||
// ObjectStorage must be non-nil, since it is currently the only supported StorageType.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type StorageType struct {
|
||||
ObjectStorage *ObjectStorageLocation `json:"objectStorage,omitempty"`
|
||||
}
|
||||
|
||||
// ObjectStorageLocation specifies the settings necessary to connect to a provider's object storage.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ObjectStorageLocation struct {
|
||||
// Bucket is the bucket to use for object storage.
|
||||
Bucket string `json:"bucket"`
|
||||
|
||||
// Prefix is the path inside a bucket to use for Ark storage. Optional.
|
||||
Prefix string `json:"prefix"`
|
||||
}
|
||||
|
||||
// BackupStorageLocationSpec defines the specification for an Ark BackupStorageLocation.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupStorageLocationSpec struct {
|
||||
// Provider is the provider of the backup storage.
|
||||
Provider string `json:"provider"`
|
||||
|
||||
// Config is for provider-specific configuration fields.
|
||||
Config map[string]string `json:"config"`
|
||||
|
||||
StorageType `json:",inline"`
|
||||
}
|
||||
|
||||
// BackupStorageLocationPhase is the lifecyle phase of an Ark BackupStorageLocation.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupStorageLocationPhase string
|
||||
|
||||
const (
|
||||
// BackupStorageLocationPhaseAvailable means the location is available to read and write from.
|
||||
BackupStorageLocationPhaseAvailable BackupStorageLocationPhase = "Available"
|
||||
|
||||
// BackupStorageLocationPhaseUnavailable means the location is unavailable to read and write from.
|
||||
BackupStorageLocationPhaseUnavailable BackupStorageLocationPhase = "Unavailable"
|
||||
)
|
||||
|
||||
// BackupStorageLocationAccessMode represents the permissions for a BackupStorageLocation.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupStorageLocationAccessMode string
|
||||
|
||||
const (
|
||||
// BackupStorageLocationAccessModeReadOnly represents read-only access to a BackupStorageLocation.
|
||||
BackupStorageLocationAccessModeReadOnly BackupStorageLocationAccessMode = "ReadOnly"
|
||||
|
||||
// BackupStorageLocationAccessModeReadWrite represents read and write access to a BackupStorageLocation.
|
||||
BackupStorageLocationAccessModeReadWrite BackupStorageLocationAccessMode = "ReadWrite"
|
||||
)
|
||||
|
||||
// BackupStorageLocationStatus describes the current status of an Ark BackupStorageLocation.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type BackupStorageLocationStatus struct {
|
||||
Phase BackupStorageLocationPhase `json:"phase,omitempty"`
|
||||
AccessMode BackupStorageLocationAccessMode `json:"accessMode,omitempty"`
|
||||
LastSyncedRevision types.UID `json:"lastSyncedRevision,omitempty"`
|
||||
LastSyncedTime metav1.Time `json:"lastSyncedTime,omitempty"`
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
const (
|
||||
// DefaultNamespace is the Kubernetes namespace that is used by default for
|
||||
// the Ark server and API objects.
|
||||
DefaultNamespace = "heptio-ark"
|
||||
|
||||
// ResourcesDir is a top-level directory expected in backups which contains sub-directories
|
||||
// for each resource type in the backup.
|
||||
ResourcesDir = "resources"
|
||||
|
||||
// MetadataDir is a top-level directory expected in backups which contains
|
||||
// files that store metadata about the backup, such as the backup version.
|
||||
MetadataDir = "metadata"
|
||||
|
||||
// RestoreLabelKey is the label key that's applied to all resources that
|
||||
// are created during a restore. This is applied for ease of identification
|
||||
// of restored resources. The value will be the restore's name.
|
||||
//
|
||||
// This label is DEPRECATED as of v0.10 and will be removed entirely as of
|
||||
// v1.0 and replaced with RestoreNameLabel ("ark.heptio.com/restore-name").
|
||||
RestoreLabelKey = "ark-restore"
|
||||
|
||||
// ClusterScopedDir is the name of the directory containing cluster-scoped
|
||||
// resources within an Ark backup.
|
||||
ClusterScopedDir = "cluster"
|
||||
|
||||
// NamespaceScopedDir is the name of the directory containing namespace-scoped
|
||||
// resource within an Ark backup.
|
||||
NamespaceScopedDir = "namespaces"
|
||||
)
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// DeleteBackupRequestSpec is the specification for which backups to delete.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DeleteBackupRequestSpec struct {
|
||||
BackupName string `json:"backupName"`
|
||||
}
|
||||
|
||||
// DeleteBackupRequestPhase represents the lifecycle phase of a DeleteBackupRequest.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DeleteBackupRequestPhase string
|
||||
|
||||
const (
|
||||
// DeleteBackupRequestPhaseNew means the DeleteBackupRequest has not been processed yet.
|
||||
DeleteBackupRequestPhaseNew DeleteBackupRequestPhase = "New"
|
||||
// DeleteBackupRequestPhaseInProgress means the DeleteBackupRequest is being processed.
|
||||
DeleteBackupRequestPhaseInProgress DeleteBackupRequestPhase = "InProgress"
|
||||
// DeleteBackupRequestPhaseProcessed means the DeleteBackupRequest has been processed.
|
||||
DeleteBackupRequestPhaseProcessed DeleteBackupRequestPhase = "Processed"
|
||||
)
|
||||
|
||||
// DeleteBackupRequestStatus is the current status of a DeleteBackupRequest.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DeleteBackupRequestStatus struct {
|
||||
// Phase is the current state of the DeleteBackupRequest.
|
||||
Phase DeleteBackupRequestPhase `json:"phase"`
|
||||
// Errors contains any errors that were encountered during the deletion process.
|
||||
Errors []string `json:"errors"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// DeleteBackupRequest is a request to delete one or more backups.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DeleteBackupRequest struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec DeleteBackupRequestSpec `json:"spec"`
|
||||
Status DeleteBackupRequestStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// DeleteBackupRequestList is a list of DeleteBackupRequests.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DeleteBackupRequestList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []DeleteBackupRequest `json:"items"`
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
|
||||
// Package v1 is the v1 version of the API.
|
||||
// +groupName=ark.heptio.com
|
||||
//
|
||||
// Deprecated: Consumers should switch to github.com/heptio/velero/pkg/apis/velero/v1 instead.
|
||||
// This package will be removed in the v1.0 release.
|
||||
package v1
|
||||
@@ -1,117 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// DownloadRequestSpec is the specification for a download request.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DownloadRequestSpec struct {
|
||||
// Target is what to download (e.g. logs for a backup).
|
||||
Target DownloadTarget `json:"target"`
|
||||
}
|
||||
|
||||
// DownloadTargetKind represents what type of file to download.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DownloadTargetKind string
|
||||
|
||||
const (
|
||||
DownloadTargetKindBackupLog DownloadTargetKind = "BackupLog"
|
||||
DownloadTargetKindBackupContents DownloadTargetKind = "BackupContents"
|
||||
DownloadTargetKindBackupVolumeSnapshots DownloadTargetKind = "BackupVolumeSnapshots"
|
||||
DownloadTargetKindRestoreLog DownloadTargetKind = "RestoreLog"
|
||||
DownloadTargetKindRestoreResults DownloadTargetKind = "RestoreResults"
|
||||
)
|
||||
|
||||
// DownloadTarget is the specification for what kind of file to download, and the name of the
|
||||
// resource with which it's associated.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DownloadTarget struct {
|
||||
// Kind is the type of file to download.
|
||||
Kind DownloadTargetKind `json:"kind"`
|
||||
// Name is the name of the kubernetes resource with which the file is associated.
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// DownloadRequestPhase represents the lifecycle phase of a DownloadRequest.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DownloadRequestPhase string
|
||||
|
||||
const (
|
||||
// DownloadRequestPhaseNew means the DownloadRequest has not been processed by the
|
||||
// DownloadRequestController yet.
|
||||
DownloadRequestPhaseNew DownloadRequestPhase = "New"
|
||||
// DownloadRequestPhaseProcessed means the DownloadRequest has been processed by the
|
||||
// DownloadRequestController.
|
||||
DownloadRequestPhaseProcessed DownloadRequestPhase = "Processed"
|
||||
)
|
||||
|
||||
// DownloadRequestStatus is the current status of a DownloadRequest.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DownloadRequestStatus struct {
|
||||
// Phase is the current state of the DownloadRequest.
|
||||
Phase DownloadRequestPhase `json:"phase"`
|
||||
// DownloadURL contains the pre-signed URL for the target file.
|
||||
DownloadURL string `json:"downloadURL"`
|
||||
// Expiration is when this DownloadRequest expires and can be deleted by the system.
|
||||
Expiration metav1.Time `json:"expiration"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// DownloadRequest is a request to download an artifact from backup object storage, such as a backup
|
||||
// log file.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DownloadRequest struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec DownloadRequestSpec `json:"spec"`
|
||||
Status DownloadRequestStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// DownloadRequestList is a list of DownloadRequests.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type DownloadRequestList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []DownloadRequest `json:"items"`
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
const (
|
||||
// BackupNameLabel is the label key used to identify a backup by name.
|
||||
BackupNameLabel = "ark.heptio.com/backup-name"
|
||||
|
||||
// BackupUIDLabel is the label key used to identify a backup by uid.
|
||||
BackupUIDLabel = "ark.heptio.com/backup-uid"
|
||||
|
||||
// RestoreNameLabel is the label key used to identify a restore by name.
|
||||
RestoreNameLabel = "ark.heptio.com/restore-name"
|
||||
|
||||
// RestoreUIDLabel is the label key used to identify a restore by uid.
|
||||
RestoreUIDLabel = "ark.heptio.com/restore-uid"
|
||||
|
||||
// PodUIDLabel is the label key used to identify a pod by uid.
|
||||
PodUIDLabel = "ark.heptio.com/pod-uid"
|
||||
|
||||
// PodVolumeOperationTimeoutAnnotation is the annotation key used to apply
|
||||
// a backup/restore-specific timeout value for pod volume operations (i.e.
|
||||
// restic backups/restores).
|
||||
PodVolumeOperationTimeoutAnnotation = "ark.heptio.com/pod-volume-timeout"
|
||||
|
||||
// StorageLocationLabel is the label key used to identify the storage
|
||||
// location of a backup.
|
||||
StorageLocationLabel = "ark.heptio.com/storage-location"
|
||||
|
||||
// ResticVolumeNamespaceLabel is the label key used to identify which
|
||||
// namespace a restic repository stores pod volume backups for.
|
||||
ResticVolumeNamespaceLabel = "ark.heptio.com/volume-namespace"
|
||||
)
|
||||
@@ -1,110 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1api "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// PodVolumeBackupSpec is the specification for a PodVolumeBackup.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeBackupSpec struct {
|
||||
// Node is the name of the node that the Pod is running on.
|
||||
Node string `json:"node"`
|
||||
|
||||
// Pod is a reference to the pod containing the volume to be backed up.
|
||||
Pod corev1api.ObjectReference `json:"pod"`
|
||||
|
||||
// Volume is the name of the volume within the Pod to be backed
|
||||
// up.
|
||||
Volume string `json:"volume"`
|
||||
|
||||
// BackupStorageLocation is the name of the backup storage location
|
||||
// where the restic repository is stored.
|
||||
BackupStorageLocation string `json:"backupStorageLocation"`
|
||||
|
||||
// RepoIdentifier is the restic repository identifier.
|
||||
RepoIdentifier string `json:"repoIdentifier"`
|
||||
|
||||
// Tags are a map of key-value pairs that should be applied to the
|
||||
// volume backup as tags.
|
||||
Tags map[string]string `json:"tags"`
|
||||
}
|
||||
|
||||
// PodVolumeBackupPhase represents the lifecycle phase of a PodVolumeBackup.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeBackupPhase string
|
||||
|
||||
const (
|
||||
PodVolumeBackupPhaseNew PodVolumeBackupPhase = "New"
|
||||
PodVolumeBackupPhaseInProgress PodVolumeBackupPhase = "InProgress"
|
||||
PodVolumeBackupPhaseCompleted PodVolumeBackupPhase = "Completed"
|
||||
PodVolumeBackupPhaseFailed PodVolumeBackupPhase = "Failed"
|
||||
)
|
||||
|
||||
// PodVolumeBackupStatus is the current status of a PodVolumeBackup.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeBackupStatus struct {
|
||||
// Phase is the current state of the PodVolumeBackup.
|
||||
Phase PodVolumeBackupPhase `json:"phase"`
|
||||
|
||||
// Path is the full path within the controller pod being backed up.
|
||||
Path string `json:"path"`
|
||||
|
||||
// SnapshotID is the identifier for the snapshot of the pod volume.
|
||||
SnapshotID string `json:"snapshotID"`
|
||||
|
||||
// Message is a message about the pod volume backup's status.
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeBackup struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec PodVolumeBackupSpec `json:"spec"`
|
||||
Status PodVolumeBackupStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// PodVolumeBackupList is a list of PodVolumeBackups.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeBackupList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []PodVolumeBackup `json:"items"`
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1api "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// PodVolumeRestoreSpec is the specification for a PodVolumeRestore.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeRestoreSpec struct {
|
||||
// Pod is a reference to the pod containing the volume to be restored.
|
||||
Pod corev1api.ObjectReference `json:"pod"`
|
||||
|
||||
// Volume is the name of the volume within the Pod to be restored.
|
||||
Volume string `json:"volume"`
|
||||
|
||||
// BackupStorageLocation is the name of the backup storage location
|
||||
// where the restic repository is stored.
|
||||
BackupStorageLocation string `json:"backupStorageLocation"`
|
||||
|
||||
// RepoIdentifier is the restic repository identifier.
|
||||
RepoIdentifier string `json:"repoIdentifier"`
|
||||
|
||||
// SnapshotID is the ID of the volume snapshot to be restored.
|
||||
SnapshotID string `json:"snapshotID"`
|
||||
}
|
||||
|
||||
// PodVolumeRestorePhase represents the lifecycle phase of a PodVolumeRestore.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeRestorePhase string
|
||||
|
||||
const (
|
||||
PodVolumeRestorePhaseNew PodVolumeRestorePhase = "New"
|
||||
PodVolumeRestorePhaseInProgress PodVolumeRestorePhase = "InProgress"
|
||||
PodVolumeRestorePhaseCompleted PodVolumeRestorePhase = "Completed"
|
||||
PodVolumeRestorePhaseFailed PodVolumeRestorePhase = "Failed"
|
||||
)
|
||||
|
||||
// PodVolumeRestoreStatus is the current status of a PodVolumeRestore.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeRestoreStatus struct {
|
||||
// Phase is the current state of the PodVolumeRestore.
|
||||
Phase PodVolumeRestorePhase `json:"phase"`
|
||||
|
||||
// Message is a message about the pod volume restore's status.
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeRestore struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec PodVolumeRestoreSpec `json:"spec"`
|
||||
Status PodVolumeRestoreStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// PodVolumeRestoreList is a list of PodVolumeRestores.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type PodVolumeRestoreList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []PodVolumeRestore `json:"items"`
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
var (
|
||||
// SchemeBuilder collects the scheme builder functions for the Ark API
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
|
||||
// AddToScheme applies the SchemeBuilder functions to a specified scheme
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// GroupName is the group name for the Ark API
|
||||
const GroupName = "ark.heptio.com"
|
||||
|
||||
// SchemeGroupVersion is the GroupVersion for the Ark API
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
|
||||
|
||||
// Resource gets an Ark GroupResource for a specified resource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
type typeInfo struct {
|
||||
PluralName string
|
||||
ItemType runtime.Object
|
||||
ItemListType runtime.Object
|
||||
}
|
||||
|
||||
func newTypeInfo(pluralName string, itemType, itemListType runtime.Object) typeInfo {
|
||||
return typeInfo{
|
||||
PluralName: pluralName,
|
||||
ItemType: itemType,
|
||||
ItemListType: itemListType,
|
||||
}
|
||||
}
|
||||
|
||||
// CustomResources returns a map of all custom resources within the Ark
|
||||
// API group, keyed on Kind.
|
||||
func CustomResources() map[string]typeInfo {
|
||||
return map[string]typeInfo{
|
||||
"Backup": newTypeInfo("backups", &Backup{}, &BackupList{}),
|
||||
"Restore": newTypeInfo("restores", &Restore{}, &RestoreList{}),
|
||||
"Schedule": newTypeInfo("schedules", &Schedule{}, &ScheduleList{}),
|
||||
"DownloadRequest": newTypeInfo("downloadrequests", &DownloadRequest{}, &DownloadRequestList{}),
|
||||
"DeleteBackupRequest": newTypeInfo("deletebackuprequests", &DeleteBackupRequest{}, &DeleteBackupRequestList{}),
|
||||
"PodVolumeBackup": newTypeInfo("podvolumebackups", &PodVolumeBackup{}, &PodVolumeBackupList{}),
|
||||
"PodVolumeRestore": newTypeInfo("podvolumerestores", &PodVolumeRestore{}, &PodVolumeRestoreList{}),
|
||||
"ResticRepository": newTypeInfo("resticrepositories", &ResticRepository{}, &ResticRepositoryList{}),
|
||||
"BackupStorageLocation": newTypeInfo("backupstoragelocations", &BackupStorageLocation{}, &BackupStorageLocationList{}),
|
||||
"VolumeSnapshotLocation": newTypeInfo("volumesnapshotlocations", &VolumeSnapshotLocation{}, &VolumeSnapshotLocationList{}),
|
||||
"ServerStatusRequest": newTypeInfo("serverstatusrequests", &ServerStatusRequest{}, &ServerStatusRequestList{}),
|
||||
}
|
||||
}
|
||||
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
for _, typeInfo := range CustomResources() {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion, typeInfo.ItemType, typeInfo.ItemListType)
|
||||
}
|
||||
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// ResticRepositorySpec is the specification for a ResticRepository.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ResticRepositorySpec struct {
|
||||
// VolumeNamespace is the namespace this restic repository contains
|
||||
// pod volume backups for.
|
||||
VolumeNamespace string `json:"volumeNamespace"`
|
||||
|
||||
// BackupStorageLocation is the name of the BackupStorageLocation
|
||||
// that should contain this repository.
|
||||
BackupStorageLocation string `json:"backupStorageLocation"`
|
||||
|
||||
// ResticIdentifier is the full restic-compatible string for identifying
|
||||
// this repository.
|
||||
ResticIdentifier string `json:"resticIdentifier"`
|
||||
|
||||
// MaintenanceFrequency is how often maintenance should be run.
|
||||
MaintenanceFrequency metav1.Duration `json:"maintenanceFrequency"`
|
||||
}
|
||||
|
||||
// ResticRepositoryPhase represents the lifecycle phase of a ResticRepository.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ResticRepositoryPhase string
|
||||
|
||||
const (
|
||||
ResticRepositoryPhaseNew ResticRepositoryPhase = "New"
|
||||
ResticRepositoryPhaseReady ResticRepositoryPhase = "Ready"
|
||||
ResticRepositoryPhaseNotReady ResticRepositoryPhase = "NotReady"
|
||||
)
|
||||
|
||||
// ResticRepositoryStatus is the current status of a ResticRepository.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ResticRepositoryStatus struct {
|
||||
// Phase is the current state of the ResticRepository.
|
||||
Phase ResticRepositoryPhase `json:"phase"`
|
||||
|
||||
// Message is a message about the current status of the ResticRepository.
|
||||
Message string `json:"message"`
|
||||
|
||||
// LastMaintenanceTime is the last time maintenance was run.
|
||||
LastMaintenanceTime metav1.Time `json:"lastMaintenanceTime"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ResticRepository struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec ResticRepositorySpec `json:"spec"`
|
||||
Status ResticRepositoryStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ResticRepositoryList is a list of ResticRepositories.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ResticRepositoryList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []ResticRepository `json:"items"`
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// RestoreSpec defines the specification for an Ark restore.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type RestoreSpec struct {
|
||||
// BackupName is the unique name of the Ark backup to restore
|
||||
// from.
|
||||
BackupName string `json:"backupName"`
|
||||
|
||||
// ScheduleName is the unique name of the Ark schedule to restore
|
||||
// from. If specified, and BackupName is empty, Ark will restore
|
||||
// from the most recent successful backup created from this schedule.
|
||||
ScheduleName string `json:"scheduleName,omitempty"`
|
||||
|
||||
// IncludedNamespaces is a slice of namespace names to include objects
|
||||
// from. If empty, all namespaces are included.
|
||||
IncludedNamespaces []string `json:"includedNamespaces"`
|
||||
|
||||
// ExcludedNamespaces contains a list of namespaces that are not
|
||||
// included in the restore.
|
||||
ExcludedNamespaces []string `json:"excludedNamespaces"`
|
||||
|
||||
// IncludedResources is a slice of resource names to include
|
||||
// in the restore. If empty, all resources in the backup are included.
|
||||
IncludedResources []string `json:"includedResources"`
|
||||
|
||||
// ExcludedResources is a slice of resource names that are not
|
||||
// included in the restore.
|
||||
ExcludedResources []string `json:"excludedResources"`
|
||||
|
||||
// NamespaceMapping is a map of source namespace names
|
||||
// to target namespace names to restore into. Any source
|
||||
// namespaces not included in the map will be restored into
|
||||
// namespaces of the same name.
|
||||
NamespaceMapping map[string]string `json:"namespaceMapping"`
|
||||
|
||||
// LabelSelector is a metav1.LabelSelector to filter with
|
||||
// when restoring individual objects from the backup. If empty
|
||||
// or nil, all objects are included. Optional.
|
||||
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
|
||||
|
||||
// RestorePVs specifies whether to restore all included
|
||||
// PVs from snapshot (via the cloudprovider).
|
||||
RestorePVs *bool `json:"restorePVs,omitempty"`
|
||||
|
||||
// IncludeClusterResources specifies whether cluster-scoped resources
|
||||
// should be included for consideration in the restore. If null, defaults
|
||||
// to true.
|
||||
IncludeClusterResources *bool `json:"includeClusterResources,omitempty"`
|
||||
}
|
||||
|
||||
// RestorePhase is a string representation of the lifecycle phase
|
||||
// of an Ark restore
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type RestorePhase string
|
||||
|
||||
const (
|
||||
// RestorePhaseNew means the restore has been created but not
|
||||
// yet processed by the RestoreController
|
||||
RestorePhaseNew RestorePhase = "New"
|
||||
|
||||
// RestorePhaseFailedValidation means the restore has failed
|
||||
// the controller's validations and therefore will not run.
|
||||
RestorePhaseFailedValidation RestorePhase = "FailedValidation"
|
||||
|
||||
// RestorePhaseInProgress means the restore is currently executing.
|
||||
RestorePhaseInProgress RestorePhase = "InProgress"
|
||||
|
||||
// RestorePhaseCompleted means the restore has finished executing.
|
||||
// Any relevant warnings or errors will be captured in the Status.
|
||||
RestorePhaseCompleted RestorePhase = "Completed"
|
||||
|
||||
// RestorePhaseFailed means the restore was unable to execute.
|
||||
// The failing error is recorded in status.FailureReason.
|
||||
RestorePhaseFailed RestorePhase = "Failed"
|
||||
)
|
||||
|
||||
// RestoreStatus captures the current status of an Ark restore
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type RestoreStatus struct {
|
||||
// Phase is the current state of the Restore
|
||||
Phase RestorePhase `json:"phase"`
|
||||
|
||||
// ValidationErrors is a slice of all validation errors (if
|
||||
// applicable)
|
||||
ValidationErrors []string `json:"validationErrors"`
|
||||
|
||||
// Warnings is a count of all warning messages that were generated during
|
||||
// execution of the restore. The actual warnings are stored in object storage.
|
||||
Warnings int `json:"warnings"`
|
||||
|
||||
// Errors is a count of all error messages that were generated during
|
||||
// execution of the restore. The actual errors are stored in object storage.
|
||||
Errors int `json:"errors"`
|
||||
|
||||
// FailureReason is an error that caused the entire restore to fail.
|
||||
FailureReason string `json:"failureReason"`
|
||||
}
|
||||
|
||||
// RestoreResult is a collection of messages that were generated
|
||||
// during execution of a restore. This will typically store either
|
||||
// warning or error messages.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type RestoreResult struct {
|
||||
// Ark is a slice of messages related to the operation of Ark
|
||||
// itself (for example, messages related to connecting to the
|
||||
// cloud, reading a backup file, etc.)
|
||||
Ark []string `json:"ark"`
|
||||
|
||||
// Cluster is a slice of messages related to restoring cluster-
|
||||
// scoped resources.
|
||||
Cluster []string `json:"cluster"`
|
||||
|
||||
// Namespaces is a map of namespace name to slice of messages
|
||||
// related to restoring namespace-scoped resources.
|
||||
Namespaces map[string][]string `json:"namespaces"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Restore is an Ark resource that represents the application of
|
||||
// resources from an Ark backup to a target Kubernetes cluster.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type Restore struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec RestoreSpec `json:"spec"`
|
||||
Status RestoreStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// RestoreList is a list of Restores.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type RestoreList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []Restore `json:"items"`
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
Copyright 2017 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// ScheduleSpec defines the specification for an Ark schedule
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ScheduleSpec struct {
|
||||
// Template is the definition of the Backup to be run
|
||||
// on the provided schedule
|
||||
Template BackupSpec `json:"template"`
|
||||
|
||||
// Schedule is a Cron expression defining when to run
|
||||
// the Backup.
|
||||
Schedule string `json:"schedule"`
|
||||
}
|
||||
|
||||
// SchedulePhase is a string representation of the lifecycle phase
|
||||
// of an Ark schedule
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type SchedulePhase string
|
||||
|
||||
const (
|
||||
// SchedulePhaseNew means the schedule has been created but not
|
||||
// yet processed by the ScheduleController
|
||||
SchedulePhaseNew SchedulePhase = "New"
|
||||
|
||||
// SchedulePhaseEnabled means the schedule has been validated and
|
||||
// will now be triggering backups according to the schedule spec.
|
||||
SchedulePhaseEnabled SchedulePhase = "Enabled"
|
||||
|
||||
// SchedulePhaseFailedValidation means the schedule has failed
|
||||
// the controller's validations and therefore will not trigger backups.
|
||||
SchedulePhaseFailedValidation SchedulePhase = "FailedValidation"
|
||||
)
|
||||
|
||||
// ScheduleStatus captures the current state of an Ark schedule
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ScheduleStatus struct {
|
||||
// Phase is the current phase of the Schedule
|
||||
Phase SchedulePhase `json:"phase"`
|
||||
|
||||
// LastBackup is the last time a Backup was run for this
|
||||
// Schedule schedule
|
||||
LastBackup metav1.Time `json:"lastBackup"`
|
||||
|
||||
// ValidationErrors is a slice of all validation errors (if
|
||||
// applicable)
|
||||
ValidationErrors []string `json:"validationErrors"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Schedule is an Ark resource that represents a pre-scheduled or
|
||||
// periodic Backup that should be run.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type Schedule struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec ScheduleSpec `json:"spec"`
|
||||
Status ScheduleStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ScheduleList is a list of Schedules.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ScheduleList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []Schedule `json:"items"`
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ServerStatusRequest is a request to access current status information about
|
||||
// the Ark server.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ServerStatusRequest struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec ServerStatusRequestSpec `json:"spec"`
|
||||
Status ServerStatusRequestStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// ServerStatusRequestSpec is the specification for a ServerStatusRequest.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ServerStatusRequestSpec struct {
|
||||
}
|
||||
|
||||
// ServerStatusRequestPhase represents the lifecycle phase of a ServerStatusRequest.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ServerStatusRequestPhase string
|
||||
|
||||
const (
|
||||
// ServerStatusRequestPhaseNew means the ServerStatusRequest has not been processed yet.
|
||||
ServerStatusRequestPhaseNew ServerStatusRequestPhase = "New"
|
||||
// ServerStatusRequestPhaseProcessed means the ServerStatusRequest has been processed.
|
||||
ServerStatusRequestPhaseProcessed ServerStatusRequestPhase = "Processed"
|
||||
)
|
||||
|
||||
// ServerStatusRequestStatus is the current status of a ServerStatusRequest.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ServerStatusRequestStatus struct {
|
||||
// Phase is the current lifecycle phase of the ServerStatusRequest.
|
||||
Phase ServerStatusRequestPhase `json:"phase"`
|
||||
|
||||
// ProcessedTimestamp is when the ServerStatusRequest was processed
|
||||
// by the ServerStatusRequestController.
|
||||
ProcessedTimestamp metav1.Time `json:"processedTimestamp"`
|
||||
|
||||
// ServerVersion is the Ark server version.
|
||||
ServerVersion string `json:"serverVersion"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ServerStatusRequestList is a list of ServerStatusRequests.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type ServerStatusRequestList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []ServerStatusRequest `json:"items"`
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// VolumeSnapshotLocation is a location where Ark stores volume snapshots.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type VolumeSnapshotLocation struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
|
||||
Spec VolumeSnapshotLocationSpec `json:"spec"`
|
||||
Status VolumeSnapshotLocationStatus `json:"status"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// VolumeSnapshotLocationList is a list of VolumeSnapshotLocations.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type VolumeSnapshotLocationList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
Items []VolumeSnapshotLocation `json:"items"`
|
||||
}
|
||||
|
||||
// VolumeSnapshotLocationSpec defines the specification for an Ark VolumeSnapshotLocation.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type VolumeSnapshotLocationSpec struct {
|
||||
// Provider is the provider of the volume storage.
|
||||
Provider string `json:"provider"`
|
||||
|
||||
// Config is for provider-specific configuration fields.
|
||||
Config map[string]string `json:"config"`
|
||||
}
|
||||
|
||||
// VolumeSnapshotLocationPhase is the lifecyle phase of an Ark VolumeSnapshotLocation.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type VolumeSnapshotLocationPhase string
|
||||
|
||||
const (
|
||||
// VolumeSnapshotLocationPhaseAvailable means the location is available to read and write from.
|
||||
VolumeSnapshotLocationPhaseAvailable VolumeSnapshotLocationPhase = "Available"
|
||||
|
||||
// VolumeSnapshotLocationPhaseUnavailable means the location is unavailable to read and write from.
|
||||
VolumeSnapshotLocationPhaseUnavailable VolumeSnapshotLocationPhase = "Unavailable"
|
||||
)
|
||||
|
||||
// VolumeSnapshotLocationStatus describes the current status of an Ark VolumeSnapshotLocation.
|
||||
//
|
||||
// Deprecated: Consumers should switch to the same type in
|
||||
// github.com/heptio/velero/pkg/apis/velero/v1 instead. This
|
||||
// type will be removed in the v1.0 release.
|
||||
type VolumeSnapshotLocationStatus struct {
|
||||
Phase VolumeSnapshotLocationPhase `json:"phase,omitempty"`
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,6 @@ limitations under the License.
|
||||
package versioned
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/generated/clientset/versioned/typed/ark/v1"
|
||||
velerov1 "github.com/heptio/velero/pkg/generated/clientset/versioned/typed/velero/v1"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
@@ -28,9 +27,6 @@ import (
|
||||
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
ArkV1() arkv1.ArkV1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Ark() arkv1.ArkV1Interface
|
||||
VeleroV1() velerov1.VeleroV1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Velero() velerov1.VeleroV1Interface
|
||||
@@ -40,21 +36,9 @@ type Interface interface {
|
||||
// version included in a Clientset.
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
arkV1 *arkv1.ArkV1Client
|
||||
veleroV1 *velerov1.VeleroV1Client
|
||||
}
|
||||
|
||||
// ArkV1 retrieves the ArkV1Client
|
||||
func (c *Clientset) ArkV1() arkv1.ArkV1Interface {
|
||||
return c.arkV1
|
||||
}
|
||||
|
||||
// Deprecated: Ark retrieves the default version of ArkClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Ark() arkv1.ArkV1Interface {
|
||||
return c.arkV1
|
||||
}
|
||||
|
||||
// VeleroV1 retrieves the VeleroV1Client
|
||||
func (c *Clientset) VeleroV1() velerov1.VeleroV1Interface {
|
||||
return c.veleroV1
|
||||
@@ -82,10 +66,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
}
|
||||
var cs Clientset
|
||||
var err error
|
||||
cs.arkV1, err = arkv1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.veleroV1, err = velerov1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -102,7 +82,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
var cs Clientset
|
||||
cs.arkV1 = arkv1.NewForConfigOrDie(c)
|
||||
cs.veleroV1 = velerov1.NewForConfigOrDie(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||
@@ -112,7 +91,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
// New creates a new Clientset for the given RESTClient.
|
||||
func New(c rest.Interface) *Clientset {
|
||||
var cs Clientset
|
||||
cs.arkV1 = arkv1.New(c)
|
||||
cs.veleroV1 = velerov1.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
|
||||
@@ -20,8 +20,6 @@ package fake
|
||||
|
||||
import (
|
||||
clientset "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
arkv1 "github.com/heptio/velero/pkg/generated/clientset/versioned/typed/ark/v1"
|
||||
fakearkv1 "github.com/heptio/velero/pkg/generated/clientset/versioned/typed/ark/v1/fake"
|
||||
velerov1 "github.com/heptio/velero/pkg/generated/clientset/versioned/typed/velero/v1"
|
||||
fakevelerov1 "github.com/heptio/velero/pkg/generated/clientset/versioned/typed/velero/v1/fake"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -73,16 +71,6 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
|
||||
var _ clientset.Interface = &Clientset{}
|
||||
|
||||
// ArkV1 retrieves the ArkV1Client
|
||||
func (c *Clientset) ArkV1() arkv1.ArkV1Interface {
|
||||
return &fakearkv1.FakeArkV1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Ark retrieves the ArkV1Client
|
||||
func (c *Clientset) Ark() arkv1.ArkV1Interface {
|
||||
return &fakearkv1.FakeArkV1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// VeleroV1 retrieves the VeleroV1Client
|
||||
func (c *Clientset) VeleroV1() velerov1.VeleroV1Interface {
|
||||
return &fakevelerov1.FakeVeleroV1{Fake: &c.Fake}
|
||||
|
||||
@@ -19,7 +19,6 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
velerov1 "github.com/heptio/velero/pkg/apis/velero/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -32,7 +31,6 @@ var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
arkv1.AddToScheme,
|
||||
velerov1.AddToScheme,
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ limitations under the License.
|
||||
package scheme
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
velerov1 "github.com/heptio/velero/pkg/apis/velero/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -32,7 +31,6 @@ var Scheme = runtime.NewScheme()
|
||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
arkv1.AddToScheme,
|
||||
velerov1.AddToScheme,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type ArkV1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
BackupsGetter
|
||||
BackupStorageLocationsGetter
|
||||
DeleteBackupRequestsGetter
|
||||
DownloadRequestsGetter
|
||||
PodVolumeBackupsGetter
|
||||
PodVolumeRestoresGetter
|
||||
ResticRepositoriesGetter
|
||||
RestoresGetter
|
||||
SchedulesGetter
|
||||
ServerStatusRequestsGetter
|
||||
VolumeSnapshotLocationsGetter
|
||||
}
|
||||
|
||||
// ArkV1Client is used to interact with features provided by the ark.heptio.com group.
|
||||
type ArkV1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) Backups(namespace string) BackupInterface {
|
||||
return newBackups(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) BackupStorageLocations(namespace string) BackupStorageLocationInterface {
|
||||
return newBackupStorageLocations(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) DeleteBackupRequests(namespace string) DeleteBackupRequestInterface {
|
||||
return newDeleteBackupRequests(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) DownloadRequests(namespace string) DownloadRequestInterface {
|
||||
return newDownloadRequests(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) PodVolumeBackups(namespace string) PodVolumeBackupInterface {
|
||||
return newPodVolumeBackups(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) PodVolumeRestores(namespace string) PodVolumeRestoreInterface {
|
||||
return newPodVolumeRestores(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) ResticRepositories(namespace string) ResticRepositoryInterface {
|
||||
return newResticRepositories(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) Restores(namespace string) RestoreInterface {
|
||||
return newRestores(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) Schedules(namespace string) ScheduleInterface {
|
||||
return newSchedules(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) ServerStatusRequests(namespace string) ServerStatusRequestInterface {
|
||||
return newServerStatusRequests(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ArkV1Client) VolumeSnapshotLocations(namespace string) VolumeSnapshotLocationInterface {
|
||||
return newVolumeSnapshotLocations(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new ArkV1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*ArkV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ArkV1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new ArkV1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *ArkV1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new ArkV1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *ArkV1Client {
|
||||
return &ArkV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *ArkV1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// BackupsGetter has a method to return a BackupInterface.
|
||||
// A group's client should implement this interface.
|
||||
type BackupsGetter interface {
|
||||
Backups(namespace string) BackupInterface
|
||||
}
|
||||
|
||||
// BackupInterface has methods to work with Backup resources.
|
||||
type BackupInterface interface {
|
||||
Create(*v1.Backup) (*v1.Backup, error)
|
||||
Update(*v1.Backup) (*v1.Backup, error)
|
||||
UpdateStatus(*v1.Backup) (*v1.Backup, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.Backup, error)
|
||||
List(opts metav1.ListOptions) (*v1.BackupList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Backup, err error)
|
||||
BackupExpansion
|
||||
}
|
||||
|
||||
// backups implements BackupInterface
|
||||
type backups struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newBackups returns a Backups
|
||||
func newBackups(c *ArkV1Client, namespace string) *backups {
|
||||
return &backups{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the backup, and returns the corresponding backup object, and an error if there is any.
|
||||
func (c *backups) Get(name string, options metav1.GetOptions) (result *v1.Backup, err error) {
|
||||
result = &v1.Backup{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("backups").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Backups that match those selectors.
|
||||
func (c *backups) List(opts metav1.ListOptions) (result *v1.BackupList, err error) {
|
||||
result = &v1.BackupList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("backups").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested backups.
|
||||
func (c *backups) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("backups").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a backup and creates it. Returns the server's representation of the backup, and an error, if there is any.
|
||||
func (c *backups) Create(backup *v1.Backup) (result *v1.Backup, err error) {
|
||||
result = &v1.Backup{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("backups").
|
||||
Body(backup).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a backup and updates it. Returns the server's representation of the backup, and an error, if there is any.
|
||||
func (c *backups) Update(backup *v1.Backup) (result *v1.Backup, err error) {
|
||||
result = &v1.Backup{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("backups").
|
||||
Name(backup.Name).
|
||||
Body(backup).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *backups) UpdateStatus(backup *v1.Backup) (result *v1.Backup, err error) {
|
||||
result = &v1.Backup{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("backups").
|
||||
Name(backup.Name).
|
||||
SubResource("status").
|
||||
Body(backup).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the backup and deletes it. Returns an error if one occurs.
|
||||
func (c *backups) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("backups").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *backups) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("backups").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched backup.
|
||||
func (c *backups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Backup, err error) {
|
||||
result = &v1.Backup{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("backups").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// BackupStorageLocationsGetter has a method to return a BackupStorageLocationInterface.
|
||||
// A group's client should implement this interface.
|
||||
type BackupStorageLocationsGetter interface {
|
||||
BackupStorageLocations(namespace string) BackupStorageLocationInterface
|
||||
}
|
||||
|
||||
// BackupStorageLocationInterface has methods to work with BackupStorageLocation resources.
|
||||
type BackupStorageLocationInterface interface {
|
||||
Create(*v1.BackupStorageLocation) (*v1.BackupStorageLocation, error)
|
||||
Update(*v1.BackupStorageLocation) (*v1.BackupStorageLocation, error)
|
||||
UpdateStatus(*v1.BackupStorageLocation) (*v1.BackupStorageLocation, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.BackupStorageLocation, error)
|
||||
List(opts metav1.ListOptions) (*v1.BackupStorageLocationList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.BackupStorageLocation, err error)
|
||||
BackupStorageLocationExpansion
|
||||
}
|
||||
|
||||
// backupStorageLocations implements BackupStorageLocationInterface
|
||||
type backupStorageLocations struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newBackupStorageLocations returns a BackupStorageLocations
|
||||
func newBackupStorageLocations(c *ArkV1Client, namespace string) *backupStorageLocations {
|
||||
return &backupStorageLocations{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the backupStorageLocation, and returns the corresponding backupStorageLocation object, and an error if there is any.
|
||||
func (c *backupStorageLocations) Get(name string, options metav1.GetOptions) (result *v1.BackupStorageLocation, err error) {
|
||||
result = &v1.BackupStorageLocation{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("backupstoragelocations").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of BackupStorageLocations that match those selectors.
|
||||
func (c *backupStorageLocations) List(opts metav1.ListOptions) (result *v1.BackupStorageLocationList, err error) {
|
||||
result = &v1.BackupStorageLocationList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("backupstoragelocations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested backupStorageLocations.
|
||||
func (c *backupStorageLocations) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("backupstoragelocations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a backupStorageLocation and creates it. Returns the server's representation of the backupStorageLocation, and an error, if there is any.
|
||||
func (c *backupStorageLocations) Create(backupStorageLocation *v1.BackupStorageLocation) (result *v1.BackupStorageLocation, err error) {
|
||||
result = &v1.BackupStorageLocation{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("backupstoragelocations").
|
||||
Body(backupStorageLocation).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a backupStorageLocation and updates it. Returns the server's representation of the backupStorageLocation, and an error, if there is any.
|
||||
func (c *backupStorageLocations) Update(backupStorageLocation *v1.BackupStorageLocation) (result *v1.BackupStorageLocation, err error) {
|
||||
result = &v1.BackupStorageLocation{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("backupstoragelocations").
|
||||
Name(backupStorageLocation.Name).
|
||||
Body(backupStorageLocation).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *backupStorageLocations) UpdateStatus(backupStorageLocation *v1.BackupStorageLocation) (result *v1.BackupStorageLocation, err error) {
|
||||
result = &v1.BackupStorageLocation{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("backupstoragelocations").
|
||||
Name(backupStorageLocation.Name).
|
||||
SubResource("status").
|
||||
Body(backupStorageLocation).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the backupStorageLocation and deletes it. Returns an error if one occurs.
|
||||
func (c *backupStorageLocations) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("backupstoragelocations").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *backupStorageLocations) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("backupstoragelocations").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched backupStorageLocation.
|
||||
func (c *backupStorageLocations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.BackupStorageLocation, err error) {
|
||||
result = &v1.BackupStorageLocation{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("backupstoragelocations").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// DeleteBackupRequestsGetter has a method to return a DeleteBackupRequestInterface.
|
||||
// A group's client should implement this interface.
|
||||
type DeleteBackupRequestsGetter interface {
|
||||
DeleteBackupRequests(namespace string) DeleteBackupRequestInterface
|
||||
}
|
||||
|
||||
// DeleteBackupRequestInterface has methods to work with DeleteBackupRequest resources.
|
||||
type DeleteBackupRequestInterface interface {
|
||||
Create(*v1.DeleteBackupRequest) (*v1.DeleteBackupRequest, error)
|
||||
Update(*v1.DeleteBackupRequest) (*v1.DeleteBackupRequest, error)
|
||||
UpdateStatus(*v1.DeleteBackupRequest) (*v1.DeleteBackupRequest, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.DeleteBackupRequest, error)
|
||||
List(opts metav1.ListOptions) (*v1.DeleteBackupRequestList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DeleteBackupRequest, err error)
|
||||
DeleteBackupRequestExpansion
|
||||
}
|
||||
|
||||
// deleteBackupRequests implements DeleteBackupRequestInterface
|
||||
type deleteBackupRequests struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newDeleteBackupRequests returns a DeleteBackupRequests
|
||||
func newDeleteBackupRequests(c *ArkV1Client, namespace string) *deleteBackupRequests {
|
||||
return &deleteBackupRequests{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the deleteBackupRequest, and returns the corresponding deleteBackupRequest object, and an error if there is any.
|
||||
func (c *deleteBackupRequests) Get(name string, options metav1.GetOptions) (result *v1.DeleteBackupRequest, err error) {
|
||||
result = &v1.DeleteBackupRequest{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("deletebackuprequests").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DeleteBackupRequests that match those selectors.
|
||||
func (c *deleteBackupRequests) List(opts metav1.ListOptions) (result *v1.DeleteBackupRequestList, err error) {
|
||||
result = &v1.DeleteBackupRequestList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("deletebackuprequests").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested deleteBackupRequests.
|
||||
func (c *deleteBackupRequests) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("deletebackuprequests").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a deleteBackupRequest and creates it. Returns the server's representation of the deleteBackupRequest, and an error, if there is any.
|
||||
func (c *deleteBackupRequests) Create(deleteBackupRequest *v1.DeleteBackupRequest) (result *v1.DeleteBackupRequest, err error) {
|
||||
result = &v1.DeleteBackupRequest{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("deletebackuprequests").
|
||||
Body(deleteBackupRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a deleteBackupRequest and updates it. Returns the server's representation of the deleteBackupRequest, and an error, if there is any.
|
||||
func (c *deleteBackupRequests) Update(deleteBackupRequest *v1.DeleteBackupRequest) (result *v1.DeleteBackupRequest, err error) {
|
||||
result = &v1.DeleteBackupRequest{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("deletebackuprequests").
|
||||
Name(deleteBackupRequest.Name).
|
||||
Body(deleteBackupRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *deleteBackupRequests) UpdateStatus(deleteBackupRequest *v1.DeleteBackupRequest) (result *v1.DeleteBackupRequest, err error) {
|
||||
result = &v1.DeleteBackupRequest{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("deletebackuprequests").
|
||||
Name(deleteBackupRequest.Name).
|
||||
SubResource("status").
|
||||
Body(deleteBackupRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the deleteBackupRequest and deletes it. Returns an error if one occurs.
|
||||
func (c *deleteBackupRequests) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("deletebackuprequests").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *deleteBackupRequests) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("deletebackuprequests").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched deleteBackupRequest.
|
||||
func (c *deleteBackupRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DeleteBackupRequest, err error) {
|
||||
result = &v1.DeleteBackupRequest{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("deletebackuprequests").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// DownloadRequestsGetter has a method to return a DownloadRequestInterface.
|
||||
// A group's client should implement this interface.
|
||||
type DownloadRequestsGetter interface {
|
||||
DownloadRequests(namespace string) DownloadRequestInterface
|
||||
}
|
||||
|
||||
// DownloadRequestInterface has methods to work with DownloadRequest resources.
|
||||
type DownloadRequestInterface interface {
|
||||
Create(*v1.DownloadRequest) (*v1.DownloadRequest, error)
|
||||
Update(*v1.DownloadRequest) (*v1.DownloadRequest, error)
|
||||
UpdateStatus(*v1.DownloadRequest) (*v1.DownloadRequest, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.DownloadRequest, error)
|
||||
List(opts metav1.ListOptions) (*v1.DownloadRequestList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DownloadRequest, err error)
|
||||
DownloadRequestExpansion
|
||||
}
|
||||
|
||||
// downloadRequests implements DownloadRequestInterface
|
||||
type downloadRequests struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newDownloadRequests returns a DownloadRequests
|
||||
func newDownloadRequests(c *ArkV1Client, namespace string) *downloadRequests {
|
||||
return &downloadRequests{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the downloadRequest, and returns the corresponding downloadRequest object, and an error if there is any.
|
||||
func (c *downloadRequests) Get(name string, options metav1.GetOptions) (result *v1.DownloadRequest, err error) {
|
||||
result = &v1.DownloadRequest{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("downloadrequests").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DownloadRequests that match those selectors.
|
||||
func (c *downloadRequests) List(opts metav1.ListOptions) (result *v1.DownloadRequestList, err error) {
|
||||
result = &v1.DownloadRequestList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("downloadrequests").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested downloadRequests.
|
||||
func (c *downloadRequests) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("downloadrequests").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a downloadRequest and creates it. Returns the server's representation of the downloadRequest, and an error, if there is any.
|
||||
func (c *downloadRequests) Create(downloadRequest *v1.DownloadRequest) (result *v1.DownloadRequest, err error) {
|
||||
result = &v1.DownloadRequest{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("downloadrequests").
|
||||
Body(downloadRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a downloadRequest and updates it. Returns the server's representation of the downloadRequest, and an error, if there is any.
|
||||
func (c *downloadRequests) Update(downloadRequest *v1.DownloadRequest) (result *v1.DownloadRequest, err error) {
|
||||
result = &v1.DownloadRequest{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("downloadrequests").
|
||||
Name(downloadRequest.Name).
|
||||
Body(downloadRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *downloadRequests) UpdateStatus(downloadRequest *v1.DownloadRequest) (result *v1.DownloadRequest, err error) {
|
||||
result = &v1.DownloadRequest{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("downloadrequests").
|
||||
Name(downloadRequest.Name).
|
||||
SubResource("status").
|
||||
Body(downloadRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the downloadRequest and deletes it. Returns an error if one occurs.
|
||||
func (c *downloadRequests) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("downloadrequests").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *downloadRequests) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("downloadrequests").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched downloadRequest.
|
||||
func (c *downloadRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DownloadRequest, err error) {
|
||||
result = &v1.DownloadRequest{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("downloadrequests").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/generated/clientset/versioned/typed/ark/v1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeArkV1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) Backups(namespace string) v1.BackupInterface {
|
||||
return &FakeBackups{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) BackupStorageLocations(namespace string) v1.BackupStorageLocationInterface {
|
||||
return &FakeBackupStorageLocations{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) DeleteBackupRequests(namespace string) v1.DeleteBackupRequestInterface {
|
||||
return &FakeDeleteBackupRequests{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) DownloadRequests(namespace string) v1.DownloadRequestInterface {
|
||||
return &FakeDownloadRequests{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) PodVolumeBackups(namespace string) v1.PodVolumeBackupInterface {
|
||||
return &FakePodVolumeBackups{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) PodVolumeRestores(namespace string) v1.PodVolumeRestoreInterface {
|
||||
return &FakePodVolumeRestores{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) ResticRepositories(namespace string) v1.ResticRepositoryInterface {
|
||||
return &FakeResticRepositories{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) Restores(namespace string) v1.RestoreInterface {
|
||||
return &FakeRestores{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) Schedules(namespace string) v1.ScheduleInterface {
|
||||
return &FakeSchedules{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) ServerStatusRequests(namespace string) v1.ServerStatusRequestInterface {
|
||||
return &FakeServerStatusRequests{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeArkV1) VolumeSnapshotLocations(namespace string) v1.VolumeSnapshotLocationInterface {
|
||||
return &FakeVolumeSnapshotLocations{c, namespace}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeArkV1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeBackups implements BackupInterface
|
||||
type FakeBackups struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var backupsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "backups"}
|
||||
|
||||
var backupsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Backup"}
|
||||
|
||||
// Get takes name of the backup, and returns the corresponding backup object, and an error if there is any.
|
||||
func (c *FakeBackups) Get(name string, options v1.GetOptions) (result *arkv1.Backup, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(backupsResource, c.ns, name), &arkv1.Backup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Backup), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Backups that match those selectors.
|
||||
func (c *FakeBackups) List(opts v1.ListOptions) (result *arkv1.BackupList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(backupsResource, backupsKind, c.ns, opts), &arkv1.BackupList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.BackupList{ListMeta: obj.(*arkv1.BackupList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.BackupList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested backups.
|
||||
func (c *FakeBackups) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(backupsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a backup and creates it. Returns the server's representation of the backup, and an error, if there is any.
|
||||
func (c *FakeBackups) Create(backup *arkv1.Backup) (result *arkv1.Backup, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(backupsResource, c.ns, backup), &arkv1.Backup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Backup), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a backup and updates it. Returns the server's representation of the backup, and an error, if there is any.
|
||||
func (c *FakeBackups) Update(backup *arkv1.Backup) (result *arkv1.Backup, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(backupsResource, c.ns, backup), &arkv1.Backup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Backup), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeBackups) UpdateStatus(backup *arkv1.Backup) (*arkv1.Backup, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(backupsResource, "status", c.ns, backup), &arkv1.Backup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Backup), err
|
||||
}
|
||||
|
||||
// Delete takes name of the backup and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeBackups) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(backupsResource, c.ns, name), &arkv1.Backup{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeBackups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(backupsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.BackupList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched backup.
|
||||
func (c *FakeBackups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.Backup, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(backupsResource, c.ns, name, data, subresources...), &arkv1.Backup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Backup), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeBackupStorageLocations implements BackupStorageLocationInterface
|
||||
type FakeBackupStorageLocations struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var backupstoragelocationsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "backupstoragelocations"}
|
||||
|
||||
var backupstoragelocationsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "BackupStorageLocation"}
|
||||
|
||||
// Get takes name of the backupStorageLocation, and returns the corresponding backupStorageLocation object, and an error if there is any.
|
||||
func (c *FakeBackupStorageLocations) Get(name string, options v1.GetOptions) (result *arkv1.BackupStorageLocation, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(backupstoragelocationsResource, c.ns, name), &arkv1.BackupStorageLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.BackupStorageLocation), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of BackupStorageLocations that match those selectors.
|
||||
func (c *FakeBackupStorageLocations) List(opts v1.ListOptions) (result *arkv1.BackupStorageLocationList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(backupstoragelocationsResource, backupstoragelocationsKind, c.ns, opts), &arkv1.BackupStorageLocationList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.BackupStorageLocationList{ListMeta: obj.(*arkv1.BackupStorageLocationList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.BackupStorageLocationList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested backupStorageLocations.
|
||||
func (c *FakeBackupStorageLocations) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(backupstoragelocationsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a backupStorageLocation and creates it. Returns the server's representation of the backupStorageLocation, and an error, if there is any.
|
||||
func (c *FakeBackupStorageLocations) Create(backupStorageLocation *arkv1.BackupStorageLocation) (result *arkv1.BackupStorageLocation, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(backupstoragelocationsResource, c.ns, backupStorageLocation), &arkv1.BackupStorageLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.BackupStorageLocation), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a backupStorageLocation and updates it. Returns the server's representation of the backupStorageLocation, and an error, if there is any.
|
||||
func (c *FakeBackupStorageLocations) Update(backupStorageLocation *arkv1.BackupStorageLocation) (result *arkv1.BackupStorageLocation, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(backupstoragelocationsResource, c.ns, backupStorageLocation), &arkv1.BackupStorageLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.BackupStorageLocation), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeBackupStorageLocations) UpdateStatus(backupStorageLocation *arkv1.BackupStorageLocation) (*arkv1.BackupStorageLocation, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(backupstoragelocationsResource, "status", c.ns, backupStorageLocation), &arkv1.BackupStorageLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.BackupStorageLocation), err
|
||||
}
|
||||
|
||||
// Delete takes name of the backupStorageLocation and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeBackupStorageLocations) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(backupstoragelocationsResource, c.ns, name), &arkv1.BackupStorageLocation{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeBackupStorageLocations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(backupstoragelocationsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.BackupStorageLocationList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched backupStorageLocation.
|
||||
func (c *FakeBackupStorageLocations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.BackupStorageLocation, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(backupstoragelocationsResource, c.ns, name, data, subresources...), &arkv1.BackupStorageLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.BackupStorageLocation), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeDeleteBackupRequests implements DeleteBackupRequestInterface
|
||||
type FakeDeleteBackupRequests struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var deletebackuprequestsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "deletebackuprequests"}
|
||||
|
||||
var deletebackuprequestsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "DeleteBackupRequest"}
|
||||
|
||||
// Get takes name of the deleteBackupRequest, and returns the corresponding deleteBackupRequest object, and an error if there is any.
|
||||
func (c *FakeDeleteBackupRequests) Get(name string, options v1.GetOptions) (result *arkv1.DeleteBackupRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(deletebackuprequestsResource, c.ns, name), &arkv1.DeleteBackupRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DeleteBackupRequest), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DeleteBackupRequests that match those selectors.
|
||||
func (c *FakeDeleteBackupRequests) List(opts v1.ListOptions) (result *arkv1.DeleteBackupRequestList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(deletebackuprequestsResource, deletebackuprequestsKind, c.ns, opts), &arkv1.DeleteBackupRequestList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.DeleteBackupRequestList{ListMeta: obj.(*arkv1.DeleteBackupRequestList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.DeleteBackupRequestList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested deleteBackupRequests.
|
||||
func (c *FakeDeleteBackupRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(deletebackuprequestsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a deleteBackupRequest and creates it. Returns the server's representation of the deleteBackupRequest, and an error, if there is any.
|
||||
func (c *FakeDeleteBackupRequests) Create(deleteBackupRequest *arkv1.DeleteBackupRequest) (result *arkv1.DeleteBackupRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(deletebackuprequestsResource, c.ns, deleteBackupRequest), &arkv1.DeleteBackupRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DeleteBackupRequest), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a deleteBackupRequest and updates it. Returns the server's representation of the deleteBackupRequest, and an error, if there is any.
|
||||
func (c *FakeDeleteBackupRequests) Update(deleteBackupRequest *arkv1.DeleteBackupRequest) (result *arkv1.DeleteBackupRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(deletebackuprequestsResource, c.ns, deleteBackupRequest), &arkv1.DeleteBackupRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DeleteBackupRequest), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDeleteBackupRequests) UpdateStatus(deleteBackupRequest *arkv1.DeleteBackupRequest) (*arkv1.DeleteBackupRequest, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(deletebackuprequestsResource, "status", c.ns, deleteBackupRequest), &arkv1.DeleteBackupRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DeleteBackupRequest), err
|
||||
}
|
||||
|
||||
// Delete takes name of the deleteBackupRequest and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeDeleteBackupRequests) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(deletebackuprequestsResource, c.ns, name), &arkv1.DeleteBackupRequest{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeDeleteBackupRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(deletebackuprequestsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.DeleteBackupRequestList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched deleteBackupRequest.
|
||||
func (c *FakeDeleteBackupRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.DeleteBackupRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deletebackuprequestsResource, c.ns, name, data, subresources...), &arkv1.DeleteBackupRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DeleteBackupRequest), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeDownloadRequests implements DownloadRequestInterface
|
||||
type FakeDownloadRequests struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var downloadrequestsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "downloadrequests"}
|
||||
|
||||
var downloadrequestsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "DownloadRequest"}
|
||||
|
||||
// Get takes name of the downloadRequest, and returns the corresponding downloadRequest object, and an error if there is any.
|
||||
func (c *FakeDownloadRequests) Get(name string, options v1.GetOptions) (result *arkv1.DownloadRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(downloadrequestsResource, c.ns, name), &arkv1.DownloadRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DownloadRequest), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DownloadRequests that match those selectors.
|
||||
func (c *FakeDownloadRequests) List(opts v1.ListOptions) (result *arkv1.DownloadRequestList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(downloadrequestsResource, downloadrequestsKind, c.ns, opts), &arkv1.DownloadRequestList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.DownloadRequestList{ListMeta: obj.(*arkv1.DownloadRequestList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.DownloadRequestList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested downloadRequests.
|
||||
func (c *FakeDownloadRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(downloadrequestsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a downloadRequest and creates it. Returns the server's representation of the downloadRequest, and an error, if there is any.
|
||||
func (c *FakeDownloadRequests) Create(downloadRequest *arkv1.DownloadRequest) (result *arkv1.DownloadRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(downloadrequestsResource, c.ns, downloadRequest), &arkv1.DownloadRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DownloadRequest), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a downloadRequest and updates it. Returns the server's representation of the downloadRequest, and an error, if there is any.
|
||||
func (c *FakeDownloadRequests) Update(downloadRequest *arkv1.DownloadRequest) (result *arkv1.DownloadRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(downloadrequestsResource, c.ns, downloadRequest), &arkv1.DownloadRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DownloadRequest), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDownloadRequests) UpdateStatus(downloadRequest *arkv1.DownloadRequest) (*arkv1.DownloadRequest, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(downloadrequestsResource, "status", c.ns, downloadRequest), &arkv1.DownloadRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DownloadRequest), err
|
||||
}
|
||||
|
||||
// Delete takes name of the downloadRequest and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeDownloadRequests) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(downloadrequestsResource, c.ns, name), &arkv1.DownloadRequest{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeDownloadRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(downloadrequestsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.DownloadRequestList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched downloadRequest.
|
||||
func (c *FakeDownloadRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.DownloadRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(downloadrequestsResource, c.ns, name, data, subresources...), &arkv1.DownloadRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.DownloadRequest), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakePodVolumeBackups implements PodVolumeBackupInterface
|
||||
type FakePodVolumeBackups struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var podvolumebackupsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "podvolumebackups"}
|
||||
|
||||
var podvolumebackupsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "PodVolumeBackup"}
|
||||
|
||||
// Get takes name of the podVolumeBackup, and returns the corresponding podVolumeBackup object, and an error if there is any.
|
||||
func (c *FakePodVolumeBackups) Get(name string, options v1.GetOptions) (result *arkv1.PodVolumeBackup, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(podvolumebackupsResource, c.ns, name), &arkv1.PodVolumeBackup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeBackup), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodVolumeBackups that match those selectors.
|
||||
func (c *FakePodVolumeBackups) List(opts v1.ListOptions) (result *arkv1.PodVolumeBackupList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(podvolumebackupsResource, podvolumebackupsKind, c.ns, opts), &arkv1.PodVolumeBackupList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.PodVolumeBackupList{ListMeta: obj.(*arkv1.PodVolumeBackupList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.PodVolumeBackupList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested podVolumeBackups.
|
||||
func (c *FakePodVolumeBackups) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(podvolumebackupsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a podVolumeBackup and creates it. Returns the server's representation of the podVolumeBackup, and an error, if there is any.
|
||||
func (c *FakePodVolumeBackups) Create(podVolumeBackup *arkv1.PodVolumeBackup) (result *arkv1.PodVolumeBackup, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(podvolumebackupsResource, c.ns, podVolumeBackup), &arkv1.PodVolumeBackup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeBackup), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a podVolumeBackup and updates it. Returns the server's representation of the podVolumeBackup, and an error, if there is any.
|
||||
func (c *FakePodVolumeBackups) Update(podVolumeBackup *arkv1.PodVolumeBackup) (result *arkv1.PodVolumeBackup, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(podvolumebackupsResource, c.ns, podVolumeBackup), &arkv1.PodVolumeBackup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeBackup), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakePodVolumeBackups) UpdateStatus(podVolumeBackup *arkv1.PodVolumeBackup) (*arkv1.PodVolumeBackup, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(podvolumebackupsResource, "status", c.ns, podVolumeBackup), &arkv1.PodVolumeBackup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeBackup), err
|
||||
}
|
||||
|
||||
// Delete takes name of the podVolumeBackup and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePodVolumeBackups) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(podvolumebackupsResource, c.ns, name), &arkv1.PodVolumeBackup{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePodVolumeBackups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(podvolumebackupsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.PodVolumeBackupList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podVolumeBackup.
|
||||
func (c *FakePodVolumeBackups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.PodVolumeBackup, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(podvolumebackupsResource, c.ns, name, data, subresources...), &arkv1.PodVolumeBackup{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeBackup), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakePodVolumeRestores implements PodVolumeRestoreInterface
|
||||
type FakePodVolumeRestores struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var podvolumerestoresResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "podvolumerestores"}
|
||||
|
||||
var podvolumerestoresKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "PodVolumeRestore"}
|
||||
|
||||
// Get takes name of the podVolumeRestore, and returns the corresponding podVolumeRestore object, and an error if there is any.
|
||||
func (c *FakePodVolumeRestores) Get(name string, options v1.GetOptions) (result *arkv1.PodVolumeRestore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(podvolumerestoresResource, c.ns, name), &arkv1.PodVolumeRestore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeRestore), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodVolumeRestores that match those selectors.
|
||||
func (c *FakePodVolumeRestores) List(opts v1.ListOptions) (result *arkv1.PodVolumeRestoreList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(podvolumerestoresResource, podvolumerestoresKind, c.ns, opts), &arkv1.PodVolumeRestoreList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.PodVolumeRestoreList{ListMeta: obj.(*arkv1.PodVolumeRestoreList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.PodVolumeRestoreList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested podVolumeRestores.
|
||||
func (c *FakePodVolumeRestores) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(podvolumerestoresResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a podVolumeRestore and creates it. Returns the server's representation of the podVolumeRestore, and an error, if there is any.
|
||||
func (c *FakePodVolumeRestores) Create(podVolumeRestore *arkv1.PodVolumeRestore) (result *arkv1.PodVolumeRestore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(podvolumerestoresResource, c.ns, podVolumeRestore), &arkv1.PodVolumeRestore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeRestore), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a podVolumeRestore and updates it. Returns the server's representation of the podVolumeRestore, and an error, if there is any.
|
||||
func (c *FakePodVolumeRestores) Update(podVolumeRestore *arkv1.PodVolumeRestore) (result *arkv1.PodVolumeRestore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(podvolumerestoresResource, c.ns, podVolumeRestore), &arkv1.PodVolumeRestore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeRestore), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakePodVolumeRestores) UpdateStatus(podVolumeRestore *arkv1.PodVolumeRestore) (*arkv1.PodVolumeRestore, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(podvolumerestoresResource, "status", c.ns, podVolumeRestore), &arkv1.PodVolumeRestore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeRestore), err
|
||||
}
|
||||
|
||||
// Delete takes name of the podVolumeRestore and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePodVolumeRestores) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(podvolumerestoresResource, c.ns, name), &arkv1.PodVolumeRestore{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePodVolumeRestores) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(podvolumerestoresResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.PodVolumeRestoreList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podVolumeRestore.
|
||||
func (c *FakePodVolumeRestores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.PodVolumeRestore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(podvolumerestoresResource, c.ns, name, data, subresources...), &arkv1.PodVolumeRestore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.PodVolumeRestore), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeResticRepositories implements ResticRepositoryInterface
|
||||
type FakeResticRepositories struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var resticrepositoriesResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "resticrepositories"}
|
||||
|
||||
var resticrepositoriesKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "ResticRepository"}
|
||||
|
||||
// Get takes name of the resticRepository, and returns the corresponding resticRepository object, and an error if there is any.
|
||||
func (c *FakeResticRepositories) Get(name string, options v1.GetOptions) (result *arkv1.ResticRepository, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(resticrepositoriesResource, c.ns, name), &arkv1.ResticRepository{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ResticRepository), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResticRepositories that match those selectors.
|
||||
func (c *FakeResticRepositories) List(opts v1.ListOptions) (result *arkv1.ResticRepositoryList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(resticrepositoriesResource, resticrepositoriesKind, c.ns, opts), &arkv1.ResticRepositoryList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.ResticRepositoryList{ListMeta: obj.(*arkv1.ResticRepositoryList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.ResticRepositoryList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resticRepositories.
|
||||
func (c *FakeResticRepositories) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(resticrepositoriesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a resticRepository and creates it. Returns the server's representation of the resticRepository, and an error, if there is any.
|
||||
func (c *FakeResticRepositories) Create(resticRepository *arkv1.ResticRepository) (result *arkv1.ResticRepository, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(resticrepositoriesResource, c.ns, resticRepository), &arkv1.ResticRepository{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ResticRepository), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a resticRepository and updates it. Returns the server's representation of the resticRepository, and an error, if there is any.
|
||||
func (c *FakeResticRepositories) Update(resticRepository *arkv1.ResticRepository) (result *arkv1.ResticRepository, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(resticrepositoriesResource, c.ns, resticRepository), &arkv1.ResticRepository{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ResticRepository), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeResticRepositories) UpdateStatus(resticRepository *arkv1.ResticRepository) (*arkv1.ResticRepository, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(resticrepositoriesResource, "status", c.ns, resticRepository), &arkv1.ResticRepository{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ResticRepository), err
|
||||
}
|
||||
|
||||
// Delete takes name of the resticRepository and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeResticRepositories) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(resticrepositoriesResource, c.ns, name), &arkv1.ResticRepository{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeResticRepositories) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(resticrepositoriesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.ResticRepositoryList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resticRepository.
|
||||
func (c *FakeResticRepositories) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.ResticRepository, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resticrepositoriesResource, c.ns, name, data, subresources...), &arkv1.ResticRepository{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ResticRepository), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeRestores implements RestoreInterface
|
||||
type FakeRestores struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var restoresResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "restores"}
|
||||
|
||||
var restoresKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Restore"}
|
||||
|
||||
// Get takes name of the restore, and returns the corresponding restore object, and an error if there is any.
|
||||
func (c *FakeRestores) Get(name string, options v1.GetOptions) (result *arkv1.Restore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(restoresResource, c.ns, name), &arkv1.Restore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Restore), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Restores that match those selectors.
|
||||
func (c *FakeRestores) List(opts v1.ListOptions) (result *arkv1.RestoreList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(restoresResource, restoresKind, c.ns, opts), &arkv1.RestoreList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.RestoreList{ListMeta: obj.(*arkv1.RestoreList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.RestoreList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested restores.
|
||||
func (c *FakeRestores) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(restoresResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a restore and creates it. Returns the server's representation of the restore, and an error, if there is any.
|
||||
func (c *FakeRestores) Create(restore *arkv1.Restore) (result *arkv1.Restore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(restoresResource, c.ns, restore), &arkv1.Restore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Restore), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a restore and updates it. Returns the server's representation of the restore, and an error, if there is any.
|
||||
func (c *FakeRestores) Update(restore *arkv1.Restore) (result *arkv1.Restore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(restoresResource, c.ns, restore), &arkv1.Restore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Restore), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeRestores) UpdateStatus(restore *arkv1.Restore) (*arkv1.Restore, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(restoresResource, "status", c.ns, restore), &arkv1.Restore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Restore), err
|
||||
}
|
||||
|
||||
// Delete takes name of the restore and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeRestores) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(restoresResource, c.ns, name), &arkv1.Restore{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeRestores) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(restoresResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.RestoreList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched restore.
|
||||
func (c *FakeRestores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.Restore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(restoresResource, c.ns, name, data, subresources...), &arkv1.Restore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Restore), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeSchedules implements ScheduleInterface
|
||||
type FakeSchedules struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var schedulesResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "schedules"}
|
||||
|
||||
var schedulesKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "Schedule"}
|
||||
|
||||
// Get takes name of the schedule, and returns the corresponding schedule object, and an error if there is any.
|
||||
func (c *FakeSchedules) Get(name string, options v1.GetOptions) (result *arkv1.Schedule, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(schedulesResource, c.ns, name), &arkv1.Schedule{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Schedule), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Schedules that match those selectors.
|
||||
func (c *FakeSchedules) List(opts v1.ListOptions) (result *arkv1.ScheduleList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(schedulesResource, schedulesKind, c.ns, opts), &arkv1.ScheduleList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.ScheduleList{ListMeta: obj.(*arkv1.ScheduleList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.ScheduleList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested schedules.
|
||||
func (c *FakeSchedules) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(schedulesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a schedule and creates it. Returns the server's representation of the schedule, and an error, if there is any.
|
||||
func (c *FakeSchedules) Create(schedule *arkv1.Schedule) (result *arkv1.Schedule, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(schedulesResource, c.ns, schedule), &arkv1.Schedule{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Schedule), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a schedule and updates it. Returns the server's representation of the schedule, and an error, if there is any.
|
||||
func (c *FakeSchedules) Update(schedule *arkv1.Schedule) (result *arkv1.Schedule, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(schedulesResource, c.ns, schedule), &arkv1.Schedule{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Schedule), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeSchedules) UpdateStatus(schedule *arkv1.Schedule) (*arkv1.Schedule, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(schedulesResource, "status", c.ns, schedule), &arkv1.Schedule{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Schedule), err
|
||||
}
|
||||
|
||||
// Delete takes name of the schedule and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeSchedules) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(schedulesResource, c.ns, name), &arkv1.Schedule{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeSchedules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(schedulesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.ScheduleList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched schedule.
|
||||
func (c *FakeSchedules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.Schedule, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(schedulesResource, c.ns, name, data, subresources...), &arkv1.Schedule{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.Schedule), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeServerStatusRequests implements ServerStatusRequestInterface
|
||||
type FakeServerStatusRequests struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var serverstatusrequestsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "serverstatusrequests"}
|
||||
|
||||
var serverstatusrequestsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "ServerStatusRequest"}
|
||||
|
||||
// Get takes name of the serverStatusRequest, and returns the corresponding serverStatusRequest object, and an error if there is any.
|
||||
func (c *FakeServerStatusRequests) Get(name string, options v1.GetOptions) (result *arkv1.ServerStatusRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(serverstatusrequestsResource, c.ns, name), &arkv1.ServerStatusRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ServerStatusRequest), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ServerStatusRequests that match those selectors.
|
||||
func (c *FakeServerStatusRequests) List(opts v1.ListOptions) (result *arkv1.ServerStatusRequestList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(serverstatusrequestsResource, serverstatusrequestsKind, c.ns, opts), &arkv1.ServerStatusRequestList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.ServerStatusRequestList{ListMeta: obj.(*arkv1.ServerStatusRequestList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.ServerStatusRequestList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested serverStatusRequests.
|
||||
func (c *FakeServerStatusRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(serverstatusrequestsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a serverStatusRequest and creates it. Returns the server's representation of the serverStatusRequest, and an error, if there is any.
|
||||
func (c *FakeServerStatusRequests) Create(serverStatusRequest *arkv1.ServerStatusRequest) (result *arkv1.ServerStatusRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(serverstatusrequestsResource, c.ns, serverStatusRequest), &arkv1.ServerStatusRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ServerStatusRequest), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a serverStatusRequest and updates it. Returns the server's representation of the serverStatusRequest, and an error, if there is any.
|
||||
func (c *FakeServerStatusRequests) Update(serverStatusRequest *arkv1.ServerStatusRequest) (result *arkv1.ServerStatusRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(serverstatusrequestsResource, c.ns, serverStatusRequest), &arkv1.ServerStatusRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ServerStatusRequest), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeServerStatusRequests) UpdateStatus(serverStatusRequest *arkv1.ServerStatusRequest) (*arkv1.ServerStatusRequest, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(serverstatusrequestsResource, "status", c.ns, serverStatusRequest), &arkv1.ServerStatusRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ServerStatusRequest), err
|
||||
}
|
||||
|
||||
// Delete takes name of the serverStatusRequest and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeServerStatusRequests) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(serverstatusrequestsResource, c.ns, name), &arkv1.ServerStatusRequest{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeServerStatusRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(serverstatusrequestsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.ServerStatusRequestList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched serverStatusRequest.
|
||||
func (c *FakeServerStatusRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.ServerStatusRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(serverstatusrequestsResource, c.ns, name, data, subresources...), &arkv1.ServerStatusRequest{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.ServerStatusRequest), err
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeVolumeSnapshotLocations implements VolumeSnapshotLocationInterface
|
||||
type FakeVolumeSnapshotLocations struct {
|
||||
Fake *FakeArkV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var volumesnapshotlocationsResource = schema.GroupVersionResource{Group: "ark.heptio.com", Version: "v1", Resource: "volumesnapshotlocations"}
|
||||
|
||||
var volumesnapshotlocationsKind = schema.GroupVersionKind{Group: "ark.heptio.com", Version: "v1", Kind: "VolumeSnapshotLocation"}
|
||||
|
||||
// Get takes name of the volumeSnapshotLocation, and returns the corresponding volumeSnapshotLocation object, and an error if there is any.
|
||||
func (c *FakeVolumeSnapshotLocations) Get(name string, options v1.GetOptions) (result *arkv1.VolumeSnapshotLocation, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(volumesnapshotlocationsResource, c.ns, name), &arkv1.VolumeSnapshotLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.VolumeSnapshotLocation), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeSnapshotLocations that match those selectors.
|
||||
func (c *FakeVolumeSnapshotLocations) List(opts v1.ListOptions) (result *arkv1.VolumeSnapshotLocationList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(volumesnapshotlocationsResource, volumesnapshotlocationsKind, c.ns, opts), &arkv1.VolumeSnapshotLocationList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &arkv1.VolumeSnapshotLocationList{ListMeta: obj.(*arkv1.VolumeSnapshotLocationList).ListMeta}
|
||||
for _, item := range obj.(*arkv1.VolumeSnapshotLocationList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested volumeSnapshotLocations.
|
||||
func (c *FakeVolumeSnapshotLocations) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(volumesnapshotlocationsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeSnapshotLocation and creates it. Returns the server's representation of the volumeSnapshotLocation, and an error, if there is any.
|
||||
func (c *FakeVolumeSnapshotLocations) Create(volumeSnapshotLocation *arkv1.VolumeSnapshotLocation) (result *arkv1.VolumeSnapshotLocation, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(volumesnapshotlocationsResource, c.ns, volumeSnapshotLocation), &arkv1.VolumeSnapshotLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.VolumeSnapshotLocation), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeSnapshotLocation and updates it. Returns the server's representation of the volumeSnapshotLocation, and an error, if there is any.
|
||||
func (c *FakeVolumeSnapshotLocations) Update(volumeSnapshotLocation *arkv1.VolumeSnapshotLocation) (result *arkv1.VolumeSnapshotLocation, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(volumesnapshotlocationsResource, c.ns, volumeSnapshotLocation), &arkv1.VolumeSnapshotLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.VolumeSnapshotLocation), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeVolumeSnapshotLocations) UpdateStatus(volumeSnapshotLocation *arkv1.VolumeSnapshotLocation) (*arkv1.VolumeSnapshotLocation, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(volumesnapshotlocationsResource, "status", c.ns, volumeSnapshotLocation), &arkv1.VolumeSnapshotLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.VolumeSnapshotLocation), err
|
||||
}
|
||||
|
||||
// Delete takes name of the volumeSnapshotLocation and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVolumeSnapshotLocations) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(volumesnapshotlocationsResource, c.ns, name), &arkv1.VolumeSnapshotLocation{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVolumeSnapshotLocations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(volumesnapshotlocationsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &arkv1.VolumeSnapshotLocationList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeSnapshotLocation.
|
||||
func (c *FakeVolumeSnapshotLocations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *arkv1.VolumeSnapshotLocation, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(volumesnapshotlocationsResource, c.ns, name, data, subresources...), &arkv1.VolumeSnapshotLocation{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*arkv1.VolumeSnapshotLocation), err
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
type BackupExpansion interface{}
|
||||
|
||||
type BackupStorageLocationExpansion interface{}
|
||||
|
||||
type DeleteBackupRequestExpansion interface{}
|
||||
|
||||
type DownloadRequestExpansion interface{}
|
||||
|
||||
type PodVolumeBackupExpansion interface{}
|
||||
|
||||
type PodVolumeRestoreExpansion interface{}
|
||||
|
||||
type ResticRepositoryExpansion interface{}
|
||||
|
||||
type RestoreExpansion interface{}
|
||||
|
||||
type ScheduleExpansion interface{}
|
||||
|
||||
type ServerStatusRequestExpansion interface{}
|
||||
|
||||
type VolumeSnapshotLocationExpansion interface{}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// PodVolumeBackupsGetter has a method to return a PodVolumeBackupInterface.
|
||||
// A group's client should implement this interface.
|
||||
type PodVolumeBackupsGetter interface {
|
||||
PodVolumeBackups(namespace string) PodVolumeBackupInterface
|
||||
}
|
||||
|
||||
// PodVolumeBackupInterface has methods to work with PodVolumeBackup resources.
|
||||
type PodVolumeBackupInterface interface {
|
||||
Create(*v1.PodVolumeBackup) (*v1.PodVolumeBackup, error)
|
||||
Update(*v1.PodVolumeBackup) (*v1.PodVolumeBackup, error)
|
||||
UpdateStatus(*v1.PodVolumeBackup) (*v1.PodVolumeBackup, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.PodVolumeBackup, error)
|
||||
List(opts metav1.ListOptions) (*v1.PodVolumeBackupList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodVolumeBackup, err error)
|
||||
PodVolumeBackupExpansion
|
||||
}
|
||||
|
||||
// podVolumeBackups implements PodVolumeBackupInterface
|
||||
type podVolumeBackups struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newPodVolumeBackups returns a PodVolumeBackups
|
||||
func newPodVolumeBackups(c *ArkV1Client, namespace string) *podVolumeBackups {
|
||||
return &podVolumeBackups{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the podVolumeBackup, and returns the corresponding podVolumeBackup object, and an error if there is any.
|
||||
func (c *podVolumeBackups) Get(name string, options metav1.GetOptions) (result *v1.PodVolumeBackup, err error) {
|
||||
result = &v1.PodVolumeBackup{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumebackups").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodVolumeBackups that match those selectors.
|
||||
func (c *podVolumeBackups) List(opts metav1.ListOptions) (result *v1.PodVolumeBackupList, err error) {
|
||||
result = &v1.PodVolumeBackupList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumebackups").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested podVolumeBackups.
|
||||
func (c *podVolumeBackups) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumebackups").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a podVolumeBackup and creates it. Returns the server's representation of the podVolumeBackup, and an error, if there is any.
|
||||
func (c *podVolumeBackups) Create(podVolumeBackup *v1.PodVolumeBackup) (result *v1.PodVolumeBackup, err error) {
|
||||
result = &v1.PodVolumeBackup{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumebackups").
|
||||
Body(podVolumeBackup).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a podVolumeBackup and updates it. Returns the server's representation of the podVolumeBackup, and an error, if there is any.
|
||||
func (c *podVolumeBackups) Update(podVolumeBackup *v1.PodVolumeBackup) (result *v1.PodVolumeBackup, err error) {
|
||||
result = &v1.PodVolumeBackup{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumebackups").
|
||||
Name(podVolumeBackup.Name).
|
||||
Body(podVolumeBackup).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *podVolumeBackups) UpdateStatus(podVolumeBackup *v1.PodVolumeBackup) (result *v1.PodVolumeBackup, err error) {
|
||||
result = &v1.PodVolumeBackup{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumebackups").
|
||||
Name(podVolumeBackup.Name).
|
||||
SubResource("status").
|
||||
Body(podVolumeBackup).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the podVolumeBackup and deletes it. Returns an error if one occurs.
|
||||
func (c *podVolumeBackups) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumebackups").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *podVolumeBackups) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumebackups").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podVolumeBackup.
|
||||
func (c *podVolumeBackups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodVolumeBackup, err error) {
|
||||
result = &v1.PodVolumeBackup{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumebackups").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// PodVolumeRestoresGetter has a method to return a PodVolumeRestoreInterface.
|
||||
// A group's client should implement this interface.
|
||||
type PodVolumeRestoresGetter interface {
|
||||
PodVolumeRestores(namespace string) PodVolumeRestoreInterface
|
||||
}
|
||||
|
||||
// PodVolumeRestoreInterface has methods to work with PodVolumeRestore resources.
|
||||
type PodVolumeRestoreInterface interface {
|
||||
Create(*v1.PodVolumeRestore) (*v1.PodVolumeRestore, error)
|
||||
Update(*v1.PodVolumeRestore) (*v1.PodVolumeRestore, error)
|
||||
UpdateStatus(*v1.PodVolumeRestore) (*v1.PodVolumeRestore, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.PodVolumeRestore, error)
|
||||
List(opts metav1.ListOptions) (*v1.PodVolumeRestoreList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodVolumeRestore, err error)
|
||||
PodVolumeRestoreExpansion
|
||||
}
|
||||
|
||||
// podVolumeRestores implements PodVolumeRestoreInterface
|
||||
type podVolumeRestores struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newPodVolumeRestores returns a PodVolumeRestores
|
||||
func newPodVolumeRestores(c *ArkV1Client, namespace string) *podVolumeRestores {
|
||||
return &podVolumeRestores{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the podVolumeRestore, and returns the corresponding podVolumeRestore object, and an error if there is any.
|
||||
func (c *podVolumeRestores) Get(name string, options metav1.GetOptions) (result *v1.PodVolumeRestore, err error) {
|
||||
result = &v1.PodVolumeRestore{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumerestores").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodVolumeRestores that match those selectors.
|
||||
func (c *podVolumeRestores) List(opts metav1.ListOptions) (result *v1.PodVolumeRestoreList, err error) {
|
||||
result = &v1.PodVolumeRestoreList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumerestores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested podVolumeRestores.
|
||||
func (c *podVolumeRestores) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumerestores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a podVolumeRestore and creates it. Returns the server's representation of the podVolumeRestore, and an error, if there is any.
|
||||
func (c *podVolumeRestores) Create(podVolumeRestore *v1.PodVolumeRestore) (result *v1.PodVolumeRestore, err error) {
|
||||
result = &v1.PodVolumeRestore{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumerestores").
|
||||
Body(podVolumeRestore).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a podVolumeRestore and updates it. Returns the server's representation of the podVolumeRestore, and an error, if there is any.
|
||||
func (c *podVolumeRestores) Update(podVolumeRestore *v1.PodVolumeRestore) (result *v1.PodVolumeRestore, err error) {
|
||||
result = &v1.PodVolumeRestore{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumerestores").
|
||||
Name(podVolumeRestore.Name).
|
||||
Body(podVolumeRestore).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *podVolumeRestores) UpdateStatus(podVolumeRestore *v1.PodVolumeRestore) (result *v1.PodVolumeRestore, err error) {
|
||||
result = &v1.PodVolumeRestore{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumerestores").
|
||||
Name(podVolumeRestore.Name).
|
||||
SubResource("status").
|
||||
Body(podVolumeRestore).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the podVolumeRestore and deletes it. Returns an error if one occurs.
|
||||
func (c *podVolumeRestores) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumerestores").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *podVolumeRestores) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumerestores").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podVolumeRestore.
|
||||
func (c *podVolumeRestores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodVolumeRestore, err error) {
|
||||
result = &v1.PodVolumeRestore{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("podvolumerestores").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ResticRepositoriesGetter has a method to return a ResticRepositoryInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ResticRepositoriesGetter interface {
|
||||
ResticRepositories(namespace string) ResticRepositoryInterface
|
||||
}
|
||||
|
||||
// ResticRepositoryInterface has methods to work with ResticRepository resources.
|
||||
type ResticRepositoryInterface interface {
|
||||
Create(*v1.ResticRepository) (*v1.ResticRepository, error)
|
||||
Update(*v1.ResticRepository) (*v1.ResticRepository, error)
|
||||
UpdateStatus(*v1.ResticRepository) (*v1.ResticRepository, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.ResticRepository, error)
|
||||
List(opts metav1.ListOptions) (*v1.ResticRepositoryList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResticRepository, err error)
|
||||
ResticRepositoryExpansion
|
||||
}
|
||||
|
||||
// resticRepositories implements ResticRepositoryInterface
|
||||
type resticRepositories struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newResticRepositories returns a ResticRepositories
|
||||
func newResticRepositories(c *ArkV1Client, namespace string) *resticRepositories {
|
||||
return &resticRepositories{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the resticRepository, and returns the corresponding resticRepository object, and an error if there is any.
|
||||
func (c *resticRepositories) Get(name string, options metav1.GetOptions) (result *v1.ResticRepository, err error) {
|
||||
result = &v1.ResticRepository{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resticrepositories").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResticRepositories that match those selectors.
|
||||
func (c *resticRepositories) List(opts metav1.ListOptions) (result *v1.ResticRepositoryList, err error) {
|
||||
result = &v1.ResticRepositoryList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resticrepositories").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested resticRepositories.
|
||||
func (c *resticRepositories) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resticrepositories").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a resticRepository and creates it. Returns the server's representation of the resticRepository, and an error, if there is any.
|
||||
func (c *resticRepositories) Create(resticRepository *v1.ResticRepository) (result *v1.ResticRepository, err error) {
|
||||
result = &v1.ResticRepository{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("resticrepositories").
|
||||
Body(resticRepository).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a resticRepository and updates it. Returns the server's representation of the resticRepository, and an error, if there is any.
|
||||
func (c *resticRepositories) Update(resticRepository *v1.ResticRepository) (result *v1.ResticRepository, err error) {
|
||||
result = &v1.ResticRepository{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("resticrepositories").
|
||||
Name(resticRepository.Name).
|
||||
Body(resticRepository).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *resticRepositories) UpdateStatus(resticRepository *v1.ResticRepository) (result *v1.ResticRepository, err error) {
|
||||
result = &v1.ResticRepository{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("resticrepositories").
|
||||
Name(resticRepository.Name).
|
||||
SubResource("status").
|
||||
Body(resticRepository).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the resticRepository and deletes it. Returns an error if one occurs.
|
||||
func (c *resticRepositories) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("resticrepositories").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *resticRepositories) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("resticrepositories").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resticRepository.
|
||||
func (c *resticRepositories) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResticRepository, err error) {
|
||||
result = &v1.ResticRepository{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("resticrepositories").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// RestoresGetter has a method to return a RestoreInterface.
|
||||
// A group's client should implement this interface.
|
||||
type RestoresGetter interface {
|
||||
Restores(namespace string) RestoreInterface
|
||||
}
|
||||
|
||||
// RestoreInterface has methods to work with Restore resources.
|
||||
type RestoreInterface interface {
|
||||
Create(*v1.Restore) (*v1.Restore, error)
|
||||
Update(*v1.Restore) (*v1.Restore, error)
|
||||
UpdateStatus(*v1.Restore) (*v1.Restore, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.Restore, error)
|
||||
List(opts metav1.ListOptions) (*v1.RestoreList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Restore, err error)
|
||||
RestoreExpansion
|
||||
}
|
||||
|
||||
// restores implements RestoreInterface
|
||||
type restores struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newRestores returns a Restores
|
||||
func newRestores(c *ArkV1Client, namespace string) *restores {
|
||||
return &restores{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the restore, and returns the corresponding restore object, and an error if there is any.
|
||||
func (c *restores) Get(name string, options metav1.GetOptions) (result *v1.Restore, err error) {
|
||||
result = &v1.Restore{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("restores").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Restores that match those selectors.
|
||||
func (c *restores) List(opts metav1.ListOptions) (result *v1.RestoreList, err error) {
|
||||
result = &v1.RestoreList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("restores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested restores.
|
||||
func (c *restores) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("restores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a restore and creates it. Returns the server's representation of the restore, and an error, if there is any.
|
||||
func (c *restores) Create(restore *v1.Restore) (result *v1.Restore, err error) {
|
||||
result = &v1.Restore{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("restores").
|
||||
Body(restore).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a restore and updates it. Returns the server's representation of the restore, and an error, if there is any.
|
||||
func (c *restores) Update(restore *v1.Restore) (result *v1.Restore, err error) {
|
||||
result = &v1.Restore{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("restores").
|
||||
Name(restore.Name).
|
||||
Body(restore).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *restores) UpdateStatus(restore *v1.Restore) (result *v1.Restore, err error) {
|
||||
result = &v1.Restore{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("restores").
|
||||
Name(restore.Name).
|
||||
SubResource("status").
|
||||
Body(restore).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the restore and deletes it. Returns an error if one occurs.
|
||||
func (c *restores) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("restores").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *restores) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("restores").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched restore.
|
||||
func (c *restores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Restore, err error) {
|
||||
result = &v1.Restore{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("restores").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// SchedulesGetter has a method to return a ScheduleInterface.
|
||||
// A group's client should implement this interface.
|
||||
type SchedulesGetter interface {
|
||||
Schedules(namespace string) ScheduleInterface
|
||||
}
|
||||
|
||||
// ScheduleInterface has methods to work with Schedule resources.
|
||||
type ScheduleInterface interface {
|
||||
Create(*v1.Schedule) (*v1.Schedule, error)
|
||||
Update(*v1.Schedule) (*v1.Schedule, error)
|
||||
UpdateStatus(*v1.Schedule) (*v1.Schedule, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.Schedule, error)
|
||||
List(opts metav1.ListOptions) (*v1.ScheduleList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Schedule, err error)
|
||||
ScheduleExpansion
|
||||
}
|
||||
|
||||
// schedules implements ScheduleInterface
|
||||
type schedules struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newSchedules returns a Schedules
|
||||
func newSchedules(c *ArkV1Client, namespace string) *schedules {
|
||||
return &schedules{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the schedule, and returns the corresponding schedule object, and an error if there is any.
|
||||
func (c *schedules) Get(name string, options metav1.GetOptions) (result *v1.Schedule, err error) {
|
||||
result = &v1.Schedule{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("schedules").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Schedules that match those selectors.
|
||||
func (c *schedules) List(opts metav1.ListOptions) (result *v1.ScheduleList, err error) {
|
||||
result = &v1.ScheduleList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("schedules").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested schedules.
|
||||
func (c *schedules) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("schedules").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a schedule and creates it. Returns the server's representation of the schedule, and an error, if there is any.
|
||||
func (c *schedules) Create(schedule *v1.Schedule) (result *v1.Schedule, err error) {
|
||||
result = &v1.Schedule{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("schedules").
|
||||
Body(schedule).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a schedule and updates it. Returns the server's representation of the schedule, and an error, if there is any.
|
||||
func (c *schedules) Update(schedule *v1.Schedule) (result *v1.Schedule, err error) {
|
||||
result = &v1.Schedule{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("schedules").
|
||||
Name(schedule.Name).
|
||||
Body(schedule).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *schedules) UpdateStatus(schedule *v1.Schedule) (result *v1.Schedule, err error) {
|
||||
result = &v1.Schedule{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("schedules").
|
||||
Name(schedule.Name).
|
||||
SubResource("status").
|
||||
Body(schedule).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the schedule and deletes it. Returns an error if one occurs.
|
||||
func (c *schedules) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("schedules").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *schedules) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("schedules").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched schedule.
|
||||
func (c *schedules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Schedule, err error) {
|
||||
result = &v1.Schedule{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("schedules").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ServerStatusRequestsGetter has a method to return a ServerStatusRequestInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ServerStatusRequestsGetter interface {
|
||||
ServerStatusRequests(namespace string) ServerStatusRequestInterface
|
||||
}
|
||||
|
||||
// ServerStatusRequestInterface has methods to work with ServerStatusRequest resources.
|
||||
type ServerStatusRequestInterface interface {
|
||||
Create(*v1.ServerStatusRequest) (*v1.ServerStatusRequest, error)
|
||||
Update(*v1.ServerStatusRequest) (*v1.ServerStatusRequest, error)
|
||||
UpdateStatus(*v1.ServerStatusRequest) (*v1.ServerStatusRequest, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.ServerStatusRequest, error)
|
||||
List(opts metav1.ListOptions) (*v1.ServerStatusRequestList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServerStatusRequest, err error)
|
||||
ServerStatusRequestExpansion
|
||||
}
|
||||
|
||||
// serverStatusRequests implements ServerStatusRequestInterface
|
||||
type serverStatusRequests struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newServerStatusRequests returns a ServerStatusRequests
|
||||
func newServerStatusRequests(c *ArkV1Client, namespace string) *serverStatusRequests {
|
||||
return &serverStatusRequests{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the serverStatusRequest, and returns the corresponding serverStatusRequest object, and an error if there is any.
|
||||
func (c *serverStatusRequests) Get(name string, options metav1.GetOptions) (result *v1.ServerStatusRequest, err error) {
|
||||
result = &v1.ServerStatusRequest{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("serverstatusrequests").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ServerStatusRequests that match those selectors.
|
||||
func (c *serverStatusRequests) List(opts metav1.ListOptions) (result *v1.ServerStatusRequestList, err error) {
|
||||
result = &v1.ServerStatusRequestList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("serverstatusrequests").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested serverStatusRequests.
|
||||
func (c *serverStatusRequests) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("serverstatusrequests").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a serverStatusRequest and creates it. Returns the server's representation of the serverStatusRequest, and an error, if there is any.
|
||||
func (c *serverStatusRequests) Create(serverStatusRequest *v1.ServerStatusRequest) (result *v1.ServerStatusRequest, err error) {
|
||||
result = &v1.ServerStatusRequest{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("serverstatusrequests").
|
||||
Body(serverStatusRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a serverStatusRequest and updates it. Returns the server's representation of the serverStatusRequest, and an error, if there is any.
|
||||
func (c *serverStatusRequests) Update(serverStatusRequest *v1.ServerStatusRequest) (result *v1.ServerStatusRequest, err error) {
|
||||
result = &v1.ServerStatusRequest{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("serverstatusrequests").
|
||||
Name(serverStatusRequest.Name).
|
||||
Body(serverStatusRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *serverStatusRequests) UpdateStatus(serverStatusRequest *v1.ServerStatusRequest) (result *v1.ServerStatusRequest, err error) {
|
||||
result = &v1.ServerStatusRequest{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("serverstatusrequests").
|
||||
Name(serverStatusRequest.Name).
|
||||
SubResource("status").
|
||||
Body(serverStatusRequest).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the serverStatusRequest and deletes it. Returns an error if one occurs.
|
||||
func (c *serverStatusRequests) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("serverstatusrequests").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *serverStatusRequests) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("serverstatusrequests").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched serverStatusRequest.
|
||||
func (c *serverStatusRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServerStatusRequest, err error) {
|
||||
result = &v1.ServerStatusRequest{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("serverstatusrequests").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
scheme "github.com/heptio/velero/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// VolumeSnapshotLocationsGetter has a method to return a VolumeSnapshotLocationInterface.
|
||||
// A group's client should implement this interface.
|
||||
type VolumeSnapshotLocationsGetter interface {
|
||||
VolumeSnapshotLocations(namespace string) VolumeSnapshotLocationInterface
|
||||
}
|
||||
|
||||
// VolumeSnapshotLocationInterface has methods to work with VolumeSnapshotLocation resources.
|
||||
type VolumeSnapshotLocationInterface interface {
|
||||
Create(*v1.VolumeSnapshotLocation) (*v1.VolumeSnapshotLocation, error)
|
||||
Update(*v1.VolumeSnapshotLocation) (*v1.VolumeSnapshotLocation, error)
|
||||
UpdateStatus(*v1.VolumeSnapshotLocation) (*v1.VolumeSnapshotLocation, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.VolumeSnapshotLocation, error)
|
||||
List(opts metav1.ListOptions) (*v1.VolumeSnapshotLocationList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VolumeSnapshotLocation, err error)
|
||||
VolumeSnapshotLocationExpansion
|
||||
}
|
||||
|
||||
// volumeSnapshotLocations implements VolumeSnapshotLocationInterface
|
||||
type volumeSnapshotLocations struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newVolumeSnapshotLocations returns a VolumeSnapshotLocations
|
||||
func newVolumeSnapshotLocations(c *ArkV1Client, namespace string) *volumeSnapshotLocations {
|
||||
return &volumeSnapshotLocations{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the volumeSnapshotLocation, and returns the corresponding volumeSnapshotLocation object, and an error if there is any.
|
||||
func (c *volumeSnapshotLocations) Get(name string, options metav1.GetOptions) (result *v1.VolumeSnapshotLocation, err error) {
|
||||
result = &v1.VolumeSnapshotLocation{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshotlocations").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeSnapshotLocations that match those selectors.
|
||||
func (c *volumeSnapshotLocations) List(opts metav1.ListOptions) (result *v1.VolumeSnapshotLocationList, err error) {
|
||||
result = &v1.VolumeSnapshotLocationList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshotlocations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested volumeSnapshotLocations.
|
||||
func (c *volumeSnapshotLocations) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshotlocations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeSnapshotLocation and creates it. Returns the server's representation of the volumeSnapshotLocation, and an error, if there is any.
|
||||
func (c *volumeSnapshotLocations) Create(volumeSnapshotLocation *v1.VolumeSnapshotLocation) (result *v1.VolumeSnapshotLocation, err error) {
|
||||
result = &v1.VolumeSnapshotLocation{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshotlocations").
|
||||
Body(volumeSnapshotLocation).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeSnapshotLocation and updates it. Returns the server's representation of the volumeSnapshotLocation, and an error, if there is any.
|
||||
func (c *volumeSnapshotLocations) Update(volumeSnapshotLocation *v1.VolumeSnapshotLocation) (result *v1.VolumeSnapshotLocation, err error) {
|
||||
result = &v1.VolumeSnapshotLocation{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshotlocations").
|
||||
Name(volumeSnapshotLocation.Name).
|
||||
Body(volumeSnapshotLocation).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *volumeSnapshotLocations) UpdateStatus(volumeSnapshotLocation *v1.VolumeSnapshotLocation) (result *v1.VolumeSnapshotLocation, err error) {
|
||||
result = &v1.VolumeSnapshotLocation{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshotlocations").
|
||||
Name(volumeSnapshotLocation.Name).
|
||||
SubResource("status").
|
||||
Body(volumeSnapshotLocation).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the volumeSnapshotLocation and deletes it. Returns an error if one occurs.
|
||||
func (c *volumeSnapshotLocations) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshotlocations").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *volumeSnapshotLocations) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshotlocations").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeSnapshotLocation.
|
||||
func (c *volumeSnapshotLocations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.VolumeSnapshotLocation, err error) {
|
||||
result = &v1.VolumeSnapshotLocation{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshotlocations").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package ark
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/generated/informers/externalversions/ark/v1"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1 provides access to shared informers for resources in V1.
|
||||
V1() v1.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1 returns a new v1.Interface.
|
||||
func (g *group) V1() v1.Interface {
|
||||
return v1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// BackupInformer provides access to a shared informer and lister for
|
||||
// Backups.
|
||||
type BackupInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.BackupLister
|
||||
}
|
||||
|
||||
type backupInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewBackupInformer constructs a new informer for Backup type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewBackupInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredBackupInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredBackupInformer constructs a new informer for Backup type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredBackupInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().Backups(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().Backups(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.Backup{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *backupInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredBackupInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *backupInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.Backup{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *backupInformer) Lister() v1.BackupLister {
|
||||
return v1.NewBackupLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// BackupStorageLocationInformer provides access to a shared informer and lister for
|
||||
// BackupStorageLocations.
|
||||
type BackupStorageLocationInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.BackupStorageLocationLister
|
||||
}
|
||||
|
||||
type backupStorageLocationInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewBackupStorageLocationInformer constructs a new informer for BackupStorageLocation type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewBackupStorageLocationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredBackupStorageLocationInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredBackupStorageLocationInformer constructs a new informer for BackupStorageLocation type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredBackupStorageLocationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().BackupStorageLocations(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().BackupStorageLocations(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.BackupStorageLocation{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *backupStorageLocationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredBackupStorageLocationInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *backupStorageLocationInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.BackupStorageLocation{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *backupStorageLocationInformer) Lister() v1.BackupStorageLocationLister {
|
||||
return v1.NewBackupStorageLocationLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DeleteBackupRequestInformer provides access to a shared informer and lister for
|
||||
// DeleteBackupRequests.
|
||||
type DeleteBackupRequestInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.DeleteBackupRequestLister
|
||||
}
|
||||
|
||||
type deleteBackupRequestInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewDeleteBackupRequestInformer constructs a new informer for DeleteBackupRequest type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewDeleteBackupRequestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredDeleteBackupRequestInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredDeleteBackupRequestInformer constructs a new informer for DeleteBackupRequest type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredDeleteBackupRequestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().DeleteBackupRequests(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().DeleteBackupRequests(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.DeleteBackupRequest{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *deleteBackupRequestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredDeleteBackupRequestInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *deleteBackupRequestInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.DeleteBackupRequest{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *deleteBackupRequestInformer) Lister() v1.DeleteBackupRequestLister {
|
||||
return v1.NewDeleteBackupRequestLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DownloadRequestInformer provides access to a shared informer and lister for
|
||||
// DownloadRequests.
|
||||
type DownloadRequestInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.DownloadRequestLister
|
||||
}
|
||||
|
||||
type downloadRequestInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewDownloadRequestInformer constructs a new informer for DownloadRequest type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewDownloadRequestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredDownloadRequestInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredDownloadRequestInformer constructs a new informer for DownloadRequest type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredDownloadRequestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().DownloadRequests(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().DownloadRequests(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.DownloadRequest{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *downloadRequestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredDownloadRequestInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *downloadRequestInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.DownloadRequest{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *downloadRequestInformer) Lister() v1.DownloadRequestLister {
|
||||
return v1.NewDownloadRequestLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// Backups returns a BackupInformer.
|
||||
Backups() BackupInformer
|
||||
// BackupStorageLocations returns a BackupStorageLocationInformer.
|
||||
BackupStorageLocations() BackupStorageLocationInformer
|
||||
// DeleteBackupRequests returns a DeleteBackupRequestInformer.
|
||||
DeleteBackupRequests() DeleteBackupRequestInformer
|
||||
// DownloadRequests returns a DownloadRequestInformer.
|
||||
DownloadRequests() DownloadRequestInformer
|
||||
// PodVolumeBackups returns a PodVolumeBackupInformer.
|
||||
PodVolumeBackups() PodVolumeBackupInformer
|
||||
// PodVolumeRestores returns a PodVolumeRestoreInformer.
|
||||
PodVolumeRestores() PodVolumeRestoreInformer
|
||||
// ResticRepositories returns a ResticRepositoryInformer.
|
||||
ResticRepositories() ResticRepositoryInformer
|
||||
// Restores returns a RestoreInformer.
|
||||
Restores() RestoreInformer
|
||||
// Schedules returns a ScheduleInformer.
|
||||
Schedules() ScheduleInformer
|
||||
// ServerStatusRequests returns a ServerStatusRequestInformer.
|
||||
ServerStatusRequests() ServerStatusRequestInformer
|
||||
// VolumeSnapshotLocations returns a VolumeSnapshotLocationInformer.
|
||||
VolumeSnapshotLocations() VolumeSnapshotLocationInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// Backups returns a BackupInformer.
|
||||
func (v *version) Backups() BackupInformer {
|
||||
return &backupInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// BackupStorageLocations returns a BackupStorageLocationInformer.
|
||||
func (v *version) BackupStorageLocations() BackupStorageLocationInformer {
|
||||
return &backupStorageLocationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// DeleteBackupRequests returns a DeleteBackupRequestInformer.
|
||||
func (v *version) DeleteBackupRequests() DeleteBackupRequestInformer {
|
||||
return &deleteBackupRequestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// DownloadRequests returns a DownloadRequestInformer.
|
||||
func (v *version) DownloadRequests() DownloadRequestInformer {
|
||||
return &downloadRequestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// PodVolumeBackups returns a PodVolumeBackupInformer.
|
||||
func (v *version) PodVolumeBackups() PodVolumeBackupInformer {
|
||||
return &podVolumeBackupInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// PodVolumeRestores returns a PodVolumeRestoreInformer.
|
||||
func (v *version) PodVolumeRestores() PodVolumeRestoreInformer {
|
||||
return &podVolumeRestoreInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ResticRepositories returns a ResticRepositoryInformer.
|
||||
func (v *version) ResticRepositories() ResticRepositoryInformer {
|
||||
return &resticRepositoryInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Restores returns a RestoreInformer.
|
||||
func (v *version) Restores() RestoreInformer {
|
||||
return &restoreInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Schedules returns a ScheduleInformer.
|
||||
func (v *version) Schedules() ScheduleInformer {
|
||||
return &scheduleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ServerStatusRequests returns a ServerStatusRequestInformer.
|
||||
func (v *version) ServerStatusRequests() ServerStatusRequestInformer {
|
||||
return &serverStatusRequestInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// VolumeSnapshotLocations returns a VolumeSnapshotLocationInformer.
|
||||
func (v *version) VolumeSnapshotLocations() VolumeSnapshotLocationInformer {
|
||||
return &volumeSnapshotLocationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// PodVolumeBackupInformer provides access to a shared informer and lister for
|
||||
// PodVolumeBackups.
|
||||
type PodVolumeBackupInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.PodVolumeBackupLister
|
||||
}
|
||||
|
||||
type podVolumeBackupInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewPodVolumeBackupInformer constructs a new informer for PodVolumeBackup type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewPodVolumeBackupInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredPodVolumeBackupInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredPodVolumeBackupInformer constructs a new informer for PodVolumeBackup type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredPodVolumeBackupInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().PodVolumeBackups(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().PodVolumeBackups(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.PodVolumeBackup{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *podVolumeBackupInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredPodVolumeBackupInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *podVolumeBackupInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.PodVolumeBackup{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *podVolumeBackupInformer) Lister() v1.PodVolumeBackupLister {
|
||||
return v1.NewPodVolumeBackupLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// PodVolumeRestoreInformer provides access to a shared informer and lister for
|
||||
// PodVolumeRestores.
|
||||
type PodVolumeRestoreInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.PodVolumeRestoreLister
|
||||
}
|
||||
|
||||
type podVolumeRestoreInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewPodVolumeRestoreInformer constructs a new informer for PodVolumeRestore type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewPodVolumeRestoreInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredPodVolumeRestoreInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredPodVolumeRestoreInformer constructs a new informer for PodVolumeRestore type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredPodVolumeRestoreInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().PodVolumeRestores(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().PodVolumeRestores(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.PodVolumeRestore{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *podVolumeRestoreInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredPodVolumeRestoreInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *podVolumeRestoreInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.PodVolumeRestore{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *podVolumeRestoreInformer) Lister() v1.PodVolumeRestoreLister {
|
||||
return v1.NewPodVolumeRestoreLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ResticRepositoryInformer provides access to a shared informer and lister for
|
||||
// ResticRepositories.
|
||||
type ResticRepositoryInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.ResticRepositoryLister
|
||||
}
|
||||
|
||||
type resticRepositoryInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewResticRepositoryInformer constructs a new informer for ResticRepository type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewResticRepositoryInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredResticRepositoryInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredResticRepositoryInformer constructs a new informer for ResticRepository type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredResticRepositoryInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().ResticRepositories(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().ResticRepositories(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.ResticRepository{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *resticRepositoryInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredResticRepositoryInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *resticRepositoryInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.ResticRepository{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *resticRepositoryInformer) Lister() v1.ResticRepositoryLister {
|
||||
return v1.NewResticRepositoryLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// RestoreInformer provides access to a shared informer and lister for
|
||||
// Restores.
|
||||
type RestoreInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.RestoreLister
|
||||
}
|
||||
|
||||
type restoreInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewRestoreInformer constructs a new informer for Restore type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewRestoreInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredRestoreInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredRestoreInformer constructs a new informer for Restore type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredRestoreInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().Restores(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().Restores(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.Restore{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *restoreInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredRestoreInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *restoreInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.Restore{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *restoreInformer) Lister() v1.RestoreLister {
|
||||
return v1.NewRestoreLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ScheduleInformer provides access to a shared informer and lister for
|
||||
// Schedules.
|
||||
type ScheduleInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.ScheduleLister
|
||||
}
|
||||
|
||||
type scheduleInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewScheduleInformer constructs a new informer for Schedule type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewScheduleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredScheduleInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredScheduleInformer constructs a new informer for Schedule type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredScheduleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().Schedules(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().Schedules(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.Schedule{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *scheduleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredScheduleInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *scheduleInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.Schedule{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *scheduleInformer) Lister() v1.ScheduleLister {
|
||||
return v1.NewScheduleLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ServerStatusRequestInformer provides access to a shared informer and lister for
|
||||
// ServerStatusRequests.
|
||||
type ServerStatusRequestInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.ServerStatusRequestLister
|
||||
}
|
||||
|
||||
type serverStatusRequestInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewServerStatusRequestInformer constructs a new informer for ServerStatusRequest type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewServerStatusRequestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredServerStatusRequestInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredServerStatusRequestInformer constructs a new informer for ServerStatusRequest type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredServerStatusRequestInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().ServerStatusRequests(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().ServerStatusRequests(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.ServerStatusRequest{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *serverStatusRequestInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredServerStatusRequestInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *serverStatusRequestInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.ServerStatusRequest{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *serverStatusRequestInformer) Lister() v1.ServerStatusRequestLister {
|
||||
return v1.NewServerStatusRequestLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
arkv1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/heptio/velero/pkg/generated/listers/ark/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// VolumeSnapshotLocationInformer provides access to a shared informer and lister for
|
||||
// VolumeSnapshotLocations.
|
||||
type VolumeSnapshotLocationInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.VolumeSnapshotLocationLister
|
||||
}
|
||||
|
||||
type volumeSnapshotLocationInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewVolumeSnapshotLocationInformer constructs a new informer for VolumeSnapshotLocation type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewVolumeSnapshotLocationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredVolumeSnapshotLocationInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredVolumeSnapshotLocationInformer constructs a new informer for VolumeSnapshotLocation type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredVolumeSnapshotLocationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().VolumeSnapshotLocations(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ArkV1().VolumeSnapshotLocations(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&arkv1.VolumeSnapshotLocation{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *volumeSnapshotLocationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredVolumeSnapshotLocationInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *volumeSnapshotLocationInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&arkv1.VolumeSnapshotLocation{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *volumeSnapshotLocationInformer) Lister() v1.VolumeSnapshotLocationLister {
|
||||
return v1.NewVolumeSnapshotLocationLister(f.Informer().GetIndexer())
|
||||
}
|
||||
@@ -24,7 +24,6 @@ import (
|
||||
time "time"
|
||||
|
||||
versioned "github.com/heptio/velero/pkg/generated/clientset/versioned"
|
||||
ark "github.com/heptio/velero/pkg/generated/informers/externalversions/ark"
|
||||
internalinterfaces "github.com/heptio/velero/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
velero "github.com/heptio/velero/pkg/generated/informers/externalversions/velero"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -173,14 +172,9 @@ type SharedInformerFactory interface {
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
|
||||
|
||||
Ark() ark.Interface
|
||||
Velero() velero.Interface
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Ark() ark.Interface {
|
||||
return ark.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Velero() velero.Interface {
|
||||
return velero.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
@@ -21,8 +21,7 @@ package externalversions
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
velerov1 "github.com/heptio/velero/pkg/apis/velero/v1"
|
||||
v1 "github.com/heptio/velero/pkg/apis/velero/v1"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
@@ -53,52 +52,28 @@ func (f *genericInformer) Lister() cache.GenericLister {
|
||||
// TODO extend this to unknown resources with a client pool
|
||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||
switch resource {
|
||||
// Group=ark.heptio.com, Version=v1
|
||||
// Group=velero.io, Version=v1
|
||||
case v1.SchemeGroupVersion.WithResource("backups"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().Backups().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("backupstoragelocations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().BackupStorageLocations().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("deletebackuprequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().DeleteBackupRequests().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("downloadrequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().DownloadRequests().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("podvolumebackups"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().PodVolumeBackups().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("podvolumerestores"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().PodVolumeRestores().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("resticrepositories"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().ResticRepositories().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("restores"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().Restores().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("schedules"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().Schedules().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("serverstatusrequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().ServerStatusRequests().Informer()}, nil
|
||||
case v1.SchemeGroupVersion.WithResource("volumesnapshotlocations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Ark().V1().VolumeSnapshotLocations().Informer()}, nil
|
||||
|
||||
// Group=velero.io, Version=v1
|
||||
case velerov1.SchemeGroupVersion.WithResource("backups"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().Backups().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("backupstoragelocations"):
|
||||
case v1.SchemeGroupVersion.WithResource("backupstoragelocations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().BackupStorageLocations().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("deletebackuprequests"):
|
||||
case v1.SchemeGroupVersion.WithResource("deletebackuprequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().DeleteBackupRequests().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("downloadrequests"):
|
||||
case v1.SchemeGroupVersion.WithResource("downloadrequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().DownloadRequests().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("podvolumebackups"):
|
||||
case v1.SchemeGroupVersion.WithResource("podvolumebackups"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().PodVolumeBackups().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("podvolumerestores"):
|
||||
case v1.SchemeGroupVersion.WithResource("podvolumerestores"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().PodVolumeRestores().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("resticrepositories"):
|
||||
case v1.SchemeGroupVersion.WithResource("resticrepositories"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().ResticRepositories().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("restores"):
|
||||
case v1.SchemeGroupVersion.WithResource("restores"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().Restores().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("schedules"):
|
||||
case v1.SchemeGroupVersion.WithResource("schedules"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().Schedules().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("serverstatusrequests"):
|
||||
case v1.SchemeGroupVersion.WithResource("serverstatusrequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().ServerStatusRequests().Informer()}, nil
|
||||
case velerov1.SchemeGroupVersion.WithResource("volumesnapshotlocations"):
|
||||
case v1.SchemeGroupVersion.WithResource("volumesnapshotlocations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Velero().V1().VolumeSnapshotLocations().Informer()}, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// BackupLister helps list Backups.
|
||||
type BackupLister interface {
|
||||
// List lists all Backups in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.Backup, err error)
|
||||
// Backups returns an object that can list and get Backups.
|
||||
Backups(namespace string) BackupNamespaceLister
|
||||
BackupListerExpansion
|
||||
}
|
||||
|
||||
// backupLister implements the BackupLister interface.
|
||||
type backupLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewBackupLister returns a new BackupLister.
|
||||
func NewBackupLister(indexer cache.Indexer) BackupLister {
|
||||
return &backupLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Backups in the indexer.
|
||||
func (s *backupLister) List(selector labels.Selector) (ret []*v1.Backup, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Backup))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Backups returns an object that can list and get Backups.
|
||||
func (s *backupLister) Backups(namespace string) BackupNamespaceLister {
|
||||
return backupNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// BackupNamespaceLister helps list and get Backups.
|
||||
type BackupNamespaceLister interface {
|
||||
// List lists all Backups in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.Backup, err error)
|
||||
// Get retrieves the Backup from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.Backup, error)
|
||||
BackupNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// backupNamespaceLister implements the BackupNamespaceLister
|
||||
// interface.
|
||||
type backupNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Backups in the indexer for a given namespace.
|
||||
func (s backupNamespaceLister) List(selector labels.Selector) (ret []*v1.Backup, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Backup))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Backup from the indexer for a given namespace and name.
|
||||
func (s backupNamespaceLister) Get(name string) (*v1.Backup, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("backup"), name)
|
||||
}
|
||||
return obj.(*v1.Backup), nil
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// BackupStorageLocationLister helps list BackupStorageLocations.
|
||||
type BackupStorageLocationLister interface {
|
||||
// List lists all BackupStorageLocations in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.BackupStorageLocation, err error)
|
||||
// BackupStorageLocations returns an object that can list and get BackupStorageLocations.
|
||||
BackupStorageLocations(namespace string) BackupStorageLocationNamespaceLister
|
||||
BackupStorageLocationListerExpansion
|
||||
}
|
||||
|
||||
// backupStorageLocationLister implements the BackupStorageLocationLister interface.
|
||||
type backupStorageLocationLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewBackupStorageLocationLister returns a new BackupStorageLocationLister.
|
||||
func NewBackupStorageLocationLister(indexer cache.Indexer) BackupStorageLocationLister {
|
||||
return &backupStorageLocationLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all BackupStorageLocations in the indexer.
|
||||
func (s *backupStorageLocationLister) List(selector labels.Selector) (ret []*v1.BackupStorageLocation, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.BackupStorageLocation))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// BackupStorageLocations returns an object that can list and get BackupStorageLocations.
|
||||
func (s *backupStorageLocationLister) BackupStorageLocations(namespace string) BackupStorageLocationNamespaceLister {
|
||||
return backupStorageLocationNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// BackupStorageLocationNamespaceLister helps list and get BackupStorageLocations.
|
||||
type BackupStorageLocationNamespaceLister interface {
|
||||
// List lists all BackupStorageLocations in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.BackupStorageLocation, err error)
|
||||
// Get retrieves the BackupStorageLocation from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.BackupStorageLocation, error)
|
||||
BackupStorageLocationNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// backupStorageLocationNamespaceLister implements the BackupStorageLocationNamespaceLister
|
||||
// interface.
|
||||
type backupStorageLocationNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all BackupStorageLocations in the indexer for a given namespace.
|
||||
func (s backupStorageLocationNamespaceLister) List(selector labels.Selector) (ret []*v1.BackupStorageLocation, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.BackupStorageLocation))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the BackupStorageLocation from the indexer for a given namespace and name.
|
||||
func (s backupStorageLocationNamespaceLister) Get(name string) (*v1.BackupStorageLocation, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("backupstoragelocation"), name)
|
||||
}
|
||||
return obj.(*v1.BackupStorageLocation), nil
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DeleteBackupRequestLister helps list DeleteBackupRequests.
|
||||
type DeleteBackupRequestLister interface {
|
||||
// List lists all DeleteBackupRequests in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.DeleteBackupRequest, err error)
|
||||
// DeleteBackupRequests returns an object that can list and get DeleteBackupRequests.
|
||||
DeleteBackupRequests(namespace string) DeleteBackupRequestNamespaceLister
|
||||
DeleteBackupRequestListerExpansion
|
||||
}
|
||||
|
||||
// deleteBackupRequestLister implements the DeleteBackupRequestLister interface.
|
||||
type deleteBackupRequestLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewDeleteBackupRequestLister returns a new DeleteBackupRequestLister.
|
||||
func NewDeleteBackupRequestLister(indexer cache.Indexer) DeleteBackupRequestLister {
|
||||
return &deleteBackupRequestLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all DeleteBackupRequests in the indexer.
|
||||
func (s *deleteBackupRequestLister) List(selector labels.Selector) (ret []*v1.DeleteBackupRequest, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.DeleteBackupRequest))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// DeleteBackupRequests returns an object that can list and get DeleteBackupRequests.
|
||||
func (s *deleteBackupRequestLister) DeleteBackupRequests(namespace string) DeleteBackupRequestNamespaceLister {
|
||||
return deleteBackupRequestNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// DeleteBackupRequestNamespaceLister helps list and get DeleteBackupRequests.
|
||||
type DeleteBackupRequestNamespaceLister interface {
|
||||
// List lists all DeleteBackupRequests in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.DeleteBackupRequest, err error)
|
||||
// Get retrieves the DeleteBackupRequest from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.DeleteBackupRequest, error)
|
||||
DeleteBackupRequestNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// deleteBackupRequestNamespaceLister implements the DeleteBackupRequestNamespaceLister
|
||||
// interface.
|
||||
type deleteBackupRequestNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all DeleteBackupRequests in the indexer for a given namespace.
|
||||
func (s deleteBackupRequestNamespaceLister) List(selector labels.Selector) (ret []*v1.DeleteBackupRequest, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.DeleteBackupRequest))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the DeleteBackupRequest from the indexer for a given namespace and name.
|
||||
func (s deleteBackupRequestNamespaceLister) Get(name string) (*v1.DeleteBackupRequest, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("deletebackuprequest"), name)
|
||||
}
|
||||
return obj.(*v1.DeleteBackupRequest), nil
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DownloadRequestLister helps list DownloadRequests.
|
||||
type DownloadRequestLister interface {
|
||||
// List lists all DownloadRequests in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.DownloadRequest, err error)
|
||||
// DownloadRequests returns an object that can list and get DownloadRequests.
|
||||
DownloadRequests(namespace string) DownloadRequestNamespaceLister
|
||||
DownloadRequestListerExpansion
|
||||
}
|
||||
|
||||
// downloadRequestLister implements the DownloadRequestLister interface.
|
||||
type downloadRequestLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewDownloadRequestLister returns a new DownloadRequestLister.
|
||||
func NewDownloadRequestLister(indexer cache.Indexer) DownloadRequestLister {
|
||||
return &downloadRequestLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all DownloadRequests in the indexer.
|
||||
func (s *downloadRequestLister) List(selector labels.Selector) (ret []*v1.DownloadRequest, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.DownloadRequest))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// DownloadRequests returns an object that can list and get DownloadRequests.
|
||||
func (s *downloadRequestLister) DownloadRequests(namespace string) DownloadRequestNamespaceLister {
|
||||
return downloadRequestNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// DownloadRequestNamespaceLister helps list and get DownloadRequests.
|
||||
type DownloadRequestNamespaceLister interface {
|
||||
// List lists all DownloadRequests in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.DownloadRequest, err error)
|
||||
// Get retrieves the DownloadRequest from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.DownloadRequest, error)
|
||||
DownloadRequestNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// downloadRequestNamespaceLister implements the DownloadRequestNamespaceLister
|
||||
// interface.
|
||||
type downloadRequestNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all DownloadRequests in the indexer for a given namespace.
|
||||
func (s downloadRequestNamespaceLister) List(selector labels.Selector) (ret []*v1.DownloadRequest, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.DownloadRequest))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the DownloadRequest from the indexer for a given namespace and name.
|
||||
func (s downloadRequestNamespaceLister) Get(name string) (*v1.DownloadRequest, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("downloadrequest"), name)
|
||||
}
|
||||
return obj.(*v1.DownloadRequest), nil
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// BackupListerExpansion allows custom methods to be added to
|
||||
// BackupLister.
|
||||
type BackupListerExpansion interface{}
|
||||
|
||||
// BackupNamespaceListerExpansion allows custom methods to be added to
|
||||
// BackupNamespaceLister.
|
||||
type BackupNamespaceListerExpansion interface{}
|
||||
|
||||
// BackupStorageLocationListerExpansion allows custom methods to be added to
|
||||
// BackupStorageLocationLister.
|
||||
type BackupStorageLocationListerExpansion interface{}
|
||||
|
||||
// BackupStorageLocationNamespaceListerExpansion allows custom methods to be added to
|
||||
// BackupStorageLocationNamespaceLister.
|
||||
type BackupStorageLocationNamespaceListerExpansion interface{}
|
||||
|
||||
// DeleteBackupRequestListerExpansion allows custom methods to be added to
|
||||
// DeleteBackupRequestLister.
|
||||
type DeleteBackupRequestListerExpansion interface{}
|
||||
|
||||
// DeleteBackupRequestNamespaceListerExpansion allows custom methods to be added to
|
||||
// DeleteBackupRequestNamespaceLister.
|
||||
type DeleteBackupRequestNamespaceListerExpansion interface{}
|
||||
|
||||
// DownloadRequestListerExpansion allows custom methods to be added to
|
||||
// DownloadRequestLister.
|
||||
type DownloadRequestListerExpansion interface{}
|
||||
|
||||
// DownloadRequestNamespaceListerExpansion allows custom methods to be added to
|
||||
// DownloadRequestNamespaceLister.
|
||||
type DownloadRequestNamespaceListerExpansion interface{}
|
||||
|
||||
// PodVolumeBackupListerExpansion allows custom methods to be added to
|
||||
// PodVolumeBackupLister.
|
||||
type PodVolumeBackupListerExpansion interface{}
|
||||
|
||||
// PodVolumeBackupNamespaceListerExpansion allows custom methods to be added to
|
||||
// PodVolumeBackupNamespaceLister.
|
||||
type PodVolumeBackupNamespaceListerExpansion interface{}
|
||||
|
||||
// PodVolumeRestoreListerExpansion allows custom methods to be added to
|
||||
// PodVolumeRestoreLister.
|
||||
type PodVolumeRestoreListerExpansion interface{}
|
||||
|
||||
// PodVolumeRestoreNamespaceListerExpansion allows custom methods to be added to
|
||||
// PodVolumeRestoreNamespaceLister.
|
||||
type PodVolumeRestoreNamespaceListerExpansion interface{}
|
||||
|
||||
// ResticRepositoryListerExpansion allows custom methods to be added to
|
||||
// ResticRepositoryLister.
|
||||
type ResticRepositoryListerExpansion interface{}
|
||||
|
||||
// ResticRepositoryNamespaceListerExpansion allows custom methods to be added to
|
||||
// ResticRepositoryNamespaceLister.
|
||||
type ResticRepositoryNamespaceListerExpansion interface{}
|
||||
|
||||
// RestoreListerExpansion allows custom methods to be added to
|
||||
// RestoreLister.
|
||||
type RestoreListerExpansion interface{}
|
||||
|
||||
// RestoreNamespaceListerExpansion allows custom methods to be added to
|
||||
// RestoreNamespaceLister.
|
||||
type RestoreNamespaceListerExpansion interface{}
|
||||
|
||||
// ScheduleListerExpansion allows custom methods to be added to
|
||||
// ScheduleLister.
|
||||
type ScheduleListerExpansion interface{}
|
||||
|
||||
// ScheduleNamespaceListerExpansion allows custom methods to be added to
|
||||
// ScheduleNamespaceLister.
|
||||
type ScheduleNamespaceListerExpansion interface{}
|
||||
|
||||
// ServerStatusRequestListerExpansion allows custom methods to be added to
|
||||
// ServerStatusRequestLister.
|
||||
type ServerStatusRequestListerExpansion interface{}
|
||||
|
||||
// ServerStatusRequestNamespaceListerExpansion allows custom methods to be added to
|
||||
// ServerStatusRequestNamespaceLister.
|
||||
type ServerStatusRequestNamespaceListerExpansion interface{}
|
||||
|
||||
// VolumeSnapshotLocationListerExpansion allows custom methods to be added to
|
||||
// VolumeSnapshotLocationLister.
|
||||
type VolumeSnapshotLocationListerExpansion interface{}
|
||||
|
||||
// VolumeSnapshotLocationNamespaceListerExpansion allows custom methods to be added to
|
||||
// VolumeSnapshotLocationNamespaceLister.
|
||||
type VolumeSnapshotLocationNamespaceListerExpansion interface{}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// PodVolumeBackupLister helps list PodVolumeBackups.
|
||||
type PodVolumeBackupLister interface {
|
||||
// List lists all PodVolumeBackups in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.PodVolumeBackup, err error)
|
||||
// PodVolumeBackups returns an object that can list and get PodVolumeBackups.
|
||||
PodVolumeBackups(namespace string) PodVolumeBackupNamespaceLister
|
||||
PodVolumeBackupListerExpansion
|
||||
}
|
||||
|
||||
// podVolumeBackupLister implements the PodVolumeBackupLister interface.
|
||||
type podVolumeBackupLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewPodVolumeBackupLister returns a new PodVolumeBackupLister.
|
||||
func NewPodVolumeBackupLister(indexer cache.Indexer) PodVolumeBackupLister {
|
||||
return &podVolumeBackupLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all PodVolumeBackups in the indexer.
|
||||
func (s *podVolumeBackupLister) List(selector labels.Selector) (ret []*v1.PodVolumeBackup, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.PodVolumeBackup))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// PodVolumeBackups returns an object that can list and get PodVolumeBackups.
|
||||
func (s *podVolumeBackupLister) PodVolumeBackups(namespace string) PodVolumeBackupNamespaceLister {
|
||||
return podVolumeBackupNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// PodVolumeBackupNamespaceLister helps list and get PodVolumeBackups.
|
||||
type PodVolumeBackupNamespaceLister interface {
|
||||
// List lists all PodVolumeBackups in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.PodVolumeBackup, err error)
|
||||
// Get retrieves the PodVolumeBackup from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.PodVolumeBackup, error)
|
||||
PodVolumeBackupNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// podVolumeBackupNamespaceLister implements the PodVolumeBackupNamespaceLister
|
||||
// interface.
|
||||
type podVolumeBackupNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all PodVolumeBackups in the indexer for a given namespace.
|
||||
func (s podVolumeBackupNamespaceLister) List(selector labels.Selector) (ret []*v1.PodVolumeBackup, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.PodVolumeBackup))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the PodVolumeBackup from the indexer for a given namespace and name.
|
||||
func (s podVolumeBackupNamespaceLister) Get(name string) (*v1.PodVolumeBackup, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("podvolumebackup"), name)
|
||||
}
|
||||
return obj.(*v1.PodVolumeBackup), nil
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// PodVolumeRestoreLister helps list PodVolumeRestores.
|
||||
type PodVolumeRestoreLister interface {
|
||||
// List lists all PodVolumeRestores in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.PodVolumeRestore, err error)
|
||||
// PodVolumeRestores returns an object that can list and get PodVolumeRestores.
|
||||
PodVolumeRestores(namespace string) PodVolumeRestoreNamespaceLister
|
||||
PodVolumeRestoreListerExpansion
|
||||
}
|
||||
|
||||
// podVolumeRestoreLister implements the PodVolumeRestoreLister interface.
|
||||
type podVolumeRestoreLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewPodVolumeRestoreLister returns a new PodVolumeRestoreLister.
|
||||
func NewPodVolumeRestoreLister(indexer cache.Indexer) PodVolumeRestoreLister {
|
||||
return &podVolumeRestoreLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all PodVolumeRestores in the indexer.
|
||||
func (s *podVolumeRestoreLister) List(selector labels.Selector) (ret []*v1.PodVolumeRestore, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.PodVolumeRestore))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// PodVolumeRestores returns an object that can list and get PodVolumeRestores.
|
||||
func (s *podVolumeRestoreLister) PodVolumeRestores(namespace string) PodVolumeRestoreNamespaceLister {
|
||||
return podVolumeRestoreNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// PodVolumeRestoreNamespaceLister helps list and get PodVolumeRestores.
|
||||
type PodVolumeRestoreNamespaceLister interface {
|
||||
// List lists all PodVolumeRestores in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.PodVolumeRestore, err error)
|
||||
// Get retrieves the PodVolumeRestore from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.PodVolumeRestore, error)
|
||||
PodVolumeRestoreNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// podVolumeRestoreNamespaceLister implements the PodVolumeRestoreNamespaceLister
|
||||
// interface.
|
||||
type podVolumeRestoreNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all PodVolumeRestores in the indexer for a given namespace.
|
||||
func (s podVolumeRestoreNamespaceLister) List(selector labels.Selector) (ret []*v1.PodVolumeRestore, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.PodVolumeRestore))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the PodVolumeRestore from the indexer for a given namespace and name.
|
||||
func (s podVolumeRestoreNamespaceLister) Get(name string) (*v1.PodVolumeRestore, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("podvolumerestore"), name)
|
||||
}
|
||||
return obj.(*v1.PodVolumeRestore), nil
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ResticRepositoryLister helps list ResticRepositories.
|
||||
type ResticRepositoryLister interface {
|
||||
// List lists all ResticRepositories in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.ResticRepository, err error)
|
||||
// ResticRepositories returns an object that can list and get ResticRepositories.
|
||||
ResticRepositories(namespace string) ResticRepositoryNamespaceLister
|
||||
ResticRepositoryListerExpansion
|
||||
}
|
||||
|
||||
// resticRepositoryLister implements the ResticRepositoryLister interface.
|
||||
type resticRepositoryLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewResticRepositoryLister returns a new ResticRepositoryLister.
|
||||
func NewResticRepositoryLister(indexer cache.Indexer) ResticRepositoryLister {
|
||||
return &resticRepositoryLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ResticRepositories in the indexer.
|
||||
func (s *resticRepositoryLister) List(selector labels.Selector) (ret []*v1.ResticRepository, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.ResticRepository))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// ResticRepositories returns an object that can list and get ResticRepositories.
|
||||
func (s *resticRepositoryLister) ResticRepositories(namespace string) ResticRepositoryNamespaceLister {
|
||||
return resticRepositoryNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// ResticRepositoryNamespaceLister helps list and get ResticRepositories.
|
||||
type ResticRepositoryNamespaceLister interface {
|
||||
// List lists all ResticRepositories in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.ResticRepository, err error)
|
||||
// Get retrieves the ResticRepository from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.ResticRepository, error)
|
||||
ResticRepositoryNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// resticRepositoryNamespaceLister implements the ResticRepositoryNamespaceLister
|
||||
// interface.
|
||||
type resticRepositoryNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all ResticRepositories in the indexer for a given namespace.
|
||||
func (s resticRepositoryNamespaceLister) List(selector labels.Selector) (ret []*v1.ResticRepository, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.ResticRepository))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ResticRepository from the indexer for a given namespace and name.
|
||||
func (s resticRepositoryNamespaceLister) Get(name string) (*v1.ResticRepository, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("resticrepository"), name)
|
||||
}
|
||||
return obj.(*v1.ResticRepository), nil
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// RestoreLister helps list Restores.
|
||||
type RestoreLister interface {
|
||||
// List lists all Restores in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.Restore, err error)
|
||||
// Restores returns an object that can list and get Restores.
|
||||
Restores(namespace string) RestoreNamespaceLister
|
||||
RestoreListerExpansion
|
||||
}
|
||||
|
||||
// restoreLister implements the RestoreLister interface.
|
||||
type restoreLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewRestoreLister returns a new RestoreLister.
|
||||
func NewRestoreLister(indexer cache.Indexer) RestoreLister {
|
||||
return &restoreLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Restores in the indexer.
|
||||
func (s *restoreLister) List(selector labels.Selector) (ret []*v1.Restore, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Restore))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Restores returns an object that can list and get Restores.
|
||||
func (s *restoreLister) Restores(namespace string) RestoreNamespaceLister {
|
||||
return restoreNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// RestoreNamespaceLister helps list and get Restores.
|
||||
type RestoreNamespaceLister interface {
|
||||
// List lists all Restores in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.Restore, err error)
|
||||
// Get retrieves the Restore from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.Restore, error)
|
||||
RestoreNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// restoreNamespaceLister implements the RestoreNamespaceLister
|
||||
// interface.
|
||||
type restoreNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Restores in the indexer for a given namespace.
|
||||
func (s restoreNamespaceLister) List(selector labels.Selector) (ret []*v1.Restore, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Restore))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Restore from the indexer for a given namespace and name.
|
||||
func (s restoreNamespaceLister) Get(name string) (*v1.Restore, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("restore"), name)
|
||||
}
|
||||
return obj.(*v1.Restore), nil
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ScheduleLister helps list Schedules.
|
||||
type ScheduleLister interface {
|
||||
// List lists all Schedules in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.Schedule, err error)
|
||||
// Schedules returns an object that can list and get Schedules.
|
||||
Schedules(namespace string) ScheduleNamespaceLister
|
||||
ScheduleListerExpansion
|
||||
}
|
||||
|
||||
// scheduleLister implements the ScheduleLister interface.
|
||||
type scheduleLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewScheduleLister returns a new ScheduleLister.
|
||||
func NewScheduleLister(indexer cache.Indexer) ScheduleLister {
|
||||
return &scheduleLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Schedules in the indexer.
|
||||
func (s *scheduleLister) List(selector labels.Selector) (ret []*v1.Schedule, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Schedule))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Schedules returns an object that can list and get Schedules.
|
||||
func (s *scheduleLister) Schedules(namespace string) ScheduleNamespaceLister {
|
||||
return scheduleNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// ScheduleNamespaceLister helps list and get Schedules.
|
||||
type ScheduleNamespaceLister interface {
|
||||
// List lists all Schedules in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.Schedule, err error)
|
||||
// Get retrieves the Schedule from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.Schedule, error)
|
||||
ScheduleNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// scheduleNamespaceLister implements the ScheduleNamespaceLister
|
||||
// interface.
|
||||
type scheduleNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Schedules in the indexer for a given namespace.
|
||||
func (s scheduleNamespaceLister) List(selector labels.Selector) (ret []*v1.Schedule, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.Schedule))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Schedule from the indexer for a given namespace and name.
|
||||
func (s scheduleNamespaceLister) Get(name string) (*v1.Schedule, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("schedule"), name)
|
||||
}
|
||||
return obj.(*v1.Schedule), nil
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ServerStatusRequestLister helps list ServerStatusRequests.
|
||||
type ServerStatusRequestLister interface {
|
||||
// List lists all ServerStatusRequests in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.ServerStatusRequest, err error)
|
||||
// ServerStatusRequests returns an object that can list and get ServerStatusRequests.
|
||||
ServerStatusRequests(namespace string) ServerStatusRequestNamespaceLister
|
||||
ServerStatusRequestListerExpansion
|
||||
}
|
||||
|
||||
// serverStatusRequestLister implements the ServerStatusRequestLister interface.
|
||||
type serverStatusRequestLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewServerStatusRequestLister returns a new ServerStatusRequestLister.
|
||||
func NewServerStatusRequestLister(indexer cache.Indexer) ServerStatusRequestLister {
|
||||
return &serverStatusRequestLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ServerStatusRequests in the indexer.
|
||||
func (s *serverStatusRequestLister) List(selector labels.Selector) (ret []*v1.ServerStatusRequest, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.ServerStatusRequest))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// ServerStatusRequests returns an object that can list and get ServerStatusRequests.
|
||||
func (s *serverStatusRequestLister) ServerStatusRequests(namespace string) ServerStatusRequestNamespaceLister {
|
||||
return serverStatusRequestNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// ServerStatusRequestNamespaceLister helps list and get ServerStatusRequests.
|
||||
type ServerStatusRequestNamespaceLister interface {
|
||||
// List lists all ServerStatusRequests in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.ServerStatusRequest, err error)
|
||||
// Get retrieves the ServerStatusRequest from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.ServerStatusRequest, error)
|
||||
ServerStatusRequestNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// serverStatusRequestNamespaceLister implements the ServerStatusRequestNamespaceLister
|
||||
// interface.
|
||||
type serverStatusRequestNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all ServerStatusRequests in the indexer for a given namespace.
|
||||
func (s serverStatusRequestNamespaceLister) List(selector labels.Selector) (ret []*v1.ServerStatusRequest, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.ServerStatusRequest))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ServerStatusRequest from the indexer for a given namespace and name.
|
||||
func (s serverStatusRequestNamespaceLister) Get(name string) (*v1.ServerStatusRequest, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("serverstatusrequest"), name)
|
||||
}
|
||||
return obj.(*v1.ServerStatusRequest), nil
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
Copyright the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/heptio/velero/pkg/apis/ark/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// VolumeSnapshotLocationLister helps list VolumeSnapshotLocations.
|
||||
type VolumeSnapshotLocationLister interface {
|
||||
// List lists all VolumeSnapshotLocations in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1.VolumeSnapshotLocation, err error)
|
||||
// VolumeSnapshotLocations returns an object that can list and get VolumeSnapshotLocations.
|
||||
VolumeSnapshotLocations(namespace string) VolumeSnapshotLocationNamespaceLister
|
||||
VolumeSnapshotLocationListerExpansion
|
||||
}
|
||||
|
||||
// volumeSnapshotLocationLister implements the VolumeSnapshotLocationLister interface.
|
||||
type volumeSnapshotLocationLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewVolumeSnapshotLocationLister returns a new VolumeSnapshotLocationLister.
|
||||
func NewVolumeSnapshotLocationLister(indexer cache.Indexer) VolumeSnapshotLocationLister {
|
||||
return &volumeSnapshotLocationLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all VolumeSnapshotLocations in the indexer.
|
||||
func (s *volumeSnapshotLocationLister) List(selector labels.Selector) (ret []*v1.VolumeSnapshotLocation, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.VolumeSnapshotLocation))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// VolumeSnapshotLocations returns an object that can list and get VolumeSnapshotLocations.
|
||||
func (s *volumeSnapshotLocationLister) VolumeSnapshotLocations(namespace string) VolumeSnapshotLocationNamespaceLister {
|
||||
return volumeSnapshotLocationNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// VolumeSnapshotLocationNamespaceLister helps list and get VolumeSnapshotLocations.
|
||||
type VolumeSnapshotLocationNamespaceLister interface {
|
||||
// List lists all VolumeSnapshotLocations in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1.VolumeSnapshotLocation, err error)
|
||||
// Get retrieves the VolumeSnapshotLocation from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1.VolumeSnapshotLocation, error)
|
||||
VolumeSnapshotLocationNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// volumeSnapshotLocationNamespaceLister implements the VolumeSnapshotLocationNamespaceLister
|
||||
// interface.
|
||||
type volumeSnapshotLocationNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all VolumeSnapshotLocations in the indexer for a given namespace.
|
||||
func (s volumeSnapshotLocationNamespaceLister) List(selector labels.Selector) (ret []*v1.VolumeSnapshotLocation, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.VolumeSnapshotLocation))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the VolumeSnapshotLocation from the indexer for a given namespace and name.
|
||||
func (s volumeSnapshotLocationNamespaceLister) Get(name string) (*v1.VolumeSnapshotLocation, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("volumesnapshotlocation"), name)
|
||||
}
|
||||
return obj.(*v1.VolumeSnapshotLocation), nil
|
||||
}
|
||||
Reference in New Issue
Block a user