Versions in this module Expand all Collapse all v0 v0.1.0 Oct 18, 2026 Changes in this version + var ErrBackupPointNotFound = errors.New("engine: no backup point exists with that id") + var ErrEmptyNameQuery = errors.New("engine: FindItemsByName requires a non-empty name") + var ErrEmptyTagFilter = errors.New("engine: this operation requires at least one tag") + var ErrFolderNotFound = errors.New("engine: no folder with that id in that backup point") + var ErrIncompleteBackupPoint = errors.New("engine: backup point is not independently restorable") + var ErrMissingBackupPointID = errors.New("engine: a backup point id is required") + var ErrMissingStorageCredentials = errors.New(...) + var ErrRepositoryExists = errors.New("engine: a repository already exists with that configuration") + var ErrReservedTagKey = errors.New("engine: tag key is reserved by the backup engine") + var ErrReservedTagPrefix = errors.New("engine: tag key uses a prefix reserved by the backup engine") + var ErrTagTooLarge = errors.New("engine: tag key or value is too large") + var ErrTagsTooLarge = errors.New("engine: tags are too large in total") + var ErrTooManyTags = errors.New("engine: too many tags") + type BackupPoint struct + BytesUploaded int64 + CreatedAt time.Time + ErrorCount int + ID string + ItemsRead int64 + Tags map[string]string + Type BackupPointType + type BackupPointType string + const BackupPointTypeAssist + const BackupPointTypeMerge + const BackupPointTypePreview + const BackupPointTypeUnknown + func (t BackupPointType) IsIndependentlyRestorable() bool + type BackupRequest struct + Progress ProgressFunc + Selector selectors.Selector + Tags map[string]string + type FindItemsRequest struct + AllowIncompletePoints bool + Match NameMatch + Name string + Tags map[string]string + type FindItemsResult struct + Items []FoundItem + UnreadableBackupPointIDs []string + type Folder struct + Category string + DriveID string + DriveName string + ID string + ModifiedAt time.Time + Name string + ParentID string + Path string + Service string + SizeBytes int64 + type FolderTree struct + BackupPointID string + Folders []Folder + IndependentlyRestorable bool + PointType BackupPointType + type FolderTreeRequest struct + AllowIncompletePoint bool + BackupPointID string + type FoundItem struct + BackupPointCreatedAt time.Time + BackupPointID string + BackupPointIndependentlyRestorable bool + BackupPointType BackupPointType + Item Item + type Item struct + Category string + CreatedAt time.Time + DriveID string + DriveName string + FolderID string + FolderPath string + ID string + ItemCount int64 + ModifiedAt time.Time + Name string + Service string + SizeBytes int64 + type ItemList struct + BackupPointID string + IndependentlyRestorable bool + Items []Item + PointType BackupPointType + type ItemsRequest struct + AllowIncompletePoint bool + BackupPointID string + FolderID string + type MaintenanceOptions struct + Force bool + Metadata bool + type NameMatch string + const NameMatchContains + const NameMatchExact + type ProgressFunc func(ProgressSnapshot) + type ProgressSnapshot struct + Counts map[string]int64 + Done bool + type Repository struct + func InitializeRepository(ctx context.Context, cfg RepositoryConfig) (*Repository, error) + func OpenRepository(ctx context.Context, cfg RepositoryConfig) (*Repository, error) + func (r *Repository) Backup(ctx context.Context, req BackupRequest) (BackupPoint, error) + func (r *Repository) Close(ctx context.Context) error + func (r *Repository) DeleteBackupPoints(ctx context.Context, tags map[string]string) ([]string, error) + func (r *Repository) FindItemsByName(ctx context.Context, req FindItemsRequest) (FindItemsResult, error) + func (r *Repository) ID() string + func (r *Repository) ListBackupPoints(ctx context.Context, tags map[string]string) ([]BackupPoint, error) + func (r *Repository) ListFolders(ctx context.Context, req FolderTreeRequest) (FolderTree, error) + func (r *Repository) ListItems(ctx context.Context, req ItemsRequest) (ItemList, error) + func (r *Repository) RunMaintenance(ctx context.Context, opts MaintenanceOptions) error + type RepositoryConfig struct + Account account.Account + Options control.Options + Storage storage.Storage + func (cfg RepositoryConfig) GoString() string + func (cfg RepositoryConfig) LogValue() slog.Value + func (cfg RepositoryConfig) MarshalJSON() ([]byte, error) + func (cfg RepositoryConfig) String() string