File size: 886 Bytes
bd4057b a318da0 bd4057b a318da0 bd4057b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any
class StorageBackend(ABC):
"""Abstract storage backend."""
@abstractmethod
def load_accounts(self) -> list[dict[str, Any]]:
pass
@abstractmethod
def save_accounts(self, accounts: list[dict[str, Any]]) -> None:
pass
@abstractmethod
def load_auth_keys(self) -> list[dict[str, Any]]:
pass
@abstractmethod
def save_auth_keys(self, auth_keys: list[dict[str, Any]]) -> None:
pass
@abstractmethod
def load_shop_state(self) -> dict[str, Any]:
pass
@abstractmethod
def save_shop_state(self, state: dict[str, Any]) -> None:
pass
@abstractmethod
def health_check(self) -> dict[str, Any]:
pass
@abstractmethod
def get_backend_info(self) -> dict[str, Any]:
pass
|