Spaces:
Paused
Paused
| from __future__ import annotations | |
| from abc import ABC, abstractmethod | |
| from typing import Any | |
| class StorageBackend(ABC): | |
| """抽象存储后端基类""" | |
| def load_accounts(self) -> list[dict[str, Any]]: | |
| """加载所有账号数据""" | |
| pass | |
| def save_accounts(self, accounts: list[dict[str, Any]]) -> None: | |
| """保存所有账号数据""" | |
| pass | |
| def load_auth_keys(self) -> list[dict[str, Any]]: | |
| """加载所有鉴权密钥数据""" | |
| pass | |
| def save_auth_keys(self, auth_keys: list[dict[str, Any]]) -> None: | |
| """保存所有鉴权密钥数据""" | |
| pass | |
| def health_check(self) -> dict[str, Any]: | |
| """健康检查,返回存储后端状态""" | |
| pass | |
| def get_backend_info(self) -> dict[str, Any]: | |
| """获取存储后端信息""" | |
| pass | |