Implement lab4 attachments on RustFS for grade 4.

Carry over lab3 HA stack and add private S3 storage, Attachment API, orphan compensation/reaper, own tests, and evidence for smoke/persistence/failover.
This commit is contained in:
2026-11-12 20:41:02 +03:00
parent ec540a1a72
commit 747ca222e5
43 changed files with 3049 additions and 23 deletions
+30
View File
@@ -0,0 +1,30 @@
"""Схемы тел запросов для OpenAPI / Swagger (валидация домена — в services)."""
from typing import List
from pydantic import BaseModel, ConfigDict, Field
class CreateUserBody(BaseModel):
model_config = ConfigDict(extra="forbid")
username: str = Field(..., examples=["alice"])
display_name: str = Field(..., examples=["Алиса"])
password: str = Field(..., examples=["Example-only-not-a-real-secret-123"])
class CreateChatBody(BaseModel):
model_config = ConfigDict(extra="forbid")
title: str = Field(..., examples=["Проект по ВНП"])
member_ids: List[str] = Field(
...,
examples=[["11111111-1111-4111-8111-111111111111"]],
)
class CreateMessageBody(BaseModel):
model_config = ConfigDict(extra="forbid")
text: str = Field(..., examples=["Привет, Боб!"])
attachment_ids: List[str] = Field(default_factory=list)