refactor(services): add overridable get owner and get group

restic-rewrite-api
Houkime 2023-04-17 15:00:36 +00:00
parent 0b7d2d0bf4
commit c34eb6d447
1 changed files with 8 additions and 0 deletions

View File

@ -62,6 +62,14 @@ class Service(ABC):
def get_url() -> typing.Optional[str]:
pass
@classmethod
def get_user(cls) -> typing.Optional[str]:
return cls.get_id()
@classmethod
def get_group(cls) -> typing.Optional[str]:
return cls.get_user()
@staticmethod
@abstractmethod
def is_movable() -> bool: