forked from Alexey/DAS_2024_1
217 lines
6.9 KiB
Go
217 lines
6.9 KiB
Go
// 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": {
|
||
"/stream-service/streams": {
|
||
"get": {
|
||
"description": "Возвращает список всех стримов",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"streams"
|
||
],
|
||
"summary": "Получить все стримы",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.Stream"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Создает новый стрим",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"streams"
|
||
],
|
||
"summary": "Создать стрим",
|
||
"parameters": [
|
||
{
|
||
"description": "Данные стримы",
|
||
"name": "stream",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.Stream"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.Stream"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/stream-service/streams/{id}": {
|
||
"get": {
|
||
"description": "Возвращает стрим с указанным ID",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"streams"
|
||
],
|
||
"summary": "Получить стрим по ID",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "ID стрима",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.Stream"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"description": "Обновляет данные стрима по ID",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"streams"
|
||
],
|
||
"summary": "Обновить данные стрима",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "ID стрима",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "Обновленные данные стрима",
|
||
"name": "stream",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.Stream"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.Stream"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Удаляет стрим по ID",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"streams"
|
||
],
|
||
"summary": "Удалить стрим",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "ID стрима",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"models.Stream": {
|
||
"description": "Стрим",
|
||
"type": "object",
|
||
"properties": {
|
||
"ended_at": {
|
||
"description": "Время окончания стрима",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "Идентификатор стрима",
|
||
"type": "integer"
|
||
},
|
||
"started_at": {
|
||
"description": "Время запуска стрима",
|
||
"type": "string",
|
||
"example": "2024-10-04T14:48:00Z"
|
||
},
|
||
"title": {
|
||
"description": "Название стрима",
|
||
"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)
|
||
}
|