|
@@ -0,0 +1,118 @@
|
|
|
|
+// 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}}",
|
|
|
|
+ "contact": {},
|
|
|
|
+ "version": "{{.Version}}"
|
|
|
|
+ },
|
|
|
|
+ "host": "{{.Host}}",
|
|
|
|
+ "basePath": "{{.BasePath}}",
|
|
|
|
+ "paths": {
|
|
|
|
+ "/api/files": {
|
|
|
|
+ "get": {
|
|
|
|
+ "description": "Get a list of all files in the cloud storage",
|
|
|
|
+ "produces": [
|
|
|
|
+ "application/json"
|
|
|
|
+ ],
|
|
|
|
+ "tags": [
|
|
|
|
+ "files"
|
|
|
|
+ ],
|
|
|
|
+ "summary": "List all files",
|
|
|
|
+ "responses": {
|
|
|
|
+ "200": {
|
|
|
|
+ "description": "OK",
|
|
|
|
+ "schema": {
|
|
|
|
+ "type": "array",
|
|
|
|
+ "items": {
|
|
|
|
+ "$ref": "#/definitions/model.File"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ "post": {
|
|
|
|
+ "description": "Upload a file to the cloud storage",
|
|
|
|
+ "consumes": [
|
|
|
|
+ "multipart/form-data"
|
|
|
|
+ ],
|
|
|
|
+ "produces": [
|
|
|
|
+ "application/json"
|
|
|
|
+ ],
|
|
|
|
+ "tags": [
|
|
|
|
+ "files"
|
|
|
|
+ ],
|
|
|
|
+ "summary": "Upload a file",
|
|
|
|
+ "parameters": [
|
|
|
|
+ {
|
|
|
|
+ "type": "file",
|
|
|
|
+ "description": "File to upload",
|
|
|
|
+ "name": "file",
|
|
|
|
+ "in": "formData",
|
|
|
|
+ "required": true
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ "responses": {
|
|
|
|
+ "200": {
|
|
|
|
+ "description": "OK",
|
|
|
|
+ "schema": {
|
|
|
|
+ "$ref": "#/definitions/model.File"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ "definitions": {
|
|
|
|
+ "model.File": {
|
|
|
|
+ "type": "object",
|
|
|
|
+ "properties": {
|
|
|
|
+ "created_at": {
|
|
|
|
+ "type": "string"
|
|
|
|
+ },
|
|
|
|
+ "id": {
|
|
|
|
+ "type": "integer"
|
|
|
|
+ },
|
|
|
|
+ "name": {
|
|
|
|
+ "type": "string"
|
|
|
|
+ },
|
|
|
|
+ "path": {
|
|
|
|
+ "type": "string"
|
|
|
|
+ },
|
|
|
|
+ "size": {
|
|
|
|
+ "type": "integer"
|
|
|
|
+ },
|
|
|
|
+ "type": {
|
|
|
|
+ "type": "string"
|
|
|
|
+ },
|
|
|
|
+ "updated_at": {
|
|
|
|
+ "type": "string"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}`
|
|
|
|
+
|
|
|
|
+// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
|
+var SwaggerInfo = &swag.Spec{
|
|
|
|
+ Version: "1.0",
|
|
|
|
+ Host: "localhost:8080",
|
|
|
|
+ BasePath: "/api",
|
|
|
|
+ Schemes: []string{},
|
|
|
|
+ Title: "FileCloud API",
|
|
|
|
+ Description: "FileCloud API documentation",
|
|
|
|
+ InfoInstanceName: "swagger",
|
|
|
|
+ SwaggerTemplate: docTemplate,
|
|
|
|
+ LeftDelim: "{{",
|
|
|
|
+ RightDelim: "}}",
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func init() {
|
|
|
|
+ swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
|
|
+}
|