// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "contact": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/message-service/messages": { "get": { "description": "Возвращает список всех сообщений", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "messages" ], "summary": "Получить все сообщения", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.Message" } } } } }, "post": { "description": "Создает новое сообщение", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "messages" ], "summary": "Создать сообщение", "parameters": [ { "description": "Данные сообщения", "name": "message", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Message" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Message" } } } } }, "/message-service/messages/all/{streamId}": { "get": { "description": "Возвращает список сообщений с указанным StreamID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "messages" ], "summary": "Получить список сообщений по StreamID", "parameters": [ { "type": "integer", "description": "StreamID сообщения", "name": "streamId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.MessageResponse" } } } } } }, "/message-service/messages/{id}": { "get": { "description": "Возвращает сообщение с указанным ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "messages" ], "summary": "Получить сообщение по ID", "parameters": [ { "type": "integer", "description": "ID сообщения", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Message" } } } }, "put": { "description": "Обновляет данные сообщения по ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "messages" ], "summary": "Обновить данные сообщения", "parameters": [ { "type": "integer", "description": "ID сообщения", "name": "id", "in": "path", "required": true }, { "description": "Обновленные данные сообщения", "name": "message", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.Message" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Message" } } } }, "delete": { "description": "Удаляет сообщение по ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "messages" ], "summary": "Удалить сообщение", "parameters": [ { "type": "integer", "description": "ID сообщения", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" } } } } }, "definitions": { "models.Message": { "description": "Сообщение", "type": "object", "properties": { "content": { "description": "Содержание комментария", "type": "string" }, "created_at": { "description": "Время отправления комментария", "type": "string", "example": "2024-10-04T14:48:00Z" }, "id": { "description": "Идентификатор сообщения", "type": "integer" }, "stream_id": { "description": "Идентификатор стрима", "type": "integer" } } }, "models.MessageResponse": { "type": "object", "properties": { "content": { "type": "string" }, "created_at": { "type": "string", "example": "2024-10-04T14:48:00Z" }, "id": { "type": "integer" }, "stream_title": { "type": "string" } } } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "", Host: "", BasePath: "", Schemes: []string{}, Title: "", Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }