sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)

This commit is contained in:
gozeros committed 2026-10-21 14:51:31 +08:00
1 parent 4f7f07504a
commit 8bc8b0e082
1651 files changed
+278599 -11416

No files matched your search

@@ -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