docs.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // Package docs Code generated by swaggo/swag. DO NOT EDIT
  2. package docs
  3. import "github.com/swaggo/swag"
  4. const docTemplate = `{
  5. "schemes": {{ marshal .Schemes }},
  6. "swagger": "2.0",
  7. "info": {
  8. "description": "{{escape .Description}}",
  9. "title": "{{.Title}}",
  10. "contact": {},
  11. "version": "{{.Version}}"
  12. },
  13. "host": "{{.Host}}",
  14. "basePath": "{{.BasePath}}",
  15. "paths": {
  16. "/api/files": {
  17. "get": {
  18. "description": "Get a list of all files in the cloud storage",
  19. "produces": [
  20. "application/json"
  21. ],
  22. "tags": [
  23. "files"
  24. ],
  25. "summary": "List all files",
  26. "responses": {
  27. "200": {
  28. "description": "OK",
  29. "schema": {
  30. "type": "array",
  31. "items": {
  32. "$ref": "#/definitions/model.File"
  33. }
  34. }
  35. }
  36. }
  37. },
  38. "post": {
  39. "description": "Upload a file to the cloud storage",
  40. "consumes": [
  41. "multipart/form-data"
  42. ],
  43. "produces": [
  44. "application/json"
  45. ],
  46. "tags": [
  47. "files"
  48. ],
  49. "summary": "Upload a file",
  50. "parameters": [
  51. {
  52. "type": "file",
  53. "description": "File to upload",
  54. "name": "file",
  55. "in": "formData",
  56. "required": true
  57. }
  58. ],
  59. "responses": {
  60. "200": {
  61. "description": "OK",
  62. "schema": {
  63. "$ref": "#/definitions/model.File"
  64. }
  65. }
  66. }
  67. }
  68. }
  69. },
  70. "definitions": {
  71. "model.File": {
  72. "type": "object",
  73. "properties": {
  74. "created_at": {
  75. "type": "string"
  76. },
  77. "id": {
  78. "type": "integer"
  79. },
  80. "name": {
  81. "type": "string"
  82. },
  83. "path": {
  84. "type": "string"
  85. },
  86. "size": {
  87. "type": "integer"
  88. },
  89. "type": {
  90. "type": "string"
  91. },
  92. "updated_at": {
  93. "type": "string"
  94. }
  95. }
  96. }
  97. }
  98. }`
  99. // SwaggerInfo holds exported Swagger Info so clients can modify it
  100. var SwaggerInfo = &swag.Spec{
  101. Version: "1.0",
  102. Host: "localhost:8080",
  103. BasePath: "/api",
  104. Schemes: []string{},
  105. Title: "FileCloud API",
  106. Description: "FileCloud API documentation",
  107. InfoInstanceName: "swagger",
  108. SwaggerTemplate: docTemplate,
  109. LeftDelim: "{{",
  110. RightDelim: "}}",
  111. }
  112. func init() {
  113. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  114. }