mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 23:16:38 +00:00
initial structure implemented
docs -> _docs
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user