Download services/storage/base.py from Good12313/c2a: direct link, hf CLI and curl.
- Browser
- Download file 967 Bytes
-
https://huggingface.co/spaces/Good12313/c2a/resolve/main/services/storage/base.py
- Command line
-
hf download hf://spaces/Good12313/c2a/services/storage/base.py
-
curl -L -o base.py https://huggingface.co/spaces/Good12313/c2a/resolve/main/services/storage/base.py
967 Bytes
| 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 | |