mirror of
https://git.freecumextremist.com/grumbulon/pomme.git
synced 2024-11-25 18:33:55 +00:00
231 lines
7.4 KiB
Go
231 lines
7.4 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}}",
|
|
"termsOfService": "http://freecumextremist.com/",
|
|
"contact": {},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/api/login": {
|
|
"post": {
|
|
"description": "login to Pomme\nRate limited: 5 requests every 5 second",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"accounts"
|
|
],
|
|
"summary": "authenticate as a regular user",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Username",
|
|
"name": "username",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Password",
|
|
"name": "password",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.httpSuccess"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.httpError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/parse": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "parse your zonefile\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"DNS"
|
|
],
|
|
"summary": "parse your zonefile",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Zonefile name",
|
|
"name": "filename",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Bearer Token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.httpSuccess"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.httpInternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/upload": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "upload takes files from the user and stores it locally to be parsed. Uploads are associated with a specific user.\nRate limited: 10 requests every 10 second\nyou must specify \"Bearer\" before entering your token",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"DNS"
|
|
],
|
|
"summary": "upload a zonefile",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "Zonefile to upload",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Bearer Token",
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.httpSuccess"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/api.httpInternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"api.httpError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"example": 401
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Status bad request"
|
|
}
|
|
}
|
|
},
|
|
"api.httpInternalServerError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"example": 500
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Internal Server Error"
|
|
}
|
|
}
|
|
},
|
|
"api.httpSuccess": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"example": 200
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"Bearer": {
|
|
"description": "Type \"Bearer\" followed by a space and JWT token.",
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "0.0.1",
|
|
Host: "",
|
|
BasePath: "",
|
|
Schemes: []string{},
|
|
Title: "Pomme",
|
|
Description: "Pomme is a service that parses zonefiles",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|