tagger/docs/docs.go
2024-04-04 13:30:41 -07:00

319 lines
9.6 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}}",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "matthewrich.conf@gmail.com"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/ping": {
"get": {
"description": "ping alive endpoint",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ping"
],
"summary": "ping endpoint",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
}
}
}
},
"/resources": {
"get": {
"description": "Get resource to tags",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tag resource"
],
"summary": "Get resource tags",
"parameters": [
{
"type": "string",
"description": "Resource URL",
"name": "resource",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Resource"
}
}
}
}
},
"/resources/{resource}": {
"get": {
"description": "Get resource to tags",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tag resource"
],
"summary": "Get resource tags",
"parameters": [
{
"type": "string",
"description": "Base64 encoded Resource URL",
"name": "resource",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.Resource"
}
}
}
}
},
"/tags": {
"post": {
"description": "Add a tag for a resource",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tag resource"
],
"summary": "Add a tag for a resource",
"parameters": [
{
"description": "Tag JSON object",
"name": "tag",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/main.tag"
}
}
}
}
},
"/tags/{name}": {
"get": {
"description": "Get resources associated with a Tag",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tags"
],
"summary": "Get list of resources tagged",
"parameters": [
{
"type": "string",
"description": "Tag name",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"put": {
"description": "Updates the resources associated with a tag",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tag resource"
],
"summary": "Update a tag",
"parameters": [
{
"type": "string",
"description": "Tag name",
"name": "name",
"in": "path",
"required": true
},
{
"description": "Tag JSON object",
"name": "tag",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/main.tag"
}
}
}
}
},
"/tags/{tag}": {
"post": {
"description": "Add a resource to a tag",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tag resource"
],
"summary": "Add a resource to a tag",
"parameters": [
{
"type": "string",
"description": "Tag name",
"name": "tag",
"in": "path",
"required": true
},
{
"description": "Resource JSON object",
"name": "resource",
"in": "body",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/main.tag"
}
}
}
}
}
},
"definitions": {
"main.tag": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"resources": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"models.Resource": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"resource": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "0.31",
Host: "localhost:8080",
BasePath: "/api/v1",
Schemes: []string{},
Title: "Tagger API",
Description: "This is the Tagger API.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}