Skeleton ready

This commit is contained in:
2026-07-08 23:01:55 +04:00
commit d9e5effdce
75 changed files with 1989 additions and 0 deletions

View File

View File

@@ -0,0 +1,7 @@
from dataclasses import dataclass
@dataclass(frozen=True)
class Application:
name: str
env: str

View File

@@ -0,0 +1,28 @@
from kernel.application.view.application import Application
from kernel.application.view.rabbitmq import RabbitMQ
from kernel.application.view.redis import Redis
class Configuration():
__application: Application
__rabbitmq: RabbitMQ
__redis: Redis
def __init__(
self,
application: Application,
rabbitmq: RabbitMQ,
redis: Redis,
) -> None:
self.__application = application
self.__rabbitmq = rabbitmq
self.__redis = redis
def application(self) -> Application:
return self.__application
def rabbitmq(self) -> RabbitMQ:
return self.__rabbitmq
def redis(self) -> Redis:
return self.__redis

View File

@@ -0,0 +1,11 @@
from dataclasses import dataclass
@dataclass(frozen=True)
class RabbitMQ:
host: str = "localhost"
port: int = 5672
user: str = "guest"
password: str = "guest"
timeout: int = 10
vhost: str = "/"

View File

@@ -0,0 +1,8 @@
from dataclasses import dataclass
@dataclass(frozen=True)
class Redis:
host: str = "localhost"
port: int = 6379
db: int = 0