feat: ЛР 4 с хранением вложений в MinIO

This commit is contained in:
2026-11-05 19:45:49 +03:00
parent 5be0a6c0b4
commit 0ed4b9cea5
40 changed files with 1763 additions and 65 deletions
+6
View File
@@ -8,6 +8,7 @@ from ..db.redis import RedisSessionStore
from ..domain.errors import Unauthorized
from ..domain.models import User
from ..services.chats import ChatService
from ..services.attachments import AttachmentService
from ..services.messages import MessageService
from ..services.users import UserService
@@ -16,6 +17,7 @@ _BEARER_CHALLENGE = 'Bearer realm="messenger"'
@dataclass(frozen=True, slots=True)
class Services:
attachments: AttachmentService
users: UserService
chats: ChatService
messages: MessageService
@@ -38,6 +40,10 @@ def message_service(container: Services = Depends(services)) -> MessageService:
return container.messages
def attachment_service(container: Services = Depends(services)) -> AttachmentService:
return container.attachments
def session_store(container: Services = Depends(services)) -> RedisSessionStore:
return container.sessions