mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 20:11:30 +00:00
feature(backups): placeholders for the backupers and backup providers
This commit is contained in:
parent
a98314bb60
commit
23e3d553e6
|
@ -0,0 +1,5 @@
|
||||||
|
from abc import ABC
|
||||||
|
|
||||||
|
class AbstractBackuper(ABC):
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
|
@ -0,0 +1,6 @@
|
||||||
|
from .provider import AbstractBackupProvider
|
||||||
|
from selfprivacy_api.backup.restic_backuper import ResticBackuper
|
||||||
|
|
||||||
|
|
||||||
|
class Backblaze(AbstractBackupProvider):
|
||||||
|
backuper = ResticBackuper()
|
|
@ -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
|
6
selfprivacy_api/backup/restic_backuper.py
Normal file
6
selfprivacy_api/backup/restic_backuper.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
from selfprivacy_api.backup import AbstractBackuper
|
||||||
|
|
||||||
|
|
||||||
|
class ResticBackuper(AbstractBackuper):
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
Loading…
Reference in a new issue