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.py33
1 files changed, 28 insertions, 5 deletions
diff --git a/src/hydrilla/proxy/state.py b/src/hydrilla/proxy/state.py
index 03b6291..491a865 100644
--- a/src/hydrilla/proxy/state.py
+++ b/src/hydrilla/proxy/state.py
@@ -337,7 +337,7 @@ class ResourceVersionStore(Store[ResourceVersionRef]):
@dc.dataclass(frozen=True)
class PayloadKey:
"""...."""
- payload_ref: 'PayloadRef'
+ ref: 'PayloadRef'
mapping_identifier: str
@@ -348,13 +348,22 @@ class PayloadKey:
@dc.dataclass(frozen=True)
class PayloadData:
"""...."""
- payload_ref: 'PayloadRef'
+ ref: 'PayloadRef'
explicitly_enabled: bool
unique_token: str
pattern_path_segments: tuple[str, ...]
eval_allowed: bool
cors_bypass_allowed: bool
+ global_secret: bytes
+
+@dc.dataclass(frozen=True)
+class PayloadDisplayInfo:
+ ref: 'PayloadRef'
+
+ mapping_info: MappingVersionDisplayInfo
+ pattern: str
+ has_problems: bool
@dc.dataclass(frozen=True)
class FileData:
@@ -371,7 +380,15 @@ class PayloadRef(Ref):
...
@abstractmethod
- def get_mapping(self) -> MappingVersionRef:
+ def has_problems(self) -> bool:
+ ...
+
+ @abstractmethod
+ def get_display_info(self) -> PayloadDisplayInfo:
+ ...
+
+ @abstractmethod
+ def ensure_items_installed(self) -> None:
"""...."""
...
@@ -387,6 +404,9 @@ class PayloadRef(Ref):
"""...."""
...
+class PayloadStore(Store[PayloadRef]):
+ pass
+
class MappingUseMode(Enum):
"""
@@ -449,8 +469,11 @@ class HaketiloState(ABC):
...
@abstractmethod
- def get_payload(self, payload_id: str) -> PayloadRef:
- """...."""
+ def payload_store(self) -> PayloadStore:
+ ...
+
+ @abstractmethod
+ def get_secret(self) -> bytes:
...
@abstractmethod