sync update from LAN repo (source ji @ 85078a31)
This commit is contained in:
1 parent
5d6627af50
commit
e602d88695
864 files changed
+99150
-6346
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
"""Persistence contract for the global upload policy document."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any
|
||||
|
||||
|
||||
class UploadPolicyStore(ABC):
|
||||
@abstractmethod
|
||||
async def ensure_seed(self, policy: dict[str, Any]) -> dict[str, Any]:
|
||||
"""Create the default row if missing without overwriting saved edits."""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def get_policy(self) -> dict[str, Any] | None:
|
||||
"""Return the stored policy, or ``None`` before the first save."""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def set_policy(self, policy: dict[str, Any], *, updated_by: str | None = None) -> dict[str, Any]:
|
||||
"""Atomically replace the global policy document."""
|
||||
|
||||
raise NotImplementedError
|
||||
Reference in new issue
Block a user