Documentation
¶
Index ¶
- type Archive
- type ArchiveAsset
- type BackupArchive
- type BackupSource
- func (bs *BackupSource) DeleteArchive(ctx context.Context, archivePath string) error
- func (bs *BackupSource) FindArchivedAssets(ctx context.Context) (iter.Seq[asset.ArchivedAsset], error)
- func (bs *BackupSource) FindArchives(ctx context.Context, opts ...FindArchivesOptions) (iter.Seq[BackupArchive], error)
- func (bs *BackupSource) FindMissingAssets(ctx context.Context, from iter.Seq[asset.Asset]) (iter.Seq[asset.Asset], error)
- func (bs *BackupSource) Path() string
- func (bs *BackupSource) Register(ctx context.Context, from iter.Seq[asset.ArchivedAsset]) error
- type Database
- type FindArchivesOptions
- type FindArchivesOrderBy
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveAsset ¶
type BackupArchive ¶
type BackupSource ¶
type BackupSource struct {
// contains filtered or unexported fields
}
func (*BackupSource) DeleteArchive ¶
func (bs *BackupSource) DeleteArchive(ctx context.Context, archivePath string) error
func (*BackupSource) FindArchivedAssets ¶
func (bs *BackupSource) FindArchivedAssets(ctx context.Context) (iter.Seq[asset.ArchivedAsset], error)
Find archived assets for this source. Only new versions are returned.
func (*BackupSource) FindArchives ¶
func (bs *BackupSource) FindArchives(ctx context.Context, opts ...FindArchivesOptions) (iter.Seq[BackupArchive], error)
func (*BackupSource) FindMissingAssets ¶
func (bs *BackupSource) FindMissingAssets( ctx context.Context, from iter.Seq[asset.Asset], ) (iter.Seq[asset.Asset], error)
Find assets that are not in the provided sequence.
func (*BackupSource) Path ¶
func (bs *BackupSource) Path() string
func (*BackupSource) Register ¶
func (bs *BackupSource) Register(ctx context.Context, from iter.Seq[asset.ArchivedAsset]) error
type FindArchivesOptions ¶
type FindArchivesOptions func(*findArchivesOptions)
func WithFindArchivesLimit ¶
func WithFindArchivesLimit(limit int) FindArchivesOptions
Limit the number of archives returned.
func WithFindArchivesMaxUncompressedSize ¶
func WithFindArchivesMaxUncompressedSize(maxSize int64) FindArchivesOptions
Limit the maximum uncompressed size of archives returned.
func WithFindArchivesOnlyFullyBackedUp ¶
func WithFindArchivesOnlyFullyBackedUp() FindArchivesOptions
Find only archives where all assets are also backed up in newer archives.
func WithFindArchivesOrderBy ¶
func WithFindArchivesOrderBy(order FindArchivesOrderBy) FindArchivesOptions
Return the archives in a specific order.
type FindArchivesOrderBy ¶
type FindArchivesOrderBy string
const ( // Order by size, smallest first. FindArchivesOrderBySize FindArchivesOrderBy = "size" )
Click to show internal directories.
Click to hide internal directories.