mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 22:26:37 +00:00
abc26d5c20
docs -> _docs
36 lines
804 B
Python
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
|
|
|