/
rain
/
google-auth-bot
Обзор
Документация
Войти
/
rain
/
google-auth-bot
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
internal/microservice-api/docs/docs.go
415 строк
13 KB
Kirill
mvp telegram bot and some improvements for api
11 мар 2024, 00:54
11 мар 2024, 00:54
caa6f37
Код
Авторство
О чём код?
// 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": { "name": "sudora1n", "email": "admin@servicedomain.xyz" }, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/ping": { "get": { "description": "Ping", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ping" ], "summary": "Ping", "responses": { "200": { "description": "pong", "schema": { "type": "string" } } } } }, "/totps/add": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Add TOTP by userId", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "totps" ], "summary": "Add TOTP", "parameters": [ { "type": "integer", "description": "User ID", "name": "userId", "in": "query", "required": true }, { "type": "string", "description": "TOTP", "name": "totp", "in": "query", "required": true }, { "type": "string", "description": "Name", "name": "name", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "boolean" } }, "400": { "description": "userId is required", "schema": { "type": "string" } }, "500": { "description": "server down", "schema": { "type": "string" } } } } }, "/totps/find_all": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Find all TOTP by userId", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "totps" ], "summary": "Find all TOTP", "parameters": [ { "type": "integer", "description": "User ID", "name": "userId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/orm.ToTP" } } }, "400": { "description": "userId is required", "schema": { "type": "string" } }, "500": { "description": "server down", "schema": { "type": "string" } } } } }, "/totps/remove": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Remove TOTP by userId", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "totps" ], "summary": "Remove TOTP", "parameters": [ { "type": "integer", "description": "User ID", "name": "userId", "in": "query", "required": true }, { "type": "string", "description": "TOTP", "name": "totp", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "boolean" } }, "400": { "description": "userId is required", "schema": { "type": "string" } }, "500": { "description": "server down", "schema": { "type": "string" } } } } }, "/users/{userId}/change_lang": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Change user language by userId", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Change user language", "parameters": [ { "type": "integer", "description": "User ID", "name": "userId", "in": "path", "required": true }, { "type": "string", "description": "Language", "name": "lang", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "boolean" } }, "400": { "description": "userId is required", "schema": { "type": "string" } }, "500": { "description": "server down", "schema": { "type": "string" } } } } }, "/users/{userId}/create_or_return": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "Create or return user by userId", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Create or return user", "parameters": [ { "type": "integer", "description": "User ID", "name": "userId", "in": "path", "required": true }, { "type": "string", "description": "Language (default en)", "name": "lang", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/orm.User" } }, "400": { "description": "userId is required", "schema": { "type": "string" } }, "500": { "description": "server down", "schema": { "type": "string" } } } } } }, "definitions": { "gorm.DeletedAt": { "type": "object", "properties": { "time": { "type": "string" }, "valid": { "description": "Valid is true if Time is not NULL", "type": "boolean" } } }, "orm.ToTP": { "type": "object", "properties": { "createdAt": { "type": "string" }, "deletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, "id": { "type": "string" }, "name": { "type": "string" }, "updatedAt": { "type": "string" }, "userid": { "type": "integer" } } }, "orm.User": { "type": "object", "properties": { "createdAt": { "type": "string" }, "deletedAt": { "$ref": "#/definitions/gorm.DeletedAt" }, "id": { "type": "integer" }, "languageiso": { "type": "string" }, "totps": { "type": "array", "items": { "$ref": "#/definitions/orm.ToTP" } }, "updatedAt": { "type": "string" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0.0", Host: "localhost:8080", BasePath: "/v1", Schemes: []string{"http", "https"}, Title: "Google Auth Bot API", Description: "This is a Google Auth Bot API server.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }