mozhi/docs/docs.go
Arya Kiran 566eb69743
All checks were successful
mozhi pipeline / Push Docker image to Codeberg docker registry (push) Successful in 3m54s
mozhi pipeline / Build and publish artifacts (push) Successful in 13m27s
update deps, make engine code into a lib
2023-09-09 20:03:14 +05:30

188 lines
5.7 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": {
"/api/source_languages": {
"get": {
"summary": "Show list of available source languages for engine",
"parameters": [
{
"type": "string",
"description": "Engine name",
"name": "engine",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"$ref": "#/definitions/utils.List"
}
}
}
}
},
"/api/target_languages": {
"get": {
"summary": "Show list of available target languages for engine",
"parameters": [
{
"type": "string",
"description": "Engine name",
"name": "engine",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"$ref": "#/definitions/utils.List"
}
}
}
}
},
"/api/translate": {
"get": {
"description": "When engine is set to all, it will return an array of libmozhi.LangOut.",
"summary": "Translate text",
"parameters": [
{
"type": "string",
"description": "Engine name",
"name": "engine",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Source language",
"name": "from",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Target language",
"name": "to",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Text being translated",
"name": "text",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"$ref": "#/definitions/utils.LangOut"
}
}
}
}
},
"/api/tts": {
"get": {
"summary": "Get Text-To-Speech for specified language using specified engine",
"parameters": [
{
"type": "string",
"description": "Engine name",
"name": "engine",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Language being TTS'd",
"name": "lang",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Text being TTS'd",
"name": "text",
"in": "query",
"required": true
}
],
"responses": {}
}
}
},
"definitions": {
"utils.LangOut": {
"type": "object",
"properties": {
"detected": {
"type": "string"
},
"engine": {
"type": "string"
},
"source_language": {
"type": "string"
},
"target_language": {
"type": "string"
},
"translated-text": {
"type": "string"
}
}
},
"utils.List": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"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,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}