feature(backups): register localfile backend

This commit is contained in:
Houkime 2023-02-20 11:44:59 +00:00
parent aeb66b9c72
commit 0ce6624d5a
2 changed files with 3 additions and 0 deletions

View file

@ -3,10 +3,12 @@ from selfprivacy_api.backup.providers.provider import AbstractBackupProvider
from selfprivacy_api.backup.providers.backblaze import Backblaze from selfprivacy_api.backup.providers.backblaze import Backblaze
from selfprivacy_api.backup.providers.memory import InMemoryBackup from selfprivacy_api.backup.providers.memory import InMemoryBackup
from selfprivacy_api.backup.providers.local_file import LocalFileBackup
PROVIDER_MAPPING = { PROVIDER_MAPPING = {
BackupProvider.BACKBLAZE: Backblaze, BackupProvider.BACKBLAZE: Backblaze,
BackupProvider.MEMORY: InMemoryBackup, BackupProvider.MEMORY: InMemoryBackup,
BackupProvider.FILE: LocalFileBackup,
} }

View file

@ -20,3 +20,4 @@ class BackupProvider(Enum):
BACKBLAZE = "BACKBLAZE" BACKBLAZE = "BACKBLAZE"
# for testing purposes, make sure not selectable in prod. # for testing purposes, make sure not selectable in prod.
MEMORY = "MEMORY" MEMORY = "MEMORY"
FILE = "FILE"