Files
lndhub.go/docs/docs.go
2022-04-26 12:21:16 +02:00

191 lines
5.7 KiB
Go

// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {
"name": "Alby",
"url": "https://getalby.com",
"email": "hello@getalby.com"
},
"license": {
"name": "GNU GPL",
"url": "https://www.gnu.org/licenses/gpl-3.0.en.html"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/balance": {
"get": {
"security": [
{
"OAuth2Password": []
}
],
"description": "Current user's balance in satoshi",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"account"
],
"summary": "Retrieve balance",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.BalanceResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse"
}
}
}
}
},
"/create": {
"post": {
"description": "Create a new account with a login and password",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Create an account",
"parameters": [
{
"description": "Create User",
"name": "account",
"in": "body",
"schema": {
"$ref": "#/definitions/controllers.CreateUserRequestBody"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controllers.CreateUserResponseBody"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/responses.ErrorResponse"
}
}
}
}
}
},
"definitions": {
"controllers.BalanceResponse": {
"type": "object",
"properties": {
"btc": {
"type": "object",
"properties": {
"availableBalance": {
"type": "integer"
}
}
}
}
},
"controllers.CreateUserRequestBody": {
"type": "object",
"properties": {
"accounttype": {
"type": "string"
},
"login": {
"type": "string"
},
"partnerid": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"controllers.CreateUserResponseBody": {
"type": "object",
"properties": {
"login": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"responses.ErrorResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"error": {
"type": "boolean"
},
"message": {
"type": "string"
}
}
}
},
"securityDefinitions": {
"OAuth2Password": {
"type": "oauth2",
"flow": "password",
"tokenUrl": "/auth"
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "0.6.1",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "LNDhub.go",
Description: "Accounting wrapper for the Lightning Network providing separate accounts for end-users.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}