feature(backups): placeholders for the backupers and backup providers

This commit is contained in:
Houkime 2023-01-23 13:43:18 +00:00
parent a98314bb60
commit 23e3d553e6
4 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,5 @@
from abc import ABC
class AbstractBackuper(ABC):
def __init__(self):
pass

View file

@ -0,0 +1,6 @@
from .provider import AbstractBackupProvider
from selfprivacy_api.backup.restic_backuper import ResticBackuper
class Backblaze(AbstractBackupProvider):
backuper = ResticBackuper()

View file

@ -0,0 +1,13 @@
"""
An abstract class for BackBlaze, S3 etc.
It assumes that while some providers are supported via restic/rclone, others may
require different backends
"""
from abc import ABC
from selfprivacy_api.backup import AbstractBackuper
class AbstractBackupProvider(ABC):
@property
def backuper(self) -> AbstractBackuper:
raise NotImplementedError

View file

@ -0,0 +1,6 @@
from selfprivacy_api.backup import AbstractBackuper
class ResticBackuper(AbstractBackuper):
def __init__(self):
pass