2023-02-08 16:57:34 +02:00
|
|
|
from abc import ABC, abstractmethod
|
2023-02-13 13:16:35 +02:00
|
|
|
from typing import List
|
|
|
|
|
|
|
|
from selfprivacy_api.models.backup.snapshot import Snapshot
|
2023-02-08 16:57:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
class AbstractBackuper(ABC):
|
|
|
|
def __init__(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def start_backup(self, folder: str, repo_name: str):
|
|
|
|
raise NotImplementedError
|
2023-02-13 13:16:35 +02:00
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def get_snapshots(self, repo_name) -> List[Snapshot]:
|
|
|
|
"""Get all snapshots from the repo"""
|
|
|
|
raise NotImplementedError
|