1
- // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
1
+ // Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
2
2
// This file was generated by swaggo/swag
3
-
4
3
package docs
5
4
6
5
import (
7
6
"bytes"
8
7
"encoding/json"
9
8
"strings"
9
+ "text/template"
10
10
11
- "github.com/alecthomas/template"
12
11
"github.com/swaggo/swag"
13
12
)
14
13
15
14
var doc = `{
16
15
"schemes": {{ marshal .Schemes }},
17
16
"swagger": "2.0",
18
17
"info": {
19
- "description": "{{.Description}}",
18
+ "description": "{{escape .Description}}",
20
19
"title": "{{.Title}}",
21
20
"termsOfService": "http://swagger.io/terms/",
22
21
"contact": {
@@ -33,6 +32,85 @@ var doc = `{
33
32
"host": "{{.Host}}",
34
33
"basePath": "{{.BasePath}}",
35
34
"paths": {
35
+ "/address": {
36
+ "get": {
37
+ "description": "get address",
38
+ "consumes": [
39
+ "application/json"
40
+ ],
41
+ "produces": [
42
+ "application/json"
43
+ ],
44
+ "tags": [
45
+ "address"
46
+ ],
47
+ "summary": "Show a Address",
48
+ "responses": {
49
+ "400": {
50
+ "description": "Bad Request",
51
+ "schema": {
52
+ "$ref": "#/definitions/models.BaseResponse"
53
+ }
54
+ },
55
+ "404": {
56
+ "description": "Not Found",
57
+ "schema": {
58
+ "$ref": "#/definitions/models.BaseResponse"
59
+ }
60
+ },
61
+ "500": {
62
+ "description": "Internal Server Error",
63
+ "schema": {
64
+ "$ref": "#/definitions/models.BaseResponse"
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "post": {
70
+ "description": "insert address",
71
+ "consumes": [
72
+ "application/json"
73
+ ],
74
+ "produces": [
75
+ "application/json"
76
+ ],
77
+ "tags": [
78
+ "address"
79
+ ],
80
+ "summary": "Show a Address",
81
+ "parameters": [
82
+ {
83
+ "description": "address",
84
+ "name": "address",
85
+ "in": "body",
86
+ "required": true,
87
+ "schema": {
88
+ "$ref": "#/definitions/models.Address"
89
+ }
90
+ }
91
+ ],
92
+ "responses": {
93
+ "400": {
94
+ "description": "Bad Request",
95
+ "schema": {
96
+ "$ref": "#/definitions/models.BaseResponse"
97
+ }
98
+ },
99
+ "404": {
100
+ "description": "Not Found",
101
+ "schema": {
102
+ "$ref": "#/definitions/models.BaseResponse"
103
+ }
104
+ },
105
+ "500": {
106
+ "description": "Internal Server Error",
107
+ "schema": {
108
+ "$ref": "#/definitions/models.BaseResponse"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ },
36
114
"/articles": {
37
115
"get": {
38
116
"description": "get string by ID",
@@ -266,92 +344,36 @@ var doc = `{
266
344
}
267
345
}
268
346
},
269
- "/domains": {
270
- "get": {
271
- "description": "get string by ID",
272
- "consumes": [
273
- "application/json"
274
- ],
275
- "produces": [
276
- "application/json"
277
- ],
278
- "tags": [
279
- "domains"
280
- ],
281
- "summary": "Show a Domains",
282
- "responses": {
283
- "400": {
284
- "description": "Bad Request",
285
- "schema": {
286
- "$ref": "#/definitions/controller.ResponseError"
287
- }
288
- },
289
- "404": {
290
- "description": "Not Found",
291
- "schema": {
292
- "$ref": "#/definitions/controller.ResponseError"
293
- }
294
- },
295
- "500": {
296
- "description": "Internal Server Error",
297
- "schema": {
298
- "$ref": "#/definitions/controller.ResponseError"
299
- }
300
- }
301
- }
302
- }
303
- },
304
- "/domains/available": {
347
+ "/health": {
305
348
"get": {
306
- "description": "get string by ID ",
349
+ "description": "get health ",
307
350
"consumes": [
308
351
"application/json"
309
352
],
310
353
"produces": [
311
354
"application/json"
312
355
],
313
356
"tags": [
314
- "domains"
315
- ],
316
- "summary": "Show a Domains Available",
317
- "parameters": [
318
- {
319
- "type": "string",
320
- "description": "domain name",
321
- "name": "domain",
322
- "in": "query",
323
- "required": true
324
- }
357
+ "health"
325
358
],
359
+ "summary": "Show a Health",
326
360
"responses": {
327
- "200": {
328
- "description": "OK",
329
- "schema": {
330
- "$ref": "#/definitions/models.DomainAvailableResponse"
331
- },
332
- "headers": {
333
- "Token": {
334
- "type": "string",
335
- "description": "qwerty"
336
- }
337
- }
338
- },
339
361
"400": {
340
362
"description": "Bad Request",
341
363
"schema": {
342
- "$ref": "#/definitions/controller.ResponseError "
364
+ "$ref": "#/definitions/models.BaseResponse "
343
365
}
344
366
},
345
367
"404": {
346
368
"description": "Not Found",
347
369
"schema": {
348
- "$ref": "#/definitions/controller.ResponseError "
370
+ "$ref": "#/definitions/models.BaseResponse "
349
371
}
350
372
},
351
373
"500": {
352
374
"description": "Internal Server Error",
353
375
"schema": {
354
- "$ref": "#/definitions/controller.ResponseError "
376
+ "$ref": "#/definitions/models.BaseResponse "
355
377
}
356
378
}
357
379
}
@@ -491,26 +513,67 @@ var doc = `{
491
513
}
492
514
}
493
515
},
494
- "models.DomainAvailableResponse ": {
516
+ "models.Address ": {
495
517
"type": "object",
518
+ "required": [
519
+ "address_full",
520
+ "address_title",
521
+ "user_id"
522
+ ],
496
523
"properties": {
497
- "available ": {
498
- "type": "boolean "
524
+ "address_full ": {
525
+ "type": "string "
499
526
},
500
- "currency ": {
527
+ "address_title ": {
501
528
"type": "string"
502
529
},
503
- "definitive ": {
504
- "type": "boolean "
530
+ "created_at ": {
531
+ "type": "string "
505
532
},
506
- "domain ": {
533
+ "created_by ": {
507
534
"type": "string"
508
535
},
509
- "period": {
536
+ "district_name": {
537
+ "type": "string"
538
+ },
539
+ "id": {
510
540
"type": "integer"
511
541
},
512
- "price": {
542
+ "primary": {
543
+ "type": "boolean"
544
+ },
545
+ "subdistrict_name": {
546
+ "type": "string"
547
+ },
548
+ "updated_at": {
549
+ "type": "string"
550
+ },
551
+ "updated_by": {
552
+ "type": "string"
553
+ },
554
+ "user_id": {
513
555
"type": "integer"
556
+ },
557
+ "zip_code": {
558
+ "type": "string"
559
+ }
560
+ }
561
+ },
562
+ "models.BaseResponse": {
563
+ "type": "object",
564
+ "properties": {
565
+ "code": {
566
+ "type": "string"
567
+ },
568
+ "data": {},
569
+ "error": {
570
+ "type": "array",
571
+ "items": {
572
+ "type": "string"
573
+ }
574
+ },
575
+ "message": {
576
+ "type": "string"
514
577
}
515
578
}
516
579
}
@@ -578,6 +641,13 @@ func (s *s) ReadDoc() string {
578
641
a , _ := json .Marshal (v )
579
642
return string (a )
580
643
},
644
+ "escape" : func (v interface {}) string {
645
+ // escape tabs
646
+ str := strings .Replace (v .(string ), "\t " , "\\ t" , - 1 )
647
+ // replace " with \", and if that results in \\", replace that with \\\"
648
+ str = strings .Replace (str , "\" " , "\\ \" " , - 1 )
649
+ return strings .Replace (str , "\\ \\ \" " , "\\ \\ \\ \" " , - 1 )
650
+ },
581
651
}).Parse (doc )
582
652
if err != nil {
583
653
return doc
@@ -592,5 +662,5 @@ func (s *s) ReadDoc() string {
592
662
}
593
663
594
664
func init () {
595
- swag .Register (swag . Name , & s {})
665
+ swag .Register ("swagger" , & s {})
596
666
}
0 commit comments