chore: add qe and integrations with rabbit mq

This commit is contained in:
d3m0k1d
2026-04-29 14:26:59 +03:00
parent fe740da06b
commit d3a2fe0f9c
18 changed files with 1823 additions and 47 deletions
+370 -1
View File
@@ -14,7 +14,376 @@ const docTemplate = `{
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {},
"paths": {
"/bale-types": {
"get": {
"description": "Возвращает список всех типов тюков",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Получить все типы тюков",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
}
}
},
"post": {
"description": "Создаёт новый тип тюка",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Создать тип тюка",
"parameters": [
{
"description": "Данные типа тюка",
"name": "bale_type",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
}
}
},
"/bale-types/{id}": {
"get": {
"description": "Возвращает тип тюка по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Получить тип тюка по ID",
"parameters": [
{
"type": "integer",
"description": "ID типа тюка",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
}
},
"put": {
"description": "Обновляет данные типа тюка по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Обновить тип тюка",
"parameters": [
{
"type": "integer",
"description": "ID типа тюка",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Данные типа тюка",
"name": "bale_type",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
}
},
"delete": {
"description": "Удаляет тип тюка по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Удалить тип тюка",
"parameters": [
{
"type": "integer",
"description": "ID типа тюка",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}
}
},
"/bales": {
"get": {
"description": "Возвращает список всех тюков",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Получить все тюки",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
}
}
},
"post": {
"description": "Создаёт новый тюк и отправляет в очередь задач RabbitMQ",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Создать тюк",
"parameters": [
{
"description": "Данные тюка",
"name": "bale",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
}
}
},
"/bales/{id}": {
"get": {
"description": "Возвращает тюк по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Получить тюк по ID",
"parameters": [
{
"type": "string",
"description": "ID тюка",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
}
},
"put": {
"description": "Обновляет данные тюка по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Обновить тюк",
"parameters": [
{
"type": "string",
"description": "ID тюка",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Данные тюка",
"name": "bale",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
}
},
"delete": {
"description": "Удаляет тюк по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Удалить тюк",
"parameters": [
{
"type": "string",
"description": "ID тюка",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}
}
}
},
"definitions": {
"gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale": {
"description": "Тюк - единица готовой продукции",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"timestamp": {
"type": "string"
},
"type": {
"type": "string"
},
"typeId": {
"type": "integer"
}
}
},
"gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType": {
"description": "Тип тюка - характеристики тюка",
"type": "object",
"properties": {
"height": {
"type": "number"
},
"id": {
"type": "integer"
},
"length": {
"type": "number"
},
"type": {
"type": "string"
},
"weight": {
"type": "number"
},
"width": {
"type": "number"
}
}
}
},
"securityDefinitions": {
"Bearer": {
"description": "Type \"Bearer\" followed by a space and the JWT token.",
+370 -1
View File
@@ -3,7 +3,376 @@
"info": {
"contact": {}
},
"paths": {},
"paths": {
"/bale-types": {
"get": {
"description": "Возвращает список всех типов тюков",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Получить все типы тюков",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
}
}
},
"post": {
"description": "Создаёт новый тип тюка",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Создать тип тюка",
"parameters": [
{
"description": "Данные типа тюка",
"name": "bale_type",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
}
}
},
"/bale-types/{id}": {
"get": {
"description": "Возвращает тип тюка по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Получить тип тюка по ID",
"parameters": [
{
"type": "integer",
"description": "ID типа тюка",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
}
},
"put": {
"description": "Обновляет данные типа тюка по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Обновить тип тюка",
"parameters": [
{
"type": "integer",
"description": "ID типа тюка",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Данные типа тюка",
"name": "bale_type",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType"
}
}
}
},
"delete": {
"description": "Удаляет тип тюка по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bale-types"
],
"summary": "Удалить тип тюка",
"parameters": [
{
"type": "integer",
"description": "ID типа тюка",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}
}
},
"/bales": {
"get": {
"description": "Возвращает список всех тюков",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Получить все тюки",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
}
}
},
"post": {
"description": "Создаёт новый тюк и отправляет в очередь задач RabbitMQ",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Создать тюк",
"parameters": [
{
"description": "Данные тюка",
"name": "bale",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
}
}
},
"/bales/{id}": {
"get": {
"description": "Возвращает тюк по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Получить тюк по ID",
"parameters": [
{
"type": "string",
"description": "ID тюка",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
}
},
"put": {
"description": "Обновляет данные тюка по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Обновить тюк",
"parameters": [
{
"type": "string",
"description": "ID тюка",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Данные тюка",
"name": "bale",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale"
}
}
}
},
"delete": {
"description": "Удаляет тюк по ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bales"
],
"summary": "Удалить тюк",
"parameters": [
{
"type": "string",
"description": "ID тюка",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}
}
}
},
"definitions": {
"gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale": {
"description": "Тюк - единица готовой продукции",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"timestamp": {
"type": "string"
},
"type": {
"type": "string"
},
"typeId": {
"type": "integer"
}
}
},
"gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType": {
"description": "Тип тюка - характеристики тюка",
"type": "object",
"properties": {
"height": {
"type": "number"
},
"id": {
"type": "integer"
},
"length": {
"type": "number"
},
"type": {
"type": "string"
},
"weight": {
"type": "number"
},
"width": {
"type": "number"
}
}
}
},
"securityDefinitions": {
"Bearer": {
"description": "Type \"Bearer\" followed by a space and the JWT token.",
+244 -1
View File
@@ -1,6 +1,249 @@
definitions:
gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale:
description: Тюк - единица готовой продукции
properties:
id:
type: integer
timestamp:
type: string
type:
type: string
typeId:
type: integer
type: object
gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType:
description: Тип тюка - характеристики тюка
properties:
height:
type: number
id:
type: integer
length:
type: number
type:
type: string
weight:
type: number
width:
type: number
type: object
info:
contact: {}
paths: {}
paths:
/bale-types:
get:
consumes:
- application/json
description: Возвращает список всех типов тюков
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType'
type: array
summary: Получить все типы тюков
tags:
- bale-types
post:
consumes:
- application/json
description: Создаёт новый тип тюка
parameters:
- description: Данные типа тюка
in: body
name: bale_type
required: true
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType'
summary: Создать тип тюка
tags:
- bale-types
/bale-types/{id}:
delete:
consumes:
- application/json
description: Удаляет тип тюка по ID
parameters:
- description: ID типа тюка
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
additionalProperties:
type: boolean
type: object
summary: Удалить тип тюка
tags:
- bale-types
get:
consumes:
- application/json
description: Возвращает тип тюка по ID
parameters:
- description: ID типа тюка
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType'
summary: Получить тип тюка по ID
tags:
- bale-types
put:
consumes:
- application/json
description: Обновляет данные типа тюка по ID
parameters:
- description: ID типа тюка
in: path
name: id
required: true
type: integer
- description: Данные типа тюка
in: body
name: bale_type
required: true
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.BaleType'
summary: Обновить тип тюка
tags:
- bale-types
/bales:
get:
consumes:
- application/json
description: Возвращает список всех тюков
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale'
type: array
summary: Получить все тюки
tags:
- bales
post:
consumes:
- application/json
description: Создаёт новый тюк и отправляет в очередь задач RabbitMQ
parameters:
- description: Данные тюка
in: body
name: bale
required: true
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale'
summary: Создать тюк
tags:
- bales
/bales/{id}:
delete:
consumes:
- application/json
description: Удаляет тюк по ID
parameters:
- description: ID тюка
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
additionalProperties:
type: boolean
type: object
summary: Удалить тюк
tags:
- bales
get:
consumes:
- application/json
description: Возвращает тюк по ID
parameters:
- description: ID тюка
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale'
summary: Получить тюк по ID
tags:
- bales
put:
consumes:
- application/json
description: Обновляет данные тюка по ID
parameters:
- description: ID тюка
in: path
name: id
required: true
type: string
- description: Данные тюка
in: body
name: bale
required: true
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_rostpoliplast_backend_internal_storage.Bale'
summary: Обновить тюк
tags:
- bales
securityDefinitions:
Bearer:
description: Type "Bearer" followed by a space and the JWT token.