Documentation ¶
Index ¶
- type Arguments
- type BigQueryJobCreator
- type BucketListingProcessorFactory
- type CalculatingProcessorFactory
- type CloudStorageJobCreator
- type CreatingProcessorFactory
- type DatasetListingProcessorFactory
- type GettingProcessorFactory
- type ListingProcessorFactory
- type Operations
- type Processor
- type RestoringProcessorFactory
- type Result
- type ScheduleProcessor
- type TrashcanEntry
- type UpdatingProcessorFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigQueryJobCreator ¶
type BigQueryJobCreator struct { BackupRepository repository.BackupRepository JobRepository repository.JobRepository SourceMetadataRepository repository.SourceMetadataRepository SourceMetadataJobRepository repository.SourceMetadataJobRepository BigQuery bigquery.Client }
BigQueryJobCreator prepares jobs for BigQuery
func NewBigQueryJobCreator ¶
func NewBigQueryJobCreator(ctxIn context.Context, backupRepository repository.BackupRepository, jobRepository repository.JobRepository, bigQueryClient bigquery.Client, sourceMetadataRepository repository.SourceMetadataRepository, sourceMetadataJobRepository repository.SourceMetadataJobRepository) *BigQueryJobCreator
NewBigQueryJobCreator return instance of BigQueryJobCreator
func (*BigQueryJobCreator) PrepareJobs ¶
func (b *BigQueryJobCreator) PrepareJobs(ctxIn context.Context, backup *repository.Backup) error
PrepareJobs new BigQuery extract job
type BucketListingProcessorFactory ¶
type BucketListingProcessorFactory struct {
// contains filtered or unexported fields
}
BucketListingProcessorFactory create Process for BucketListing
func NewBucketListingProcessorFactory ¶
func NewBucketListingProcessorFactory(backupProvider provider.SinkGCPProjectProvider, tokenSourceProvider impersonate.TargetPrincipalForProjectProvider) *BucketListingProcessorFactory
func (*BucketListingProcessorFactory) CreateProcessor ¶
func (c *BucketListingProcessorFactory) CreateProcessor(ctxIn context.Context) (Operations, error)
CreateProcessor return instance of Operations for BucketListing
func (*BucketListingProcessorFactory) DoMatchRequestType ¶
func (c *BucketListingProcessorFactory) DoMatchRequestType(requestType requestobjects.RequestType) bool
DoMatchRequestType does request type match BucketListing
type CalculatingProcessorFactory ¶
type CalculatingProcessorFactory struct {
// contains filtered or unexported fields
}
CalculatingProcessorFactory create Process for Calculating
func NewCalculatingProcessorFactory ¶
func NewCalculatingProcessorFactory(backupProvider provider.SinkGCPProjectProvider, tokenSourceProvider impersonate.TargetPrincipalForProjectProvider) *CalculatingProcessorFactory
func (CalculatingProcessorFactory) CreateProcessor ¶
func (c CalculatingProcessorFactory) CreateProcessor(ctxIn context.Context) (Operations, error)
CreateProcessor return instance of Operations for Calculating
func (CalculatingProcessorFactory) DoMatchRequestType ¶
func (c CalculatingProcessorFactory) DoMatchRequestType(requestType requestobjects.RequestType) bool
DoMatchRequestType does request type match Calculating
type CloudStorageJobCreator ¶
type CloudStorageJobCreator struct {
// contains filtered or unexported fields
}
CloudStorageJobCreator will create Transfer Jobs in GCP to backup GCS
func NewCloudStorageJobCreator ¶
func NewCloudStorageJobCreator(ctxIn context.Context, backupRepository repository.BackupRepository, jobRepository repository.JobRepository) *CloudStorageJobCreator
NewCloudStorageJobCreator return instance of CloudStorageJobCreator
func (*CloudStorageJobCreator) PrepareJobs ¶
func (b *CloudStorageJobCreator) PrepareJobs(ctxIn context.Context, backup *repository.Backup) error
PrepareJobs for GCS backup
type CreatingProcessorFactory ¶
type CreatingProcessorFactory struct {
// contains filtered or unexported fields
}
CreatingProcessorFactory create Process for Creating
func NewCreatingProcessorFactory ¶
func NewCreatingProcessorFactory(backupProvider provider.SinkGCPProjectProvider, tokenSourceProvider impersonate.TargetPrincipalForProjectProvider, credentialsProvider secret.SecretProvider) *CreatingProcessorFactory
func (*CreatingProcessorFactory) CreateProcessor ¶
func (c *CreatingProcessorFactory) CreateProcessor(ctxIn context.Context) (Operations, error)
CreateProcessor return instance of Operations for Creating
func (*CreatingProcessorFactory) DoMatchRequestType ¶
func (c *CreatingProcessorFactory) DoMatchRequestType(requestType requestobjects.RequestType) bool
DoMatchRequestType does request type match Creating
type DatasetListingProcessorFactory ¶
type DatasetListingProcessorFactory struct {
// contains filtered or unexported fields
}
DatasetListingProcessorFactory create Process for DatasetListing
func NewDatasetListingProcessorFactory ¶
func NewDatasetListingProcessorFactory(backupProvider provider.SinkGCPProjectProvider, tokenSourceProvider impersonate.TargetPrincipalForProjectProvider) *DatasetListingProcessorFactory
func (*DatasetListingProcessorFactory) CreateProcessor ¶
func (c *DatasetListingProcessorFactory) CreateProcessor(ctxIn context.Context) (Operations, error)
CreateProcessor return instance of Operations for DatasetListing
func (*DatasetListingProcessorFactory) DoMatchRequestType ¶
func (c *DatasetListingProcessorFactory) DoMatchRequestType(requestType requestobjects.RequestType) bool
DoMatchRequestType does request type match Listing
type GettingProcessorFactory ¶
type GettingProcessorFactory struct {
// contains filtered or unexported fields
}
GettingProcessorFactory create Process for Getting
func NewGettingProcessorFactory ¶
func NewGettingProcessorFactory(tokenSourceProvider impersonate.TargetPrincipalForProjectProvider, credentialProvider secret.SecretProvider) *GettingProcessorFactory
func (GettingProcessorFactory) CreateProcessor ¶
func (c GettingProcessorFactory) CreateProcessor(ctxIn context.Context) (Operations, error)
CreateProcessor return instance of Operations for Getting
func (GettingProcessorFactory) DoMatchRequestType ¶
func (c GettingProcessorFactory) DoMatchRequestType(requestType requestobjects.RequestType) bool
DoMatchRequestType does request type match Getting
type ListingProcessorFactory ¶
type ListingProcessorFactory struct {
// contains filtered or unexported fields
}
ListingProcessorFactory create Process for Listing
func NewListingProcessorFactory ¶
func NewListingProcessorFactory(tokenSourceProvider impersonate.TargetPrincipalForProjectProvider, credentialsProvider secret.SecretProvider) *ListingProcessorFactory
func (ListingProcessorFactory) CreateProcessor ¶
func (c ListingProcessorFactory) CreateProcessor(ctxIn context.Context) (Operations, error)
CreateProcessor return instance of Operations for Listing
func (ListingProcessorFactory) DoMatchRequestType ¶
func (c ListingProcessorFactory) DoMatchRequestType(requestType requestobjects.RequestType) bool
DoMatchRequestType does request type match Listing
type Operations ¶
Operations define operations for processors
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor handle request
type RestoringProcessorFactory ¶
type RestoringProcessorFactory struct {
// contains filtered or unexported fields
}
RestoringProcessorFactory create Operations for Restoring
func NewRestoringProcessorFactory ¶
func NewRestoringProcessorFactory(tokenSourceProvider impersonate.TargetPrincipalForProjectProvider, credentialsProvider secret.SecretProvider) *RestoringProcessorFactory
func (RestoringProcessorFactory) CreateProcessor ¶
func (c RestoringProcessorFactory) CreateProcessor(ctxIn context.Context) (Operations, error)
CreateProcessor return Operations for Restoring
func (RestoringProcessorFactory) DoMatchRequestType ¶
func (c RestoringProcessorFactory) DoMatchRequestType(requestType requestobjects.RequestType) bool
DoMatchRequestType does request type match Restoring
type Result ¶
type Result struct { JobsTotal uint64 BucketListResponse *requestobjects.BucketListResponse CalculateResponse *requestobjects.CalculatedResponse DatasetListResponse *requestobjects.DatasetListResponse // contains filtered or unexported fields }
Result for a request
func (Result) GetBackups ¶
func (pr Result) GetBackups() []*repository.Backup
GetBackups returns backups
type ScheduleProcessor ¶
type ScheduleProcessor interface { CreateBigQueryJobCreator(ctxIn context.Context, client bigquery.Client) *BigQueryJobCreator CreateCloudStorageJobCreator(ctxIn context.Context) *CloudStorageJobCreator GetNextBackupJobs(context.Context, repository.BackupType) ([]*repository.Job, error) GetScheduledBackupJobs(context.Context, repository.BackupType) ([]*repository.Job, error) GetExpired(context.Context, repository.BackupType) ([]*repository.Backup, error) GetExpiredBigQueryMirrorRevisions(ctxIn context.Context, maxRevisionLifetimeInWeeks int) ([]*repository.MirrorRevision, error) GetScheduledBackups(context.Context, repository.BackupType) ([]*repository.Backup, error) GetByStatusAndAfter(context.Context, []repository.JobStatus, int) ([]*repository.Job, error) GetJobsForBackupID(ctxIn context.Context, backupID string, jobPage repository.JobPage) ([]*repository.Job, error) UpdateJob(ctxIn context.Context, backupType repository.BackupType, jobID string, status repository.JobStatus, externalID string) error UpdateBackupStatus(ctxIn context.Context, id string, status repository.BackupStatus) error UpdateLastCleanupTime(ctxIn context.Context, backupID string, lastCleanupTime time.Time) error MarkBackupDeleted(ctxIn context.Context, id string) error MarkSourceMetadataDeleted(ctxIn context.Context, id int) error MarkJobDeleted(ctxIn context.Context, id string) error GetBackupForID(ctxIn context.Context, id string) (*repository.Backup, error) AddTrashcanEntry(ctxIn context.Context, backupID string, source string, timestamp time.Time) error DeleteTrashcanEntry(ctxIn context.Context, backupID string, source string) error FilterExistingTrashcanEntries(context.Context, []TrashcanEntry) ([]TrashcanEntry, error) GetEntriesInTrashcanBefore(ctxIn context.Context, deltaWeeks int) ([]*repository.SourceTrashcan, error) }
ScheduleProcessor defines operation for scheduling
func NewScheduleProcessor ¶
func NewScheduleProcessor(ctxIn context.Context, credentialsProvider secret.SecretProvider) (ScheduleProcessor, error)
NewScheduleProcessor create new instance of ScheduleProcessor
type TrashcanEntry ¶
TrashcanEntry moved objects into trashcan
type UpdatingProcessorFactory ¶
type UpdatingProcessorFactory struct {
// contains filtered or unexported fields
}
UpdatingProcessorFactory factory for operation Updating
func NewUpdatingProcessorFactory ¶
func NewUpdatingProcessorFactory(tokenSourceProvider impersonate.TargetPrincipalForProjectProvider, credentialsProvider secret.SecretProvider) *UpdatingProcessorFactory
func (UpdatingProcessorFactory) CreateProcessor ¶
func (c UpdatingProcessorFactory) CreateProcessor(ctxIn context.Context) (Operations, error)
CreateProcessor create instance of Operations
func (UpdatingProcessorFactory) DoMatchRequestType ¶
func (c UpdatingProcessorFactory) DoMatchRequestType(requestType requestobjects.RequestType) bool
DoMatchRequestType compare request string type to Updating
Source Files ¶
- bigquery_job_creator.go
- bucket_listing_processor_factory.go
- calculating_processor_factory.go
- cloudstorage_job_creator.go
- creating_processor_factory.go
- dataset_listing_processor_factory.go
- getting_processor_factory.go
- listing_processor_factory.go
- processor.go
- restoring_processor_factory.go
- schedule_processor.go
- updating_processor_factory.go