tebakaja commited on
Commit
f118f03
1 Parent(s): d3c13b7

feat: add Swagger OpenAPI

Browse files
.github/workflows/proxy_deployment.yaml CHANGED
@@ -35,6 +35,7 @@ jobs:
35
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
36
  SPACE_NAME: tebakaja_proxy_space-0
37
  HF_USERNAME: qywok
 
38
 
39
  steps:
40
  - name: Set global directory
@@ -58,10 +59,16 @@ jobs:
58
  git pull https://$HF_USERNAME:[email protected]/spaces/$HF_USERNAME/$SPACE_NAME main || \
59
  (git merge --strategy-option theirs)
60
 
 
 
 
 
 
 
61
  - name: Add and commit changes
62
  run: |
63
  git add -A
64
- git diff-index --quiet HEAD || git commit -m "tebakaja_proxy_space-0"
65
 
66
  - name: Push to Hugging Face
67
  run: |
@@ -78,6 +85,7 @@ jobs:
78
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
79
  SPACE_NAME: tebakaja_proxy_space-1
80
  HF_USERNAME: qywok
 
81
 
82
  steps:
83
  - name: Set global directory
@@ -101,10 +109,16 @@ jobs:
101
  git pull https://$HF_USERNAME:[email protected]/spaces/$HF_USERNAME/$SPACE_NAME main || \
102
  (git merge --strategy-option theirs)
103
 
 
 
 
 
 
 
104
  - name: Add and commit changes
105
  run: |
106
  git add -A
107
- git diff-index --quiet HEAD || git commit -m "tebakaja_proxy_space-1"
108
 
109
  - name: Push to Hugging Face
110
  run: |
@@ -121,6 +135,7 @@ jobs:
121
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
122
  SPACE_NAME: tebakaja_proxy_space-2
123
  HF_USERNAME: qywok
 
124
 
125
  steps:
126
  - name: Set global directory
@@ -144,10 +159,16 @@ jobs:
144
  git pull https://$HF_USERNAME:[email protected]/spaces/$HF_USERNAME/$SPACE_NAME main || \
145
  (git merge --strategy-option theirs)
146
 
 
 
 
 
 
 
147
  - name: Add and commit changes
148
  run: |
149
  git add -A
150
- git diff-index --quiet HEAD || git commit -m "tebakaja_proxy_space-2"
151
 
152
  - name: Push to Hugging Face
153
  run: |
 
35
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
36
  SPACE_NAME: tebakaja_proxy_space-0
37
  HF_USERNAME: qywok
38
+ ENDPOINT: qywok-tebakaja-proxy-space-0.hf.space
39
 
40
  steps:
41
  - name: Set global directory
 
59
  git pull https://$HF_USERNAME:[email protected]/spaces/$HF_USERNAME/$SPACE_NAME main || \
60
  (git merge --strategy-option theirs)
61
 
62
+ - name: Change Endpoint
63
+ run: |
64
+ sed -i "s/192.168.137.1:7860/$ENDPOINT/g" docs/docs.go
65
+ sed -i "s/192.168.137.1:7860/$ENDPOINT/g" docs/swagger.json
66
+ sed -i "s/192.168.137.1:7860/$ENDPOINT/g" docs/swagger.yaml
67
+
68
  - name: Add and commit changes
69
  run: |
70
  git add -A
71
+ git diff-index --quiet HEAD || git commit -m "$SPACE_NAME"
72
 
73
  - name: Push to Hugging Face
74
  run: |
 
85
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
86
  SPACE_NAME: tebakaja_proxy_space-1
87
  HF_USERNAME: qywok
88
+ ENDPOINT: qywok-tebakaja-proxy-space-1.hf.space
89
 
90
  steps:
91
  - name: Set global directory
 
109
  git pull https://$HF_USERNAME:[email protected]/spaces/$HF_USERNAME/$SPACE_NAME main || \
110
  (git merge --strategy-option theirs)
111
 
112
+ - name: Change Endpoint
113
+ run: |
114
+ sed -i "s/192.168.137.1:7860/$ENDPOINT/g" docs/docs.go
115
+ sed -i "s/192.168.137.1:7860/$ENDPOINT/g" docs/swagger.json
116
+ sed -i "s/192.168.137.1:7860/$ENDPOINT/g" docs/swagger.yaml
117
+
118
  - name: Add and commit changes
119
  run: |
120
  git add -A
121
+ git diff-index --quiet HEAD || git commit -m "$SPACE_NAME"
122
 
123
  - name: Push to Hugging Face
124
  run: |
 
135
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
136
  SPACE_NAME: tebakaja_proxy_space-2
137
  HF_USERNAME: qywok
138
+ ENDPOINT: qywok-tebakaja-proxy-space-2.hf.space
139
 
140
  steps:
141
  - name: Set global directory
 
159
  git pull https://$HF_USERNAME:[email protected]/spaces/$HF_USERNAME/$SPACE_NAME main || \
160
  (git merge --strategy-option theirs)
161
 
162
+ - name: Change Endpoint
163
+ run: |
164
+ sed -i "s/192.168.137.1:7860/$ENDPOINT/g" docs/docs.go
165
+ sed -i "s/192.168.137.1:7860/$ENDPOINT/g" docs/swagger.json
166
+ sed -i "s/192.168.137.1:7860/$ENDPOINT/g" docs/swagger.yaml
167
+
168
  - name: Add and commit changes
169
  run: |
170
  git add -A
171
+ git diff-index --quiet HEAD || git commit -m "$SPACE_NAME"
172
 
173
  - name: Push to Hugging Face
174
  run: |
Makefile CHANGED
@@ -4,9 +4,13 @@ PROD_ENDPOINT_0=https://qywok-tebakaja-proxy-space-0.hf.space
4
  PROD_ENDPOINT_1=https://qywok-tebakaja-proxy-space-1.hf.space
5
  PROD_ENDPOINT_2=https://qywok-tebakaja-proxy-space-2.hf.space
6
 
7
- start:
 
8
  go run main.go
9
 
 
 
 
10
  haproxy-test:
11
  haproxy -f ./haproxy/haproxy.cfg
12
 
@@ -30,6 +34,9 @@ endpoints_check:
30
  # --- Development Testing ---
31
  #
32
 
 
 
 
33
  stock-list-test:
34
  curl -X GET $(DEV_ENDPOINT)/stock/lists
35
 
 
4
  PROD_ENDPOINT_1=https://qywok-tebakaja-proxy-space-1.hf.space
5
  PROD_ENDPOINT_2=https://qywok-tebakaja-proxy-space-2.hf.space
6
 
7
+ svc:
8
+ swag init
9
  go run main.go
10
 
11
+ swag:
12
+ swag init
13
+
14
  haproxy-test:
15
  haproxy -f ./haproxy/haproxy.cfg
16
 
 
34
  # --- Development Testing ---
35
  #
36
 
37
+ swag-test:
38
+ curl -X GET $(DEV_ENDPOINT)/swagger/index.html
39
+
40
  stock-list-test:
