mocks

package module
v0.0.0-...-9e38f01 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockProvider

type MockProvider struct {
	// contains filtered or unexported fields
}

MockProvider is a mock implementation of the Provider interface for testing

func NewMockProvider

func NewMockProvider() *MockProvider

NewMockProvider creates a new mock provider

func (*MockProvider) ClearBackups

func (m *MockProvider) ClearBackups()

ClearBackups removes all backups from the mock

func (*MockProvider) CreateBackup

func (m *MockProvider) CreateBackup(ctx context.Context, name string, data io.Reader, opts *types.BackupOptions) (*types.BackupMetadata, error)

CreateBackup creates a mock backup

func (*MockProvider) DeleteBackup

func (m *MockProvider) DeleteBackup(ctx context.Context, backupID string) error

DeleteBackup removes a mock backup

func (*MockProvider) GetBackup

func (m *MockProvider) GetBackup(ctx context.Context, backupID string) (*types.BackupMetadata, error)

GetBackup retrieves mock backup metadata

func (*MockProvider) GetBackupCount

func (m *MockProvider) GetBackupCount() int

GetBackupCount returns the number of backups in the mock

func (*MockProvider) HealthCheck

func (m *MockProvider) HealthCheck(ctx context.Context) error

HealthCheck always returns success for mock

func (*MockProvider) ListBackups

func (m *MockProvider) ListBackups(ctx context.Context) ([]*types.BackupMetadata, error)

ListBackups lists all mock backups

func (*MockProvider) RestoreBackup

func (m *MockProvider) RestoreBackup(ctx context.Context, backupID string, writer io.Writer, opts *types.RestoreOptions) error

RestoreBackup restores a mock backup

Jump to

Keyboard shortcuts

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