195 lines
6 KiB
Go
195 lines
6 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": {},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/api/v1/placeholder": {
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Create (and execute) a DNS query",
|
|
"operationId": "make-query",
|
|
"parameters": [
|
|
{
|
|
"description": "query params",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/util.Request"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/util.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"dns.Msg": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answer": {
|
|
"description": "Holds the RR(s) of the answer section.",
|
|
"type": "array",
|
|
"items": {}
|
|
},
|
|
"authenticatedData": {
|
|
"type": "boolean"
|
|
},
|
|
"authoritative": {
|
|
"type": "boolean"
|
|
},
|
|
"checkingDisabled": {
|
|
"type": "boolean"
|
|
},
|
|
"extra": {
|
|
"description": "Holds the RR(s) of the additional section.",
|
|
"type": "array",
|
|
"items": {}
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"ns": {
|
|
"description": "Holds the RR(s) of the authority section.",
|
|
"type": "array",
|
|
"items": {}
|
|
},
|
|
"opcode": {
|
|
"type": "integer"
|
|
},
|
|
"question": {
|
|
"description": "Holds the RR(s) of the question section.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/dns.Question"
|
|
}
|
|
},
|
|
"rcode": {
|
|
"type": "integer"
|
|
},
|
|
"recursionAvailable": {
|
|
"type": "boolean"
|
|
},
|
|
"recursionDesired": {
|
|
"type": "boolean"
|
|
},
|
|
"response": {
|
|
"type": "boolean"
|
|
},
|
|
"truncated": {
|
|
"type": "boolean"
|
|
},
|
|
"zero": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"dns.Question": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "\"cdomain-name\" specifies encoding (and may be compressed)",
|
|
"type": "string"
|
|
},
|
|
"qclass": {
|
|
"type": "integer"
|
|
},
|
|
"qtype": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"util.Request": {
|
|
"type": "object",
|
|
"properties": {
|
|
"class": {
|
|
"description": "Request class, eg. IN",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Domain to query",
|
|
"type": "string",
|
|
"example": "example.com"
|
|
},
|
|
"port": {
|
|
"description": "Port to make DNS request on",
|
|
"type": "integer",
|
|
"example": 53
|
|
},
|
|
"retries": {
|
|
"description": "Number of failures to make before giving up",
|
|
"type": "integer",
|
|
"example": 2
|
|
},
|
|
"server": {
|
|
"description": "Server to query",
|
|
"type": "string",
|
|
"example": "1.0.0.1"
|
|
},
|
|
"timeout": {
|
|
"description": "Duration to wait until marking request as failed",
|
|
"type": "integer",
|
|
"example": 2000000000
|
|
},
|
|
"type": {
|
|
"description": "Request type, eg. A, AAAA, NAPTR",
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"util.Response": {
|
|
"type": "object",
|
|
"properties": {
|
|
"response": {
|
|
"description": "The full DNS response",
|
|
"$ref": "#/definitions/dns.Msg"
|
|
},
|
|
"rtt": {
|
|
"description": "The time it took to make the DNS query",
|
|
"type": "integer",
|
|
"example": 2000000000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|
|
|
|
// 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,
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|