summaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/state.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-11 13:33:06 +0200
committerWojtek Kosior <koszko@koszko.org>2022-08-11 13:33:06 +0200
commit67c58a14f4f356117f42fea368a32359496d46c4 (patch)
treebb8d1019dc4547a215404a40b60a031ca4f2e21d /src/hydrilla/proxy/state.py
parent3f3ba519ae3c3346945928b21ab36f7238e5387e (diff)
downloadhaketilo-hydrilla-67c58a14f4f356117f42fea368a32359496d46c4.tar.gz
haketilo-hydrilla-67c58a14f4f356117f42fea368a32359496d46c4.zip
populate data structures based on payloads data loaded from sqlite db
Diffstat (limited to 'src/hydrilla/proxy/state.py')
-rw-r--r--src/hydrilla/proxy/state.py31
1 files changed, 7 insertions, 24 deletions
diff --git a/src/hydrilla/proxy/state.py b/src/hydrilla/proxy/state.py
index e22c9fe..f511056 100644
--- a/src/hydrilla/proxy/state.py
+++ b/src/hydrilla/proxy/state.py
@@ -140,39 +140,22 @@ class PayloadKey:
"""...."""
payload_ref: 'PayloadRef'
- mapping_identifier: str
- # mapping_version: VerTuple
- # mapping_repo: str
- # mapping_repo_iteration: int
- pattern: ParsedPattern
+ mapping_identifier: str
def __lt__(self, other: 'PayloadKey') -> bool:
"""...."""
- return (
- self.mapping_identifier,
- # other.mapping_version,
- # self.mapping_repo,
- # other.mapping_repo_iteration,
- self.pattern
- ) < (
- other.mapping_identifier,
- # self.mapping_version,
- # other.mapping_repo,
- # self.mapping_repo_iteration,
- other.pattern
- )
+ return self.mapping_identifier < other.mapping_identifier
@dc.dataclass(frozen=True)
class PayloadData:
"""...."""
payload_ref: 'PayloadRef'
- mapping_installed: bool
- explicitly_enabled: bool
- unique_token: str
- pattern: ParsedPattern
- eval_allowed: bool
- cors_bypass_allowed: bool
+ explicitly_enabled: bool
+ unique_token: str
+ pattern_path_segments: tuple[str, ...]
+ eval_allowed: bool
+ cors_bypass_allowed: bool
@dc.dataclass(frozen=True)
class FileData: