aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/state.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/state.py')
-rw-r--r--src/hydrilla/proxy/state.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/hydrilla/proxy/state.py b/src/hydrilla/proxy/state.py
index 0c6dff3..0e45725 100644
--- a/src/hydrilla/proxy/state.py
+++ b/src/hydrilla/proxy/state.py
@@ -47,6 +47,7 @@ from ..exceptions import HaketiloException
from ..versions import VerTuple
from ..url_patterns import ParsedPattern
from .. import item_infos
+from .simple_dependency_satisfying import ImpossibleSituation
class EnabledStatus(Enum):
@@ -112,11 +113,19 @@ class RepoUrlInvalid(HaketiloException):
class RepoCommunicationError(HaketiloException):
pass
-@dc.dataclass
-class FileInstallationError(RepoCommunicationError):
+@dc.dataclass(frozen=True)
+class FileInstallationError(HaketiloException):
repo_id: str
sha256: str
+@dc.dataclass(frozen=True)
+class FileIntegrityError(FileInstallationError):
+ invalid_sha256: str
+
+@dc.dataclass(frozen=True)
+class FileMissingError(FileInstallationError):
+ pass
+
class RepoApiVersionUnsupported(HaketiloException):
pass
@@ -214,8 +223,11 @@ class MappingStore(Store[MappingRef]):
class MappingVersionRef(Ref):
"""...."""
@abstractmethod
- def update_status(self, new_status: EnabledStatus) -> None:
- """...."""
+ def install(self) -> None:
+ ...
+
+ @abstractmethod
+ def uninstall(self) -> None:
...
@abstractmethod