Added logic to load config from json & improved hosting and service providing
This commit is contained in:
@@ -3,6 +3,7 @@ from collections import Callable
|
||||
from typing import Type
|
||||
|
||||
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
|
||||
from sh_edraft.environment.base.environment_base import EnvironmentBase
|
||||
|
||||
|
||||
class ConfigurationBase(ABC):
|
||||
@@ -10,11 +11,24 @@ class ConfigurationBase(ABC):
|
||||
@abstractmethod
|
||||
def __init__(self): pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def add_config_by_type(self, key_type: type, value: object): pass
|
||||
def environment(self) -> EnvironmentBase: pass
|
||||
|
||||
@abstractmethod
|
||||
def get_config_by_type(self, search_type: Type[ConfigurationModelBase]) -> Callable[ConfigurationModelBase]: pass
|
||||
def add_environment_variables(self, prefix: str): pass
|
||||
|
||||
@abstractmethod
|
||||
def add_argument_variables(self): pass
|
||||
|
||||
@abstractmethod
|
||||
def add_json_file(self, name: str, optional: bool = None): pass
|
||||
|
||||
@abstractmethod
|
||||
def add_configuration(self, key_type: type, value: object): pass
|
||||
|
||||
@abstractmethod
|
||||
def get_configuration(self, search_type: Type[ConfigurationModelBase]) -> Callable[ConfigurationModelBase]: pass
|
||||
|
||||
@abstractmethod
|
||||
def create(self): pass
|
||||
|
||||
Reference in New Issue
Block a user