// 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": { "/nodes": { "get": { "security": [ { "Bearer": [] } ], "description": "List of all discovered nodes and their labels.", "produces": [ "application/json" ], "summary": "List of nodes", "responses": { "200": { "description": "List of nodes", "schema": { "type": "array", "items": { "$ref": "#/definitions/nodes.Node" } } }, "401": { "description": "Forbidden access", "schema": { "$ref": "#/definitions/api.Message" } } } } }, "/nodes/{hostname}": { "get": { "security": [ { "Bearer": [] } ], "description": "Return one nodes based on given hostname", "produces": [ "application/json" ], "summary": "Get node", "parameters": [ { "type": "string", "description": "Node hostname", "name": "hostname", "in": "path", "required": true } ], "responses": { "200": { "description": "Node details", "schema": { "type": "array", "items": { "$ref": "#/definitions/nodes.Node" } } }, "401": { "description": "Forbidden access", "schema": { "$ref": "#/definitions/api.Message" } } } }, "post": { "security": [ { "Bearer": [] } ], "description": "Send new data or update existing data about a node", "produces": [ "application/json" ], "summary": "Refresh node", "parameters": [ { "type": "string", "description": "Node hostname", "name": "hostname", "in": "path", "required": true }, { "description": "Node labels", "name": "labels", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "string" } } }, { "description": "Key-value", "name": "kv", "in": "body", "required": true, "schema": { "$ref": "#/definitions/nodes.KV" } } ], "responses": { "200": { "description": "Node details", "schema": { "type": "array", "items": { "$ref": "#/definitions/nodes.Node" } } }, "401": { "description": "Forbidden access", "schema": { "$ref": "#/definitions/api.Message" } } } } } }, "definitions": { "api.Message": { "type": "object", "properties": { "message": { "type": "string" } } }, "nodes.KV": { "type": "object", "additionalProperties": { "type": "string" } }, "nodes.Node": { "type": "object", "properties": { "hostname": { "type": "string" }, "kv": { "$ref": "#/definitions/nodes.KV" }, "labels": { "type": "array", "items": { "type": "string" } }, "last_update": { "type": "integer" } } } }, "securityDefinitions": { "Bearer": { "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "2.0", Host: "", BasePath: "/", Schemes: []string{}, Title: "Lobby2 API", Description: "API of Lobby 2 project that helps to discover and connect to other nodes and their services.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }