Documentation ¶
Index ¶
- type FakeBackupService
- func (f *FakeBackupService) DeleteBackup(bucket, backupName string) error
- func (f *FakeBackupService) DownloadBackup(bucket, name string) (io.ReadCloser, error)
- func (f *FakeBackupService) GetAllBackups(bucket string) ([]*v1.Backup, error)
- func (f *FakeBackupService) UploadBackup(bucket, name string, metadata, backup io.ReadSeeker) error
- type FakeDynamicClient
- type FakeDynamicFactory
- func (df *FakeDynamicFactory) ClientForGroupVersionKind(gvk schema.GroupVersionKind, resource metav1.APIResource, namespace string) (client.Dynamic, error)
- func (df *FakeDynamicFactory) ClientForGroupVersionResource(gvr schema.GroupVersionResource, resource metav1.APIResource, namespace string) (client.Dynamic, error)
- type FakeMapper
- type FakeSnapshotService
- func (s *FakeSnapshotService) CreateSnapshot(volumeID string) (string, error)
- func (s *FakeSnapshotService) CreateVolumeFromSnapshot(snapshotID, volumeType string, iops *int) (string, error)
- func (s *FakeSnapshotService) DeleteSnapshot(snapshotID string) error
- func (s *FakeSnapshotService) GetAllSnapshots() ([]string, error)
- func (s *FakeSnapshotService) GetVolumeInfo(volumeID string) (string, *int, error)
- type TestBackup
- func (b *TestBackup) WithExcludedNamespaces(ns ...string) *TestBackup
- func (b *TestBackup) WithExcludedResources(r ...string) *TestBackup
- func (b *TestBackup) WithExpiration(expiration time.Time) *TestBackup
- func (b *TestBackup) WithIncludedNamespaces(ns ...string) *TestBackup
- func (b *TestBackup) WithIncludedResources(r ...string) *TestBackup
- func (b *TestBackup) WithLabel(key, value string) *TestBackup
- func (b *TestBackup) WithName(name string) *TestBackup
- func (b *TestBackup) WithNamespace(namespace string) *TestBackup
- func (b *TestBackup) WithPhase(phase v1.BackupPhase) *TestBackup
- func (b *TestBackup) WithSnapshot(pv string, snapshot string) *TestBackup
- func (b *TestBackup) WithTTL(ttl time.Duration) *TestBackup
- func (b *TestBackup) WithVersion(version int) *TestBackup
- type TestRestore
- type TestSchedule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeBackupService ¶
func (*FakeBackupService) DeleteBackup ¶
func (f *FakeBackupService) DeleteBackup(bucket, backupName string) error
func (*FakeBackupService) DownloadBackup ¶
func (f *FakeBackupService) DownloadBackup(bucket, name string) (io.ReadCloser, error)
func (*FakeBackupService) GetAllBackups ¶
func (f *FakeBackupService) GetAllBackups(bucket string) ([]*v1.Backup, error)
func (*FakeBackupService) UploadBackup ¶
func (f *FakeBackupService) UploadBackup(bucket, name string, metadata, backup io.ReadSeeker) error
type FakeDynamicClient ¶
func (*FakeDynamicClient) Create ¶
func (c *FakeDynamicClient) Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*FakeDynamicClient) List ¶
func (c *FakeDynamicClient) List(options metav1.ListOptions) (runtime.Object, error)
func (*FakeDynamicClient) Watch ¶
func (c *FakeDynamicClient) Watch(options metav1.ListOptions) (watch.Interface, error)
type FakeDynamicFactory ¶
func (*FakeDynamicFactory) ClientForGroupVersionKind ¶
func (df *FakeDynamicFactory) ClientForGroupVersionKind(gvk schema.GroupVersionKind, resource metav1.APIResource, namespace string) (client.Dynamic, error)
func (*FakeDynamicFactory) ClientForGroupVersionResource ¶
func (df *FakeDynamicFactory) ClientForGroupVersionResource(gvr schema.GroupVersionResource, resource metav1.APIResource, namespace string) (client.Dynamic, error)
type FakeMapper ¶
type FakeMapper struct { meta.RESTMapper AutoReturnResource bool Resources map[schema.GroupVersionResource]schema.GroupVersionResource }
func (*FakeMapper) ResourceFor ¶
func (m *FakeMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
type FakeSnapshotService ¶
type FakeSnapshotService struct { // SnapshotID->VolumeID SnapshotsTaken sets.String // VolumeID -> (SnapshotID, Type, Iops) SnapshottableVolumes map[string]api.VolumeBackupInfo // VolumeBackupInfo -> VolumeID RestorableVolumes map[api.VolumeBackupInfo]string }
func (*FakeSnapshotService) CreateSnapshot ¶
func (s *FakeSnapshotService) CreateSnapshot(volumeID string) (string, error)
func (*FakeSnapshotService) CreateVolumeFromSnapshot ¶
func (s *FakeSnapshotService) CreateVolumeFromSnapshot(snapshotID, volumeType string, iops *int) (string, error)
func (*FakeSnapshotService) DeleteSnapshot ¶
func (s *FakeSnapshotService) DeleteSnapshot(snapshotID string) error
func (*FakeSnapshotService) GetAllSnapshots ¶
func (s *FakeSnapshotService) GetAllSnapshots() ([]string, error)
func (*FakeSnapshotService) GetVolumeInfo ¶
func (s *FakeSnapshotService) GetVolumeInfo(volumeID string) (string, *int, error)
type TestBackup ¶
func NewTestBackup ¶
func NewTestBackup() *TestBackup
func (*TestBackup) WithExcludedNamespaces ¶
func (b *TestBackup) WithExcludedNamespaces(ns ...string) *TestBackup
func (*TestBackup) WithExcludedResources ¶
func (b *TestBackup) WithExcludedResources(r ...string) *TestBackup
func (*TestBackup) WithExpiration ¶
func (b *TestBackup) WithExpiration(expiration time.Time) *TestBackup
func (*TestBackup) WithIncludedNamespaces ¶
func (b *TestBackup) WithIncludedNamespaces(ns ...string) *TestBackup
func (*TestBackup) WithIncludedResources ¶
func (b *TestBackup) WithIncludedResources(r ...string) *TestBackup
func (*TestBackup) WithLabel ¶
func (b *TestBackup) WithLabel(key, value string) *TestBackup
func (*TestBackup) WithName ¶
func (b *TestBackup) WithName(name string) *TestBackup
func (*TestBackup) WithNamespace ¶
func (b *TestBackup) WithNamespace(namespace string) *TestBackup
func (*TestBackup) WithPhase ¶
func (b *TestBackup) WithPhase(phase v1.BackupPhase) *TestBackup
func (*TestBackup) WithSnapshot ¶
func (b *TestBackup) WithSnapshot(pv string, snapshot string) *TestBackup
func (*TestBackup) WithTTL ¶
func (b *TestBackup) WithTTL(ttl time.Duration) *TestBackup
func (*TestBackup) WithVersion ¶
func (b *TestBackup) WithVersion(version int) *TestBackup
type TestRestore ¶
func NewTestRestore ¶
func NewTestRestore(ns, name string, phase api.RestorePhase) *TestRestore
func (*TestRestore) WithBackup ¶
func (r *TestRestore) WithBackup(name string) *TestRestore
func (*TestRestore) WithErrors ¶
func (r *TestRestore) WithErrors(e api.RestoreResult) *TestRestore
func (*TestRestore) WithRestorableNamespace ¶
func (r *TestRestore) WithRestorableNamespace(name string) *TestRestore
func (*TestRestore) WithValidationError ¶
func (r *TestRestore) WithValidationError(err string) *TestRestore
type TestSchedule ¶
func NewTestSchedule ¶
func NewTestSchedule(namespace, name string) *TestSchedule
func (*TestSchedule) WithCronSchedule ¶
func (s *TestSchedule) WithCronSchedule(cronExpression string) *TestSchedule
func (*TestSchedule) WithLastBackupTime ¶
func (s *TestSchedule) WithLastBackupTime(timeString string) *TestSchedule
func (*TestSchedule) WithPhase ¶
func (s *TestSchedule) WithPhase(phase api.SchedulePhase) *TestSchedule
func (*TestSchedule) WithValidationError ¶
func (s *TestSchedule) WithValidationError(msg string) *TestSchedule
Click to show internal directories.
Click to hide internal directories.