Files
gps-denied-desktop/components/configuration_manager/base.py
T
Oleksandr Bezdieniezhnykh abc26d5c20 initial structure implemented
docs -> _docs
2025-12-01 14:20:56 +02:00

36 lines
804 B
Python

from abc import ABC, abstractmethod
from typing import Optional, Any
from models.config import SystemConfig
class ConfigurationManagerBase(ABC):
@abstractmethod
async def load_config(self, path: str) -> SystemConfig:
pass
@abstractmethod
async def save_config(self, config: SystemConfig, path: str) -> bool:
pass
@abstractmethod
def get_config(self) -> SystemConfig:
pass
@abstractmethod
def get_value(self, key: str, default: Any = None) -> Any:
pass
@abstractmethod
async def update_value(self, key: str, value: Any) -> bool:
pass
@abstractmethod
async def validate_config(self, config: SystemConfig) -> list[str]:
pass
@abstractmethod
async def reload_config(self) -> bool:
pass