memory

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupRepository

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

BackupRepository access to stored state of backups

func (*BackupRepository) AddBackup

func (r *BackupRepository) AddBackup(ctxIn context.Context, backup *repository.Backup) (*repository.Backup, error)

AddBackup create new backup

func (*BackupRepository) GetBackup

func (r *BackupRepository) GetBackup(ctxIn context.Context, backupID string) (*repository.Backup, error)

GetBackup get backup details

func (*BackupRepository) GetBackups

func (r *BackupRepository) GetBackups(ctxIn context.Context, backupFilter repository.BackupFilter) (backups []*repository.Backup, err error)

GetBackups list backups with filtering

func (*BackupRepository) GetBigQueryOneShotSnapshots

func (r *BackupRepository) GetBigQueryOneShotSnapshots(ctxIn context.Context, status repository.BackupStatus) (backups []*repository.Backup, err error)

GetBigQueryOneShotSnapshots return backups that are BigQuery with strategy Snapshot

func (*BackupRepository) GetByBackupStatus

func (r *BackupRepository) GetByBackupStatus(ctxIn context.Context, status repository.BackupStatus) (backups []*repository.Backup, err error)

GetByBackupStatus return backups by status

func (*BackupRepository) GetByBackupStrategy

func (r *BackupRepository) GetByBackupStrategy(ctxIn context.Context, strategy repository.Strategy) (backups []*repository.Backup, err error)

GetByBackupStrategy return backups by strategy

func (*BackupRepository) GetExpired

func (r *BackupRepository) GetExpired(context.Context, repository.BackupType) (backups []*repository.Backup, err error)

GetExpired returns backups that are expired

func (*BackupRepository) GetExpiredBigQueryMirrorRevisions

func (r *BackupRepository) GetExpiredBigQueryMirrorRevisions(ctxIn context.Context, maxRevisionLifetimeInWeeks int) ([]*repository.MirrorRevision, error)

GetExpiredBigQueryMirrorRevisions is not implemented

func (*BackupRepository) GetScheduledBackups

func (r *BackupRepository) GetScheduledBackups(ctxIn context.Context, backupType repository.BackupType) (backups []*repository.Backup, err error)

GetScheduledBackups list backups that can have a new job prepared

func (*BackupRepository) MarkDeleted

func (r *BackupRepository) MarkDeleted(ctxIn context.Context, backupID string) error

MarkDeleted mark backup as deleted

func (*BackupRepository) MarkStatus

func (r *BackupRepository) MarkStatus(ctxIn context.Context, backupID string, status repository.BackupStatus) error

MarkStatus mark backup as status

func (*BackupRepository) UpdateBackup

func (r *BackupRepository) UpdateBackup(ctxIn context.Context, updateFields repository.UpdateFields) error

UpdateBackupStatus is not implemented

func (*BackupRepository) UpdateBackupStatus

func (r *BackupRepository) UpdateBackupStatus(ctxIn context.Context, backupID string, status repository.BackupStatus) error

UpdateBackupStatus change backup status

func (*BackupRepository) UpdateLastCleanupTime

func (r *BackupRepository) UpdateLastCleanupTime(ctxIn context.Context, backupID string, lastCleanupTime time.Time) error

UpdateLastCleanupTime is not implemented

func (*BackupRepository) UpdateLastScheduledTime

func (r *BackupRepository) UpdateLastScheduledTime(ctxIn context.Context, backupID string, lastScheduledTime time.Time, status repository.BackupStatus) error

UpdateLastScheduledTime set last time when backup was scheduled

type DefaultSourceMetadataJobRepository

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

DefaultSourceMetadataJobRepository gives possibility to add new SourceMetadataJob

func (*DefaultSourceMetadataJobRepository) Add

func (r *DefaultSourceMetadataJobRepository) Add(ctxIn context.Context, sourceMetadataID int, jobID string) error

Add gives possibility add new SourceMetadataJob

type JobRepository

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

JobRepository is a client to a backup job

func (*JobRepository) AddJob

func (r *JobRepository) AddJob(ctxIn context.Context, job *repository.Job) error

AddJob add new backup job

func (*JobRepository) AddJobs

func (r *JobRepository) AddJobs(ctxIn context.Context, jobs []*repository.Job) error

AddJobs add new backup jobs

func (*JobRepository) DeleteJob

func (r *JobRepository) DeleteJob(ctxIn context.Context, jobID string) error

DeleteJob remove job

func (*JobRepository) GetBackupRestoreJobs

func (r *JobRepository) GetBackupRestoreJobs(ctxIn context.Context, backupID, jobID string) ([]*repository.Job, error)

GetBackupRestoreJobs is not implemented

func (*JobRepository) GetByJobTypeAndStatus

func (r *JobRepository) GetByJobTypeAndStatus(ctxIn context.Context, backupType repository.BackupType, jobStatus ...repository.JobStatus) (jobs []*repository.Job, err error)

GetByJobTypeAndStatus filter backup jobs by status and type

func (*JobRepository) GetByStatusAndBefore

func (r *JobRepository) GetByStatusAndBefore(ctxIn context.Context, status []repository.JobStatus, deltaHours int) ([]*repository.Job, error)

GetByStatusAndBefore is not implemented

func (*JobRepository) GetJob

func (r *JobRepository) GetJob(ctxIn context.Context, jobID string) (*repository.Job, error)

GetJob get backup job details

func (*JobRepository) GetJobsForBackupID

func (r *JobRepository) GetJobsForBackupID(ctxIn context.Context, backupID string, jobPage repository.JobPage) (jobs []*repository.Job, err error)

GetJobsForBackupID get all backup jobs

func (*JobRepository) GetLastJobsForBackup

func (r *JobRepository) GetLastJobsForBackup(ctxIn context.Context, backupID string) (jobs []*repository.Job, err error)

GetLastJobsForBackup get backup jos that weren't scheduled

func (*JobRepository) GetMostRecentJobForBackupID added in v1.3.0

func (r *JobRepository) GetMostRecentJobForBackupID(ctxIn context.Context, backupID string, status ...repository.JobStatus) (*repository.Job, error)

func (*JobRepository) GetStatisticsForBackupID

func (r *JobRepository) GetStatisticsForBackupID(ctxIn context.Context, backupID string) (repository.JobStatistics, error)

GetStatisticsForBackupID prepare stats for a backup

func (*JobRepository) MarkDeleted

func (r *JobRepository) MarkDeleted(ctxIn context.Context, jobID string) error

MarkDeleted mark BigQuery job as deleted

func (*JobRepository) PatchJobStatus

func (r *JobRepository) PatchJobStatus(ctxIn context.Context, patch repository.JobPatch) error

PatchJobStatus change job status

type SourceMetadataJob

type SourceMetadataJob struct {
	SourceMetadataID int
	JobID            string
}

SourceMetadataJob defines table version backup job

type SourceMetadataRepository

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

SourceMetadataRepository storage for a source metadata

func (*SourceMetadataRepository) Add

Add create a new source metadata

func (*SourceMetadataRepository) GetLastByBackupID

func (r *SourceMetadataRepository) GetLastByBackupID(ctxIn context.Context, backupID string) (sourceMetadata []*repository.SourceMetadata, err error)

GetLastByBackupID list all source metadata for a backup

func (*SourceMetadataRepository) MarkDeleted

func (r *SourceMetadataRepository) MarkDeleted(ctxIn context.Context, id int) error

MarkDeleted mark table as deleted

Jump to

Keyboard shortcuts

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