lab4 done

This commit is contained in:
Khakimov Dmitrij
2026-11-10 20:42:03 +03:00
parent 276dbdad8a
commit b2bd7501d3
129 changed files with 9319 additions and 109 deletions
+9
View File
@@ -0,0 +1,9 @@
package contracts
import _ "embed"
// OpenAPI is embedded so Swagger UI works from a compiled binary and does not
// depend on the process working directory.
//
//go:embed openapi.json
var OpenAPI []byte
+1 -17
View File
@@ -1,5 +1,5 @@
{
"lab": 5,
"lab": 4,
"kind": "requirements, not runnable deployment",
"required_for_grade_3": [
{
@@ -27,22 +27,6 @@
],
"private_bucket": true,
"persistent_volume": true
},
{
"role": "broker",
"choose_one": [
"RabbitMQ",
"Redis Streams",
"Valkey Streams",
"NATS JetStream",
"documented durable equivalent"
],
"persistent_volume": true,
"delivery": "at-least-once"
},
{
"role": "worker",
"separate_process": true
}
],
"optional_components": [
-63
View File
@@ -1,63 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:mtusi:messenger:attachment-job:v1",
"title": "Durable attachment processing job v1",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"job_id",
"type",
"attachment_id",
"pipeline_version",
"attempt",
"created_at"
],
"properties": {
"schema_version": {
"const": 1
},
"job_id": {
"type": "string",
"format": "uuid"
},
"type": {
"const": "attachment.process.v1"
},
"attachment_id": {
"type": "string",
"format": "uuid"
},
"pipeline_version": {
"type": "integer",
"minimum": 1
},
"attempt": {
"type": "integer",
"minimum": 1
},
"created_at": {
"type": "string",
"format": "date-time"
},
"traceparent": {
"type": "string",
"pattern": "^00-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"
},
"tracestate": {
"type": "string",
"maxLength": 512
}
},
"examples": [
{
"schema_version": 1,
"job_id": "11111111-1111-4111-8111-111111111111",
"type": "attachment.process.v1",
"attachment_id": "22222222-2222-4222-8222-222222222222",
"pipeline_version": 1,
"attempt": 1,
"created_at": "2026-09-01T12:00:00Z"
}
]
}
+5 -11
View File
@@ -1,8 +1,8 @@
{
"openapi": "3.1.0",
"info": {
"title": "MTUSI Messenger — лабораторная 5",
"version": "1.5.0",
"title": "MTUSI Messenger — лабораторная 4",
"version": "1.4.0",
"description": "Нормативный минимум на 3. Семантика: contracts/README.md. Расширения на 4/5 не должны менять этот API. Наличие кода ошибки в схеме не требует реализовать факультативную причину его выдачи."
},
"servers": [
@@ -2151,7 +2151,7 @@
"operationId": "uploadAttachment",
"summary": "Принять один PNG/JPEG, до 10 MiB",
"responses": {
"202": {
"201": {
"description": "Успех",
"headers": {
"X-Request-Id": {
@@ -2936,10 +2936,7 @@
"schema": {
"type": "string",
"enum": [
"original",
"thumbnail",
"crop",
"optimized"
"original"
],
"default": "original"
}
@@ -3464,10 +3461,7 @@
"status": {
"type": "string",
"enum": [
"queued",
"processing",
"ready",
"failed"
"ready"
]
},
"variants": {