Improved service providing and app hosting
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# imports:
|
||||
from .application_host_base import ApplicationHostBase
|
||||
from .environment_base import EnvironmentBase
|
||||
from .application_base import ApplicationBase
|
||||
|
||||
@@ -6,6 +6,9 @@ class ApplicationBase(ABC):
|
||||
@abstractmethod
|
||||
def __init__(self): pass
|
||||
|
||||
@abstractmethod
|
||||
def create_application_host(self): pass
|
||||
|
||||
@abstractmethod
|
||||
def create_configuration(self): pass
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import datetime
|
||||
|
||||
from sh_edraft.hosting.base.environment_base import EnvironmentBase
|
||||
from sh_edraft.configuration.base.configuration_base import ConfigurationBase
|
||||
from sh_edraft.service.base.service_provider_base import ServiceProviderBase
|
||||
|
||||
|
||||
class ApplicationHostBase(ABC):
|
||||
@@ -12,27 +12,14 @@ class ApplicationHostBase(ABC):
|
||||
@property
|
||||
@abstractmethod
|
||||
def name(self) -> str: pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def environment(self) -> EnvironmentBase: pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def start_time(self) -> datetime: pass
|
||||
|
||||
@start_time.setter
|
||||
@abstractmethod
|
||||
def start_time(self, start_time: datetime): pass
|
||||
def configuration(self) -> ConfigurationBase: pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def end_time(self): pass
|
||||
def services(self) -> ServiceProviderBase: pass
|
||||
|
||||
@end_time.setter
|
||||
@abstractmethod
|
||||
def end_time(self, end_time: datetime): pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def date_time_now(self) -> datetime: pass
|
||||
def create(self): pass
|
||||
|
||||
34
src/sh_edraft/hosting/base/application_runtime_base.py
Normal file
34
src/sh_edraft/hosting/base/application_runtime_base.py
Normal file
@@ -0,0 +1,34 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import datetime
|
||||
|
||||
from sh_edraft.configuration.base import ConfigurationBase
|
||||
|
||||
|
||||
class ApplicationRuntimeBase(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self): pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def configuration(self) -> ConfigurationBase: pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def start_time(self) -> datetime: pass
|
||||
|
||||
@start_time.setter
|
||||
@abstractmethod
|
||||
def start_time(self, start_time: datetime): pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def end_time(self): pass
|
||||
|
||||
@end_time.setter
|
||||
@abstractmethod
|
||||
def end_time(self, end_time: datetime): pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def date_time_now(self) -> datetime: pass
|
||||
Reference in New Issue
Block a user