41
  curl -X GET $(DEV_ENDPOINT)/stock/lists
42
 
docker-compose.yaml CHANGED
@@ -4,6 +4,11 @@ services:
4
  proxy:
5
  build:
6
  context: .
 
7
  dockerfile: Dockerfile
 
 
 
8
  ports:
9
  - "7860:7860"
 
 
4
  proxy:
5
  build:
6
  context: .
7
+ shm_size : 536870912
8
  dockerfile: Dockerfile
9
+ labels :
10
+ role : "proxy service"
11
+
12
  ports:
13
  - "7860:7860"
14
+
docs/docs.go ADDED
@@ -0,0 +1,430 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Code generated by swaggo/swag. DO NOT EDIT.
2
+
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
+ "termsOfService": "https://swagger.io/terms/",
14
+ "contact": {
15
+ "name": "Si Mimin",
16
+ "url": "https://www.tebakaja.com",
17
+ "email": "[email protected]"
18
+ },
19
+ "license": {
20
+ "name": "Apache 2.0",
21
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
22
+ },
23
+ "version": "{{.Version}}"
24
+ },
25
+ "host": "{{.Host}}",
26
+ "basePath": "{{.BasePath}}",
27
+ "paths": {
28
+ "/crypto/lists": {
29
+ "get": {
30
+ "description": "Cryptocurrency List",
31
+ "produces": [
32
+ "application/json"
33
+ ],
34
+ "tags": [
35
+ "Cryptocurrency"
36
+ ],
37
+ "summary": "Cryptocurrency List",
38
+ "responses": {
39
+ "200": {
40
+ "description": "OK",
41
+ "schema": {
42
+ "$ref": "#/definitions/crypto.ApiResponse"
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "post": {
48
+ "description": "Cryptocurrency Prediction",
49
+ "consumes": [
50
+ "application/json"
51
+ ],
52
+ "produces": [
53
+ "application/json"
54
+ ],
55
+ "tags": [
56
+ "Cryptocurrency"
57
+ ],
58
+ "summary": "Cryptocurrency Prediction",
59
+ "parameters": [
60
+ {
61
+ "description": "Request Body",
62
+ "name": "requestBody",
63
+ "in": "body",
64
+ "required": true,
65
+ "schema": {
66
+ "$ref": "#/definitions/crypto.PredictionRequest"
67
+ }
68
+ }
69
+ ],
70
+ "responses": {
71
+ "200": {
72
+ "description": "OK",
73
+ "schema": {
74
+ "$ref": "#/definitions/crypto.PredictionResponse"
75
+ }
76
+ }
77
+ }
78
+ }
79
+ },
80
+ "/national-currency/lists": {
81
+ "get": {
82
+ "description": "National Currency List",
83
+ "produces": [
84
+ "application/json"
85
+ ],
86
+ "tags": [
87
+ "National Currency"
88
+ ],
89
+ "summary": "National Currency List",
90
+ "responses": {
91
+ "200": {
92
+ "description": "OK",
93
+ "schema": {
94
+ "$ref": "#/definitions/national_currency.ApiResponse"
95
+ }
96
+ }
97
+ }
98
+ },
99
+ "post": {
100
+ "description": "National Currency Prediction",
101
+ "consumes": [
102
+ "application/json"
103
+ ],
104
+ "produces": [
105
+ "application/json"
106
+ ],
107
+ "tags": [
108
+ "National Currency"
109
+ ],
110
+ "summary": "National Currency Prediction",
111
+ "parameters": [
112
+ {
113
+ "description": "Request Body",
114
+ "name": "requestBody",
115
+ "in": "body",
116
+ "required": true,
117
+ "schema": {
118
+ "$ref": "#/definitions/national_currency.PredictionRequest"
119
+ }
120
+ }
121
+ ],
122
+ "responses": {
123
+ "200": {
124
+ "description": "OK",
125
+ "schema": {
126
+ "$ref": "#/definitions/national_currency.PredictionResponse"
127
+ }
128
+ }
129
+ }
130
+ }
131
+ },
132
+ "/stock/lists": {
133
+ "get": {
134
+ "description": "Stock List",
135
+ "produces": [
136
+ "application/json"
137
+ ],
138
+ "tags": [
139
+ "Stock"
140
+ ],
141
+ "summary": "Stock List",
142
+ "responses": {
143
+ "200": {
144
+ "description": "OK",
145
+ "schema": {
146
+ "$ref": "#/definitions/stock.ApiResponse"
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "post": {
152
+ "description": "Stock Prediction",
153
+ "consumes": [
154
+ "application/json"
155
+ ],
156
+ "produces": [
157
+ "application/json"
158
+ ],
159
+ "tags": [
160
+ "Stock"
161
+ ],
162
+ "summary": "Stock Prediction",
163
+ "parameters": [
164
+ {
165
+ "description": "Request Body",
166
+ "name": "requestBody",
167
+ "in": "body",
168
+ "required": true,
169
+ "schema": {
170
+ "$ref": "#/definitions/stock.PredictionRequest"
171
+ }
172
+ }
173
+ ],
174
+ "responses": {
175
+ "200": {
176
+ "description": "OK",
177
+ "schema": {
178
+ "$ref": "#/definitions/stock.PredictionResponse"
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ },
185
+ "definitions": {
186
+ "crypto.ApiResponse": {
187
+ "type": "object",
188
+ "properties": {
189
+ "data": {},
190
+ "message": {
191
+ "type": "string"
192
+ },
193
+ "status_code": {
194
+ "type": "integer"
195
+ }
196
+ }
197
+ },
198
+ "crypto.PredictionRequest": {
199
+ "type": "object",
200
+ "properties": {
201
+ "currency": {
202
+ "type": "string"
203
+ },
204
+ "days": {
205
+ "type": "integer"
206
+ }
207
+ }
208
+ },
209
+ "crypto.PredictionResponse": {
210
+ "type": "object",
211
+ "properties": {
212
+ "data": {
213
+ "type": "object",
214
+ "properties": {
215
+ "currency": {
216
+ "type": "string"
217
+ },
218
+ "predictions": {
219
+ "type": "object",
220
+ "properties": {
221
+ "actuals": {
222
+ "type": "array",
223
+ "items": {
224
+ "type": "object",
225
+ "properties": {
226
+ "date": {
227
+ "type": "string"
228
+ },
229
+ "price": {
230
+ "type": "number"
231
+ }
232
+ }
233
+ }
234
+ },
235
+ "predictions": {
236
+ "type": "array",
237
+ "items": {
238
+ "type": "object",
239
+ "properties": {
240
+ "date": {
241
+ "type": "string"
242
+ },
243
+ "price": {
244
+ "type": "number"
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }
250
+ }
251
+ }
252
+ },
253
+ "message": {
254
+ "type": "string"
255
+ },
256
+ "status_code": {
257
+ "type": "integer"
258
+ }
259
+ }
260
+ },
261
+ "national_currency.ApiResponse": {
262
+ "type": "object",
263
+ "properties": {
264
+ "data": {},
265
+ "message": {
266
+ "type": "string"
267
+ },
268
+ "status_code": {
269
+ "type": "integer"
270
+ }
271
+ }
272
+ },
273
+ "national_currency.PredictionRequest": {
274
+ "type": "object",
275
+ "properties": {
276
+ "currency": {
277
+ "type": "string"
278
+ },
279
+ "days": {
280
+ "type": "integer"
281
+ }
282
+ }
283
+ },
284
+ "national_currency.PredictionResponse": {
285
+ "type": "object",
286
+ "properties": {
287
+ "data": {
288
+ "type": "object",
289
+ "properties": {
290
+ "currency": {
291
+ "type": "string"
292
+ },
293
+ "predictions": {
294
+ "type": "object",
295
+ "properties": {
296
+ "actuals": {
297
+ "type": "array",
298
+ "items": {
299
+ "type": "object",
300
+ "properties": {
301
+ "date": {
302
+ "type": "string"
303
+ },
304
+ "price": {
305
+ "type": "number"
306
+ }
307
+ }
308
+ }
309
+ },
310
+ "predictions": {
311
+ "type": "array",
312
+ "items": {
313
+ "type": "object",
314
+ "properties": {
315
+ "date": {
316
+ "type": "string"
317
+ },
318
+ "price": {
319
+ "type": "number"
320
+ }
321
+ }
322
+ }
323
+ }
324
+ }
325
+ }
326
+ }
327
+ },
328
+ "message": {
329
+ "type": "string"
330
+ },
331
+ "status_code": {
332
+ "type": "integer"
333
+ }
334
+ }
335
+ },
336
+ "stock.ApiResponse": {
337
+ "type": "object",
338
+ "properties": {
339
+ "data": {},
340
+ "message": {
341
+ "type": "string"
342
+ },
343
+ "status_code": {
344
+ "type": "integer"
345
+ }
346
+ }
347
+ },
348
+ "stock.PredictionRequest": {
349
+ "type": "object",
350
+ "properties": {
351
+ "currency": {
352
+ "type": "string"
353
+ },
354
+ "days": {
355
+ "type": "integer"
356
+ }
357
+ }
358
+ },
359
+ "stock.PredictionResponse": {
360
+ "type": "object",
361
+ "properties": {
362
+ "data": {
363
+ "type": "object",
364
+ "properties": {
365
+ "currency": {
366
+ "type": "string"
367
+ },
368
+ "predictions": {
369
+ "type": "object",
370
+ "properties": {
371
+ "actuals": {
372
+ "type": "array",
373
+ "items": {
374
+ "type": "object",
375
+ "properties": {
376
+ "date": {
377
+ "type": "string"
378
+ },
379
+ "price": {
380
+ "type": "number"
381
+ }
382
+ }
383
+ }
384
+ },
385
+ "predictions": {
386
+ "type": "array",
387
+ "items": {
388
+ "type": "object",
389
+ "properties": {
390
+ "date": {
391
+ "type": "string"
392
+ },
393
+ "price": {
394
+ "type": "number"
395
+ }
396
+ }
397
+ }
398
+ }
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "message": {
404
+ "type": "string"
405
+ },
406
+ "status_code": {
407
+ "type": "integer"
408
+ }
409
+ }
410
+ }
411
+ }
412
+ }`
413
+
414
+ // SwaggerInfo holds exported Swagger Info so clients can modify it
415
+ var SwaggerInfo = &swag.Spec{
416
+ Version: "1.0",
417
+ Host: "192.168.137.1:7860",
418
+ BasePath: "",
419
+ Schemes: []string{},
420
+ Title: "TebakAja",
421
+ Description: "TebakAja REST API Service",
422
+ InfoInstanceName: "swagger",
423
+ SwaggerTemplate: docTemplate,
424
+ LeftDelim: "{{",
425
+ RightDelim: "}}",
426
+ }
427
+
428
+ func init() {
429
+ swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
430
+ }
docs/swagger.json ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "swagger": "2.0",
3
+ "info": {
4
+ "description": "TebakAja REST API Service",
5
+ "title": "TebakAja",
6
+ "termsOfService": "https://swagger.io/terms/",
7
+ "contact": {
8
+ "name": "Si Mimin",
9
+ "url": "https://www.tebakaja.com",
10
+ "email": "[email protected]"
11
+ },
12
+ "license": {
13
+ "name": "Apache 2.0",
14
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
15
+ },
16
+ "version": "1.0"
17
+ },
18
+ "host": "192.168.137.1:7860",
19
+ "paths": {
20
+ "/crypto/lists": {
21
+ "get": {
22
+ "description": "Cryptocurrency List",
23
+ "produces": [
24
+ "application/json"
25
+ ],
26
+ "tags": [
27
+ "Cryptocurrency"
28
+ ],
29
+ "summary": "Cryptocurrency List",
30
+ "responses": {
31
+ "200": {
32
+ "description": "OK",
33
+ "schema": {
34
+ "$ref": "#/definitions/crypto.ApiResponse"
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "post": {
40
+ "description": "Cryptocurrency Prediction",
41
+ "consumes": [
42
+ "application/json"
43
+ ],
44
+ "produces": [
45
+ "application/json"
46
+ ],
47
+ "tags": [
48
+ "Cryptocurrency"
49
+ ],
50
+ "summary": "Cryptocurrency Prediction",
51
+ "parameters": [
52
+ {
53
+ "description": "Request Body",
54
+ "name": "requestBody",
55
+ "in": "body",
56
+ "required": true,
57
+ "schema": {
58
+ "$ref": "#/definitions/crypto.PredictionRequest"
59
+ }
60
+ }
61
+ ],
62
+ "responses": {
63
+ "200": {
64
+ "description": "OK",
65
+ "schema": {
66
+ "$ref": "#/definitions/crypto.PredictionResponse"
67
+ }
68
+ }
69
+ }
70
+ }
71
+ },
72
+ "/national-currency/lists": {
73
+ "get": {
74
+ "description": "National Currency List",
75
+ "produces": [
76
+ "application/json"
77
+ ],
78
+ "tags": [
79
+ "National Currency"
80
+ ],
81
+ "summary": "National Currency List",
82
+ "responses": {
83
+ "200": {
84
+ "description": "OK",
85
+ "schema": {
86
+ "$ref": "#/definitions/national_currency.ApiResponse"
87
+ }
88
+ }
89
+ }
90
+ },
91
+ "post": {
92
+ "description": "National Currency Prediction",
93
+ "consumes": [
94
+ "application/json"
95
+ ],
96
+ "produces": [
97
+ "application/json"
98
+ ],
99
+ "tags": [
100
+ "National Currency"
101
+ ],
102
+ "summary": "National Currency Prediction",
103
+ "parameters": [
104
+ {
105
+ "description": "Request Body",
106
+ "name": "requestBody",
107
+ "in": "body",
108
+ "required": true,
109
+ "schema": {
110
+ "$ref": "#/definitions/national_currency.PredictionRequest"
111
+ }
112
+ }
113
+ ],
114
+ "responses": {
115
+ "200": {
116
+ "description": "OK",
117
+ "schema": {
118
+ "$ref": "#/definitions/national_currency.PredictionResponse"
119
+ }
120
+ }
121
+ }
122
+ }
123
+ },
124
+ "/stock/lists": {
125
+ "get": {
126
+ "description": "Stock List",
127
+ "produces": [
128
+ "application/json"
129
+ ],
130
+ "tags": [
131
+ "Stock"
132
+ ],
133
+ "summary": "Stock List",
134
+ "responses": {
135
+ "200": {
136
+ "description": "OK",
137
+ "schema": {
138
+ "$ref": "#/definitions/stock.ApiResponse"
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "post": {
144
+ "description": "Stock Prediction",
145
+ "consumes": [
146
+ "application/json"
147
+ ],
148
+ "produces": [
149
+ "application/json"
150
+ ],
151
+ "tags": [
152
+ "Stock"
153
+ ],
154
+ "summary": "Stock Prediction",
155
+ "parameters": [
156
+ {
157
+ "description": "Request Body",
158
+ "name": "requestBody",
159
+ "in": "body",
160
+ "required": true,
161
+ "schema": {
162
+ "$ref": "#/definitions/stock.PredictionRequest"
163
+ }
164
+ }
165
+ ],
166
+ "responses": {
167
+ "200": {
168
+ "description": "OK",
169
+ "schema": {
170
+ "$ref": "#/definitions/stock.PredictionResponse"
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "definitions": {
178
+ "crypto.ApiResponse": {
179
+ "type": "object",
180
+ "properties": {
181
+ "data": {},
182
+ "message": {
183
+ "type": "string"
184
+ },
185
+ "status_code": {
186
+ "type": "integer"
187
+ }
188
+ }
189
+ },
190
+ "crypto.PredictionRequest": {
191
+ "type": "object",
192
+ "properties": {
193
+ "currency": {
194
+ "type": "string"
195
+ },
196
+ "days": {
197
+ "type": "integer"
198
+ }
199
+ }
200
+ },
201
+ "crypto.PredictionResponse": {
202
+ "type": "object",
203
+ "properties": {
204
+ "data": {
205
+ "type": "object",
206
+ "properties": {
207
+ "currency": {
208
+ "type": "string"
209
+ },
210
+ "predictions": {
211
+ "type": "object",
212
+ "properties": {
213
+ "actuals": {
214
+ "type": "array",
215
+ "items": {
216
+ "type": "object",
217
+ "properties": {
218
+ "date": {
219
+ "type": "string"
220
+ },
221
+ "price": {
222
+ "type": "number"
223
+ }
224
+ }
225
+ }
226
+ },
227
+ "predictions": {
228
+ "type": "array",
229
+ "items": {
230
+ "type": "object",
231
+ "properties": {
232
+ "date": {
233
+ "type": "string"
234
+ },
235
+ "price": {
236
+ "type": "number"
237
+ }
238
+ }
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+ },
245
+ "message": {
246
+ "type": "string"
247
+ },
248
+ "status_code": {
249
+ "type": "integer"
250
+ }
251
+ }
252
+ },
253
+ "national_currency.ApiResponse": {
254
+ "type": "object",
255
+ "properties": {
256
+ "data": {},
257
+ "message": {
258
+ "type": "string"
259
+ },
260
+ "status_code": {
261
+ "type": "integer"
262
+ }
263
+ }
264
+ },
265
+ "national_currency.PredictionRequest": {
266
+ "type": "object",
267
+ "properties": {
268
+ "currency": {
269
+ "type": "string"
270
+ },
271
+ "days": {
272
+ "type": "integer"
273
+ }
274
+ }
275
+ },
276
+ "national_currency.PredictionResponse": {
277
+ "type": "object",
278
+ "properties": {
279
+ "data": {
280
+ "type": "object",
281
+ "properties": {
282
+ "currency": {
283
+ "type": "string"
284
+ },
285
+ "predictions": {
286
+ "type": "object",
287
+ "properties": {
288
+ "actuals": {
289
+ "type": "array",
290
+ "items": {
291
+ "type": "object",
292
+ "properties": {
293
+ "date": {
294
+ "type": "string"
295
+ },
296
+ "price": {
297
+ "type": "number"
298
+ }
299
+ }
300
+ }
301
+ },
302
+ "predictions": {
303
+ "type": "array",
304
+ "items": {
305
+ "type": "object",
306
+ "properties": {
307
+ "date": {
308
+ "type": "string"
309
+ },
310
+ "price": {
311
+ "type": "number"
312
+ }
313
+ }
314
+ }
315
+ }
316
+ }
317
+ }
318
+ }
319
+ },
320
+ "message": {
321
+ "type": "string"
322
+ },
323
+ "status_code": {
324
+ "type": "integer"
325
+ }
326
+ }
327
+ },
328
+ "stock.ApiResponse": {
329
+ "type": "object",
330
+ "properties": {
331
+ "data": {},
332
+ "message": {
333
+ "type": "string"
334
+ },
335
+ "status_code": {
336
+ "type": "integer"
337
+ }
338
+ }
339
+ },
340
+ "stock.PredictionRequest": {
341
+ "type": "object",
342
+ "properties": {
343
+ "currency": {
344
+ "type": "string"
345
+ },
346
+ "days": {
347
+ "type": "integer"
348
+ }
349
+ }
350
+ },
351
+ "stock.PredictionResponse": {
352
+ "type": "object",
353
+ "properties": {
354
+ "data": {
355
+ "type": "object",
356
+ "properties": {
357
+ "currency": {
358
+ "type": "string"
359
+ },
360
+ "predictions": {
361
+ "type": "object",
362
+ "properties": {
363
+ "actuals": {
364
+ "type": "array",
365
+ "items": {
366
+ "type": "object",
367
+ "properties": {
368
+ "date": {
369
+ "type": "string"
370
+ },
371
+ "price": {
372
+ "type": "number"
373
+ }
374
+ }
375
+ }
376
+ },
377
+ "predictions": {
378
+ "type": "array",
379
+ "items": {
380
+ "type": "object",
381
+ "properties": {
382
+ "date": {
383
+ "type": "string"
384
+ },
385
+ "price": {
386
+ "type": "number"
387
+ }
388
+ }
389
+ }
390
+ }
391
+ }
392
+ }
393
+ }
394
+ },
395
+ "message": {
396
+ "type": "string"
397
+ },
398
+ "status_code": {
399
+ "type": "integer"
400
+ }
401
+ }
402
+ }
403
+ }
404
+ }
docs/swagger.yaml ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ definitions:
2
+ crypto.ApiResponse:
3
+ properties:
4
+ data: {}
5
+ message:
6
+ type: string
7
+ status_code:
8
+ type: integer
9
+ type: object
10
+ crypto.PredictionRequest:
11
+ properties:
12
+ currency:
13
+ type: string
14
+ days:
15
+ type: integer
16
+ type: object
17
+ crypto.PredictionResponse:
18
+ properties:
19
+ data:
20
+ properties:
21
+ currency:
22
+ type: string
23
+ predictions:
24
+ properties:
25
+ actuals:
26
+ items:
27
+ properties:
28
+ date:
29
+ type: string
30
+ price:
31
+ type: number
32
+ type: object
33
+ type: array
34
+ predictions:
35
+ items:
36
+ properties:
37
+ date:
38
+ type: string
39
+ price:
40
+ type: number
41
+ type: object
42
+ type: array
43
+ type: object
44
+ type: object
45
+ message:
46
+ type: string
47
+ status_code:
48
+ type: integer
49
+ type: object
50
+ national_currency.ApiResponse:
51
+ properties:
52
+ data: {}
53
+ message:
54
+ type: string
55
+ status_code:
56
+ type: integer
57
+ type: object
58
+ national_currency.PredictionRequest:
59
+ properties:
60
+ currency:
61
+ type: string
62
+ days:
63
+ type: integer
64
+ type: object
65
+ national_currency.PredictionResponse:
66
+ properties:
67
+ data:
68
+ properties:
69
+ currency:
70
+ type: string
71
+ predictions:
72
+ properties:
73
+ actuals:
74
+ items:
75
+ properties:
76
+ date:
77
+ type: string
78
+ price:
79
+ type: number
80
+ type: object
81
+ type: array
82
+ predictions:
83
+ items:
84
+ properties:
85
+ date:
86
+ type: string
87
+ price:
88
+ type: number
89
+ type: object
90
+ type: array
91
+ type: object
92
+ type: object
93
+ message:
94
+ type: string
95
+ status_code:
96
+ type: integer
97
+ type: object
98
+ stock.ApiResponse:
99
+ properties:
100
+ data: {}
101
+ message:
102
+ type: string
103
+ status_code:
104
+ type: integer
105
+ type: object
106
+ stock.PredictionRequest:
107
+ properties:
108
+ currency:
109
+ type: string
110
+ days:
111
+ type: integer
112
+ type: object
113
+ stock.PredictionResponse:
114
+ properties:
115
+ data:
116
+ properties:
117
+ currency:
118
+ type: string
119
+ predictions:
120
+ properties:
121
+ actuals:
122
+ items:
123
+ properties:
124
+ date:
125
+ type: string
126
+ price:
127
+ type: number
128
+ type: object
129
+ type: array
130
+ predictions:
131
+ items:
132
+ properties:
133
+ date:
134
+ type: string
135
+ price:
136
+ type: number
137
+ type: object
138
+ type: array
139
+ type: object
140
+ type: object
141
+ message:
142
+ type: string
143
+ status_code:
144
+ type: integer
145
+ type: object
146
+ host: 192.168.137.1:7860
147
+ info:
148
+ contact:
149
150
+ name: Si Mimin
151
+ url: https://www.tebakaja.com
152
+ description: TebakAja REST API Service
153
+ license:
154
+ name: Apache 2.0
155
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
156
+ termsOfService: https://swagger.io/terms/
157
+ title: TebakAja
158
+ version: "1.0"
159
+ paths:
160
+ /crypto/lists:
161
+ get:
162
+ description: Cryptocurrency List
163
+ produces:
164
+ - application/json
165
+ responses:
166
+ "200":
167
+ description: OK
168
+ schema:
169
+ $ref: '#/definitions/crypto.ApiResponse'
170
+ summary: Cryptocurrency List
171
+ tags:
172
+ - Cryptocurrency
173
+ post:
174
+ consumes:
175
+ - application/json
176
+ description: Cryptocurrency Prediction
177
+ parameters:
178
+ - description: Request Body
179
+ in: body
180
+ name: requestBody
181
+ required: true
182
+ schema:
183
+ $ref: '#/definitions/crypto.PredictionRequest'
184
+ produces:
185
+ - application/json
186
+ responses:
187
+ "200":
188
+ description: OK
189
+ schema:
190
+ $ref: '#/definitions/crypto.PredictionResponse'
191
+ summary: Cryptocurrency Prediction
192
+ tags:
193
+ - Cryptocurrency
194
+ /national-currency/lists:
195
+ get:
196
+ description: National Currency List
197
+ produces:
198
+ - application/json
199
+ responses:
200
+ "200":
201
+ description: OK
202
+ schema:
203
+ $ref: '#/definitions/national_currency.ApiResponse'
204
+ summary: National Currency List
205
+ tags:
206
+ - National Currency
207
+ post:
208
+ consumes:
209
+ - application/json
210
+ description: National Currency Prediction
211
+ parameters:
212
+ - description: Request Body
213
+ in: body
214
+ name: requestBody
215
+ required: true
216
+ schema:
217
+ $ref: '#/definitions/national_currency.PredictionRequest'
218
+ produces:
219
+ - application/json
220
+ responses:
221
+ "200":
222
+ description: OK
223
+ schema:
224
+ $ref: '#/definitions/national_currency.PredictionResponse'
225
+ summary: National Currency Prediction
226
+ tags:
227
+ - National Currency
228
+ /stock/lists:
229
+ get:
230
+ description: Stock List
231
+ produces:
232
+ - application/json
233
+ responses:
234
+ "200":
235
+ description: OK
236
+ schema:
237
+ $ref: '#/definitions/stock.ApiResponse'
238
+ summary: Stock List
239
+ tags:
240
+ - Stock
241
+ post:
242
+ consumes:
243
+ - application/json
244
+ description: Stock Prediction
245
+ parameters:
246
+ - description: Request Body
247
+ in: body
248
+ name: requestBody
249
+ required: true
250
+ schema:
251
+ $ref: '#/definitions/stock.PredictionRequest'
252
+ produces:
253
+ - application/json
254
+ responses:
255
+ "200":
256
+ description: OK
257
+ schema:
258
+ $ref: '#/definitions/stock.PredictionResponse'
259
+ summary: Stock Prediction
260
+ tags:
261
+ - Stock
262
+ swagger: "2.0"
go.mod CHANGED
@@ -3,18 +3,40 @@ module tebakaja_lb_proxy
3
  go 1.20
4
 
5
  require (
 
 
 
6
  github.com/andybalholm/brotli v1.1.0 // indirect
 
 
 
 
 
7
  github.com/gofiber/fiber/v2 v2.52.5 // indirect
8
  github.com/google/uuid v1.6.0 // indirect
 
9
  github.com/klauspost/compress v1.17.9 // indirect
 
10
  github.com/mattn/go-colorable v0.1.13 // indirect
11
  github.com/mattn/go-isatty v0.0.20 // indirect
12
  github.com/mattn/go-runewidth v0.0.15 // indirect
13
  github.com/philhofer/fwd v1.1.2 // indirect
14
  github.com/rivo/uniseg v0.4.7 // indirect
 
 
 
 
 
15
  github.com/tinylib/msgp v1.1.8 // indirect
 
16
  github.com/valyala/bytebufferpool v1.0.0 // indirect
17
  github.com/valyala/fasthttp v1.55.0 // indirect
18
  github.com/valyala/tcplisten v1.0.0 // indirect
 
19
  golang.org/x/sys v0.22.0 // indirect
 
 
 
 
 
20
  )
 
3
  go 1.20
4
 
5
  require (
6
+ github.com/KyleBanks/depth v1.2.1 // indirect
7
+ github.com/PuerkitoBio/purell v1.2.1 // indirect
8
+ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
9
  github.com/andybalholm/brotli v1.1.0 // indirect
10
+ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
11
+ github.com/go-openapi/jsonpointer v0.21.0 // indirect
12
+ github.com/go-openapi/jsonreference v0.21.0 // indirect
13
+ github.com/go-openapi/spec v0.21.0 // indirect
14
+ github.com/go-openapi/swag v0.23.0 // indirect
15
  github.com/gofiber/fiber/v2 v2.52.5 // indirect
16
  github.com/google/uuid v1.6.0 // indirect
17
+ github.com/josharian/intern v1.0.0 // indirect
18
  github.com/klauspost/compress v1.17.9 // indirect
19
+ github.com/mailru/easyjson v0.7.7 // indirect
20
  github.com/mattn/go-colorable v0.1.13 // indirect
21
  github.com/mattn/go-isatty v0.0.20 // indirect
22
  github.com/mattn/go-runewidth v0.0.15 // indirect
23
  github.com/philhofer/fwd v1.1.2 // indirect
24
  github.com/rivo/uniseg v0.4.7 // indirect
25
+ github.com/russross/blackfriday/v2 v2.0.1 // indirect
26
+ github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
27
+ github.com/swaggo/fiber-swagger v1.3.0 // indirect
28
+ github.com/swaggo/files v1.0.1 // indirect
29
+ github.com/swaggo/swag v1.16.3 // indirect
30
  github.com/tinylib/msgp v1.1.8 // indirect
31
+ github.com/urfave/cli/v2 v2.3.0 // indirect
32
  github.com/valyala/bytebufferpool v1.0.0 // indirect
33
  github.com/valyala/fasthttp v1.55.0 // indirect
34
  github.com/valyala/tcplisten v1.0.0 // indirect
35
+ golang.org/x/net v0.27.0 // indirect
36
  golang.org/x/sys v0.22.0 // indirect
37
+ golang.org/x/text v0.16.0 // indirect
38
+ golang.org/x/tools v0.23.0 // indirect
39
+ gopkg.in/yaml.v2 v2.4.0 // indirect
40
+ gopkg.in/yaml.v3 v3.0.1 // indirect
41
+ sigs.k8s.io/yaml v1.3.0 // indirect
42
  )
go.sum CHANGED
@@ -1,11 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
1
  github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
2
  github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  github.com/gofiber/fiber/v2 v2.52.5 h1:tWoP1MJQjGEe4GB5TUGOi7P2E0ZMMRx5ZTG4rT+yGMo=
4
  github.com/gofiber/fiber/v2 v2.52.5/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ=
5
  github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
6
  github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 
 
 
 
 
7
  github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
8
  github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
 
 
 
 
 
 
 
 
 
 
9
  github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
10
  github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
11
  github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
@@ -13,50 +64,128 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
13
  github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
14
  github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
15
  github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
 
 
 
 
 
 
16
  github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw=
17
  github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0=
 
18
  github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
19
  github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
20
  github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0=
22
  github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw=
 
 
23
  github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
24
  github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
 
 
25
  github.com/valyala/fasthttp v1.55.0 h1:Zkefzgt6a7+bVKHnu/YaYSOPfNYNisSVBo/unVCf8k8=
26
  github.com/valyala/fasthttp v1.55.0/go.mod h1:NkY9JtkrpPKmgwV3HTaS2HWaJss9RSIsRVfcxxoHiOM=
27
  github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
28
  github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
 
29
  github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
30
  golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 
31
  golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 
 
32
  golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
33
  golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
 
 
34
  golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
35
  golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 
 
 
 
36
  golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
37
  golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
 
 
 
 
 
38
  golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 
39
  golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
40
  golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
41
  golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 
42
  golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 
 
43
  golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 
 
 
44
  golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
45
  golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
46
  golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
47
  golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 
48
  golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
49
  golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
50
  golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
51
  golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
52
  golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
53
  golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
 
54
  golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
55
  golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 
56
  golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
57
  golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
 
 
 
58
  golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 
59
  golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 
60
  golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
61
  golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
 
 
 
 
62
  golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
2
+ github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
3
+ github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
4
+ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
5
+ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
6
+ github.com/PuerkitoBio/purell v1.2.1 h1:QsZ4TjvwiMpat6gBCBxEQI0rcS9ehtkKtSpiUnd9N28=
7
+ github.com/PuerkitoBio/purell v1.2.1/go.mod h1:ZwHcC/82TOaovDi//J/804umJFFmbOHPngi8iYYv/Eo=
8
+ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
9
+ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
10
+ github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
11
+ github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
12
  github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
13
  github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
14
+ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
15
+ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
16
+ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
17
+ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
18
+ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
19
+ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
20
+ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
21
+ github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
22
+ github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
23
+ github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ=
24
+ github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY=
25
+ github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
26
+ github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
27
+ github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ=
28
+ github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4=
29
+ github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
30
+ github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
31
+ github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY=
32
+ github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk=
33
+ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
34
+ github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
35
+ github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
36
+ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
37
+ github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
38
+ github.com/gofiber/fiber/v2 v2.32.0/go.mod h1:CMy5ZLiXkn6qwthrl03YMyW1NLfj0rhxz2LKl4t7ZTY=
39
  github.com/gofiber/fiber/v2 v2.52.5 h1:tWoP1MJQjGEe4GB5TUGOi7P2E0ZMMRx5ZTG4rT+yGMo=
40
  github.com/gofiber/fiber/v2 v2.52.5/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ=
41
  github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
42
  github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
43
+ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
44
+ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
45
+ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
46
+ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
47
+ github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
48
  github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
49
  github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
50
+ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
51
+ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
52
+ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
53
+ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
54
+ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
55
+ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
56
+ github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
57
+ github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
58
+ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
59
+ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
60
  github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
61
  github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
62
  github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
 
64
  github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
65
  github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
66
  github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
67
+ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
68
+ github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U=
69
+ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
70
+ github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
71
+ github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
72
+ github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
73
  github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw=
74
  github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0=
75
+ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
76
  github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
77
  github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
78
  github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
79
+ github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
80
+ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
81
+ github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
82
+ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
83
+ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
84
+ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
85
+ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
86
+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
87
+ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
88
+ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
89
+ github.com/swaggo/fiber-swagger v1.3.0 h1:RMjIVDleQodNVdKuu7GRs25Eq8RVXK7MwY9f5jbobNg=
90
+ github.com/swaggo/fiber-swagger v1.3.0/go.mod h1:18MuDqBkYEiUmeM/cAAB8CI28Bi62d/mys39j1QqF9w=
91
+ github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w=
92
+ github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE=
93
+ github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg=
94
+ github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ=
95
+ github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg=
96
+ github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk=
97
  github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0=
98
  github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw=
99
+ github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=
100
+ github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
101
  github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
102
  github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
103
+ github.com/valyala/fasthttp v1.35.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
104
+ github.com/valyala/fasthttp v1.36.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
105
  github.com/valyala/fasthttp v1.55.0 h1:Zkefzgt6a7+bVKHnu/YaYSOPfNYNisSVBo/unVCf8k8=
106
  github.com/valyala/fasthttp v1.55.0/go.mod h1:NkY9JtkrpPKmgwV3HTaS2HWaJss9RSIsRVfcxxoHiOM=
107
  github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
108
  github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
109
+ github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
110
  github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
111
  golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
112
+ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
113
  golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
114
+ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
115
+ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
116
  golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
117
  golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
118
+ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
119
+ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
120
  golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
121
  golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
122
+ golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
123
+ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
124
+ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
125
+ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
126
  golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
127
  golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
128
+ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
129
+ golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
130
+ golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
131
+ golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
132
+ golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
133
  golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
134
+ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
135
  golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
136
  golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
137
  golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
138
+ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
139
  golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
140
+ golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
141
+ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
142
  golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
143
+ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
144
+ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
145
+ golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
146
  golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
147
  golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
148
  golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
149
  golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
150
+ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
151
  golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
152
  golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
153
  golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
154
  golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
155
  golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
156
  golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
157
+ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
158
  golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
159
  golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
160
+ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
161
  golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
162
  golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
163
+ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
164
+ golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
165
+ golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
166
  golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
167
+ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
168
  golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
169
+ golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
170
  golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
171
  golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
172
+ golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
173
+ golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
174
+ golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
175
+ golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=
176
  golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
177
+ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
178
+ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
179
+ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
180
+ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
181
+ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
182
+ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
183
+ gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
184
+ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
185
+ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
186
+ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
187
+ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
188
+ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
189
+ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
190
+ sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
191
+ sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
main.go CHANGED
@@ -13,10 +13,28 @@ import (
13
  crypto_proxy "tebakaja_lb_proxy/proxy/crypto"
14
  national_currency_proxy "tebakaja_lb_proxy/proxy/national_currency"
15
 
 
 
 
 
16
  // Node Exporter
17
  // exporter_proxy "tebakaja_lb_proxy/proxy/node_exporter"
18
  )
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  func main() {
21
  proxyService := fiber.New()
22
  proxyService.Use(proxy.LoggingMiddleware)
@@ -46,11 +64,12 @@ func main() {
46
  national_currency_proxy.NationalCurrencyPredictionHandler(
47
  &national_currency_proxy.NationalCurrencyServiceImpl{}))
48
 
49
- // exporterGroup := proxyService.Group("/exporter")
50
- // exporterGroup.Get("/metrics",
51
- // exporter_proxy.ExporterMetricsHandler(
52
- // &exporter_proxy.ExporterServiceImpl{}))
53
 
 
54
  port := 7860
55
- log.Fatal(proxyService.Listen(fmt.Sprintf("0.0.0.0:%d", port)))
56
  }
 
13
  crypto_proxy "tebakaja_lb_proxy/proxy/crypto"
14
  national_currency_proxy "tebakaja_lb_proxy/proxy/national_currency"
15
 
16
+ // Swagger
17
+ _ "tebakaja_lb_proxy/docs"
18
+ swagger "github.com/swaggo/fiber-swagger"
19
+
20
  // Node Exporter
21
  // exporter_proxy "tebakaja_lb_proxy/proxy/node_exporter"
22
  )
23
 
24
+
25
+ // @title TebakAja
26
+ // @version 1.0
27
+ // @description TebakAja REST API Service
28
+ // @termsOfService https://swagger.io/terms/
29
+
30
+ // @contact.name Si Mimin
31
+ // @contact.url https://www.tebakaja.com
32
+ // @contact.email [email protected]
33
+
34
+ // @license.name Apache 2.0
35
+ // @license.url http://www.apache.org/licenses/LICENSE-2.0.html
36
+
37
+ // @host 192.168.137.1:7860
38
  func main() {
39
  proxyService := fiber.New()
40
  proxyService.Use(proxy.LoggingMiddleware)
 
64
  national_currency_proxy.NationalCurrencyPredictionHandler(
65
  &national_currency_proxy.NationalCurrencyServiceImpl{}))
66
 
67
+ proxyService.Get("/swagger/*", swagger.WrapHandler)
68
+ proxyService.Get("/", func(c *fiber.Ctx) error {
69
+ return c.Redirect("/swagger/index.html", fiber.StatusMovedPermanently)
70
+ })
71
 
72
+ host := "0.0.0.0"
73
  port := 7860
74
+ log.Fatal(proxyService.Listen(fmt.Sprintf("%s:%d", host, port)))
75
  }
proxy/crypto/list_handler.go CHANGED
@@ -11,12 +11,17 @@ import (
11
  )
12
 
13
 
14
- /*
15
- * --- Cryptocurrency Prediction Model Lists Handler ---
16
- */
 
 
 
 
 
17
  func CryptoListsHandler(service CryptoService) fiber.Handler {
18
  return func(c *fiber.Ctx) error {
19
- ctx, cancel := context.WithTimeout(c.Context(), 120*time.Second)
20
  defer cancel()
21
 
22
  ch := make(chan ApiResponse, 1)
 
11
  )
12
 
13
 
14
+
15
+ // CryptoListsHandler godoc
16
+ // @Summary Cryptocurrency List
17
+ // @Description Cryptocurrency List
18
+ // @Tags Cryptocurrency
19
+ // @Produce json
20
+ // @Success 200 {object} ApiResponse
21
+ // @Router /crypto/lists [get]
22
  func CryptoListsHandler(service CryptoService) fiber.Handler {
23
  return func(c *fiber.Ctx) error {
24
+ ctx, cancel := context.WithTimeout(c.Context(), 120 * time.Second)
25
  defer cancel()
26
 
27
  ch := make(chan ApiResponse, 1)
proxy/crypto/prediction_handler.go CHANGED
@@ -12,12 +12,19 @@ import (
12
  )
13
 
14
 
15
- /*
16
- * --- Cryptocurrency Prediction Handler ---
17
- */
 
 
 
 
 
 
 
18
  func CryptoPredictionHandler(service CryptoService) fiber.Handler {
19
  return func(c *fiber.Ctx) error {
20
- ctx, cancel := context.WithTimeout(c.Context(), 120*time.Second)
21
  defer cancel()
22
 
23
  ch := make(chan ApiResponse, 1)
 
12
  )
13
 
14
 
15
+
16
+ // CryptoPredictionHandler godoc
17
+ // @Summary Cryptocurrency Prediction
18
+ // @Description Cryptocurrency Prediction
19
+ // @Tags Cryptocurrency
20
+ // @Accept json
21
+ // @Produce json
22
+ // @Param requestBody body PredictionRequest true "Request Body"
23
+ // @Success 200 {object} PredictionResponse
24
+ // @Router /crypto/lists [post]
25
  func CryptoPredictionHandler(service CryptoService) fiber.Handler {
26
  return func(c *fiber.Ctx) error {
27
+ ctx, cancel := context.WithTimeout(c.Context(), 120 * time.Second)
28
  defer cancel()
29
 
30
  ch := make(chan ApiResponse, 1)
proxy/crypto/structs.go CHANGED
@@ -6,11 +6,13 @@ type ApiResponse struct {
6
  Data interface{} `json:"data"`
7
  }
8
 
 
9
  type PredictionRequest struct {
10
  Days int `json:"days"`
11
  Currency string `json:"currency"`
12
  }
13
 
 
14
  type PredictionResponse struct {
15
  Message string `json:"message"`
16
  StatusCode int `json:"status_code"`
 
6
  Data interface{} `json:"data"`
7
  }
8
 
9
+
10
  type PredictionRequest struct {
11
  Days int `json:"days"`
12
  Currency string `json:"currency"`
13
  }
14
 
15
+
16
  type PredictionResponse struct {
17
  Message string `json:"message"`
18
  StatusCode int `json:"status_code"`
proxy/national_currency/list_handler.go CHANGED
@@ -11,9 +11,14 @@ import (
11
  )
12
 
13
 
14
- /*
15
- * --- National Currency Prediction Model Lists Handler ---
16
- */
 
 
 
 
 
17
  func NationalCurrencyListsHandler(service NationalCurrencyService) fiber.Handler {
18
  return func(c *fiber.Ctx) error {
19
  ctx, cancel := context.WithTimeout(c.Context(), 120*time.Second)
 
11
  )
12
 
13
 
14
+
15
+ // NationalCurrencyListsHandler godoc
16
+ // @Summary National Currency List
17
+ // @Description National Currency List
18
+ // @Tags National Currency
19
+ // @Produce json
20
+ // @Success 200 {object} ApiResponse
21
+ // @Router /national-currency/lists [get]
22
  func NationalCurrencyListsHandler(service NationalCurrencyService) fiber.Handler {
23
  return func(c *fiber.Ctx) error {
24
  ctx, cancel := context.WithTimeout(c.Context(), 120*time.Second)
proxy/national_currency/prediction_handler.go CHANGED
@@ -12,9 +12,16 @@ import (
12
  )
13
 
14
 
15
- /*
16
- * --- National Currency Prediction Handler ---
17
- */
 
 
 
 
 
 
 
18
  func NationalCurrencyPredictionHandler(service NationalCurrencyService) fiber.Handler {
19
  return func(c *fiber.Ctx) error {
20
  ctx, cancel := context.WithTimeout(c.Context(), 120*time.Second)
 
12
  )
13
 
14
 
15
+
16
+ // NationalCurrencyPredictionHandler godoc
17
+ // @Summary National Currency Prediction
18
+ // @Description National Currency Prediction
19
+ // @Tags National Currency
20
+ // @Accept json
21
+ // @Produce json
22
+ // @Param requestBody body PredictionRequest true "Request Body"
23
+ // @Success 200 {object} PredictionResponse
24
+ // @Router /national-currency/lists [post]
25
  func NationalCurrencyPredictionHandler(service NationalCurrencyService) fiber.Handler {
26
  return func(c *fiber.Ctx) error {
27
  ctx, cancel := context.WithTimeout(c.Context(), 120*time.Second)
proxy/node_exporter/exporter_service.go CHANGED
@@ -28,13 +28,11 @@ func (s *ExporterServiceImpl) ExporterMetricsService(ctx context.Context) (strin
28
  return "", fmt.Errorf("request failed with status code: %d", resp.StatusCode)
29
  }
30
 
31
- // Read the response body as plain text
32
  body, err := io.ReadAll(resp.Body)
33
  if err != nil {
34
  return "", fmt.Errorf("failed to read response body: %v", err)
35
  }
36
 
37
- // Convert []byte to string
38
  metricsResponse := string(body)
39
 
40
  return metricsResponse, nil
 
28
  return "", fmt.Errorf("request failed with status code: %d", resp.StatusCode)
29
  }
30
 
 
31
  body, err := io.ReadAll(resp.Body)
32
  if err != nil {
33
  return "", fmt.Errorf("failed to read response body: %v", err)
34
  }
35
 
 
36
  metricsResponse := string(body)
37
 
38
  return metricsResponse, nil
proxy/stock/list_handler.go CHANGED
@@ -11,9 +11,14 @@ import (
11
  )
12
 
13
 
14
- /*
15
- * --- Stock Prediction Model Lists Handler ---
16
- */
 
 
 
 
 
17
  func StockListsHandler(service StockService) fiber.Handler {
18
  return func(c *fiber.Ctx) error {
19
  ctx, cancel := context.WithTimeout(c.Context(), 120*time.Second)
 
11
  )
12
 
13
 
14
+
15
+ // StockListsHandler godoc
16
+ // @Summary Stock List
17
+ // @Description Stock List
18
+ // @Tags Stock
19
+ // @Produce json
20
+ // @Success 200 {object} ApiResponse
21
+ // @Router /stock/lists [get]
22
  func StockListsHandler(service StockService) fiber.Handler {
23
  return func(c *fiber.Ctx) error {
24
  ctx, cancel := context.WithTimeout(c.Context(), 120*time.Second)
proxy/stock/prediction_handler.go CHANGED
@@ -12,9 +12,16 @@ import (
12
  )
13
 
14
 
15
- /*
16
- * --- Stock Prediction Handler ---
17
- */
 
 
 
 
 
 
 
18
  func StockPredictionHandler(service StockService) fiber.Handler {
19
  return func(c *fiber.Ctx) error {
20
  ctx, cancel := context.WithTimeout(c.Context(), 120 * time.Second)
 
12
  )
13
 
14
 
15
+
16
+ // StockPredictionHandler godoc
17
+ // @Summary Stock Prediction
18
+ // @Description Stock Prediction
19
+ // @Tags Stock
20
+ // @Accept json
21
+ // @Produce json
22
+ // @Param requestBody body PredictionRequest true "Request Body"
23
+ // @Success 200 {object} PredictionResponse
24
+ // @Router /stock/lists [post]
25
  func StockPredictionHandler(service StockService) fiber.Handler {
26
  return func(c *fiber.Ctx) error {
27
  ctx, cancel := context.WithTimeout(c.Context(), 120 * time.Second)