|
| 1 | +// Package docs GENERATED BY SWAG; DO NOT EDIT |
| 2 | +// This file was generated by swaggo/swag |
| 3 | +package docs |
| 4 | + |
| 5 | +import "github.com/swaggo/swag" |
| 6 | + |
| 7 | +const docTemplate = `{ |
| 8 | + "schemes": {{ marshal .Schemes }}, |
| 9 | + "swagger": "2.0", |
| 10 | + "info": { |
| 11 | + "description": "{{escape .Description}}", |
| 12 | + "title": "{{.Title}}", |
| 13 | + "contact": {}, |
| 14 | + "version": "{{.Version}}" |
| 15 | + }, |
| 16 | + "host": "{{.Host}}", |
| 17 | + "basePath": "{{.BasePath}}", |
| 18 | + "paths": { |
| 19 | + "/auth/login": { |
| 20 | + "post": { |
| 21 | + "description": "This endpoint login a user with email and password", |
| 22 | + "consumes": [ |
| 23 | + "application/json" |
| 24 | + ], |
| 25 | + "produces": [ |
| 26 | + "application/json" |
| 27 | + ], |
| 28 | + "summary": "This endpoint login a user with email and password", |
| 29 | + "parameters": [ |
| 30 | + { |
| 31 | + "description": "User Info", |
| 32 | + "name": "message", |
| 33 | + "in": "body", |
| 34 | + "required": true, |
| 35 | + "schema": { |
| 36 | + "$ref": "#/definitions/controllerv1.LoginRequest" |
| 37 | + } |
| 38 | + } |
| 39 | + ], |
| 40 | + "responses": { |
| 41 | + "201": { |
| 42 | + "description": "success", |
| 43 | + "schema": { |
| 44 | + "$ref": "#/definitions/swagger.ResponseCreatedUser" |
| 45 | + } |
| 46 | + }, |
| 47 | + "400": { |
| 48 | + "description": "bad request", |
| 49 | + "schema": { |
| 50 | + "$ref": "#/definitions/swagger.ResponseError" |
| 51 | + } |
| 52 | + }, |
| 53 | + "500": { |
| 54 | + "description": "error", |
| 55 | + "schema": { |
| 56 | + "$ref": "#/definitions/swagger.ResponseError" |
| 57 | + } |
| 58 | + } |
| 59 | + } |
| 60 | + } |
| 61 | + }, |
| 62 | + "/user": { |
| 63 | + "get": { |
| 64 | + "description": "This endpoint gets a user with its token", |
| 65 | + "consumes": [ |
| 66 | + "application/json" |
| 67 | + ], |
| 68 | + "produces": [ |
| 69 | + "application/json" |
| 70 | + ], |
| 71 | + "summary": "This endpoint gets a user with its token", |
| 72 | + "parameters": [ |
| 73 | + { |
| 74 | + "type": "string", |
| 75 | + "description": "Authentication Bearer header", |
| 76 | + "name": "Authorization", |
| 77 | + "in": "header", |
| 78 | + "required": true |
| 79 | + } |
| 80 | + ], |
| 81 | + "responses": { |
| 82 | + "200": { |
| 83 | + "description": "success", |
| 84 | + "schema": { |
| 85 | + "$ref": "#/definitions/swagger.ResponseGetUser" |
| 86 | + } |
| 87 | + }, |
| 88 | + "401": { |
| 89 | + "description": "bad request", |
| 90 | + "schema": { |
| 91 | + "$ref": "#/definitions/swagger.ResponseError" |
| 92 | + } |
| 93 | + }, |
| 94 | + "500": { |
| 95 | + "description": "error", |
| 96 | + "schema": { |
| 97 | + "$ref": "#/definitions/swagger.ResponseError" |
| 98 | + } |
| 99 | + } |
| 100 | + } |
| 101 | + }, |
| 102 | + "post": { |
| 103 | + "description": "This endpoint creates a new user", |
| 104 | + "consumes": [ |
| 105 | + "application/json" |
| 106 | + ], |
| 107 | + "produces": [ |
| 108 | + "application/json" |
| 109 | + ], |
| 110 | + "summary": "This endpoint creates a new user", |
| 111 | + "parameters": [ |
| 112 | + { |
| 113 | + "description": "User Info", |
| 114 | + "name": "message", |
| 115 | + "in": "body", |
| 116 | + "required": true, |
| 117 | + "schema": { |
| 118 | + "$ref": "#/definitions/controllerv1.CreateRequest" |
| 119 | + } |
| 120 | + } |
| 121 | + ], |
| 122 | + "responses": { |
| 123 | + "201": { |
| 124 | + "description": "success", |
| 125 | + "schema": { |
| 126 | + "$ref": "#/definitions/swagger.ResponseCreatedUser" |
| 127 | + } |
| 128 | + }, |
| 129 | + "400": { |
| 130 | + "description": "bad request", |
| 131 | + "schema": { |
| 132 | + "$ref": "#/definitions/swagger.ResponseError" |
| 133 | + } |
| 134 | + }, |
| 135 | + "500": { |
| 136 | + "description": "error", |
| 137 | + "schema": { |
| 138 | + "$ref": "#/definitions/swagger.ResponseError" |
| 139 | + } |
| 140 | + } |
| 141 | + } |
| 142 | + } |
| 143 | + } |
| 144 | + }, |
| 145 | + "definitions": { |
| 146 | + "controllerv1.CreateRequest": { |
| 147 | + "type": "object", |
| 148 | + "required": [ |
| 149 | + "email", |
| 150 | + "name", |
| 151 | + "password" |
| 152 | + ], |
| 153 | + "properties": { |
| 154 | + "email": { |
| 155 | + "type": "string", |
| 156 | + |
| 157 | + }, |
| 158 | + "name": { |
| 159 | + "type": "string", |
| 160 | + "example": "name" |
| 161 | + }, |
| 162 | + "password": { |
| 163 | + "type": "string", |
| 164 | + "example": "secret" |
| 165 | + } |
| 166 | + } |
| 167 | + }, |
| 168 | + "controllerv1.LoginRequest": { |
| 169 | + "type": "object", |
| 170 | + "required": [ |
| 171 | + "email", |
| 172 | + "password" |
| 173 | + ], |
| 174 | + "properties": { |
| 175 | + "email": { |
| 176 | + "type": "string", |
| 177 | + |
| 178 | + }, |
| 179 | + "password": { |
| 180 | + "type": "string", |
| 181 | + "example": "secret" |
| 182 | + } |
| 183 | + } |
| 184 | + }, |
| 185 | + "swagger.ResponseCreatedUser": { |
| 186 | + "type": "object", |
| 187 | + "properties": { |
| 188 | + "data": { |
| 189 | + "$ref": "#/definitions/swagger.createdUser" |
| 190 | + } |
| 191 | + } |
| 192 | + }, |
| 193 | + "swagger.ResponseError": { |
| 194 | + "type": "object", |
| 195 | + "properties": { |
| 196 | + "message": { |
| 197 | + "type": "string", |
| 198 | + "example": "message" |
| 199 | + } |
| 200 | + } |
| 201 | + }, |
| 202 | + "swagger.ResponseGetUser": { |
| 203 | + "type": "object", |
| 204 | + "properties": { |
| 205 | + "data": { |
| 206 | + "$ref": "#/definitions/swagger.user" |
| 207 | + } |
| 208 | + } |
| 209 | + }, |
| 210 | + "swagger.createdUser": { |
| 211 | + "type": "object", |
| 212 | + "properties": { |
| 213 | + "token": { |
| 214 | + "type": "string", |
| 215 | + "example": "1|V96CSH7oe3Pjr174sL4s24rCcnjZhWWw0IBUUjeh" |
| 216 | + }, |
| 217 | + "user": { |
| 218 | + "$ref": "#/definitions/swagger.user" |
| 219 | + } |
| 220 | + } |
| 221 | + }, |
| 222 | + "swagger.user": { |
| 223 | + "type": "object", |
| 224 | + "properties": { |
| 225 | + "email": { |
| 226 | + "type": "string", |
| 227 | + |
| 228 | + }, |
| 229 | + "id": { |
| 230 | + "type": "string", |
| 231 | + "example": "1" |
| 232 | + }, |
| 233 | + "name": { |
| 234 | + "type": "string", |
| 235 | + "example": "name" |
| 236 | + } |
| 237 | + } |
| 238 | + } |
| 239 | + } |
| 240 | +}` |
| 241 | + |
| 242 | +// SwaggerInfo holds exported Swagger Info so clients can modify it |
| 243 | +var SwaggerInfo = &swag.Spec{ |
| 244 | + Version: "1.0", |
| 245 | + Host: "localhost:3000", |
| 246 | + BasePath: "/api/v1", |
| 247 | + Schemes: []string{}, |
| 248 | + Title: "Go Sanctum", |
| 249 | + Description: "Go Sanctum offers a simple-to-use authentication system like Laravel Sanctum.", |
| 250 | + InfoInstanceName: "swagger", |
| 251 | + SwaggerTemplate: docTemplate, |
| 252 | +} |
| 253 | + |
| 254 | +func init() { |
| 255 | + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) |
| 256 | +} |
0 commit comments