diff --git a/devbox.json b/devbox.json index 3e95986..f5c20c2 100644 --- a/devbox.json +++ b/devbox.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.6/.schema/devbox.schema.json", - "packages": ["go@1.23", "postgresql@latest", "go-swag@latest"], + "packages": ["go@1.23", "postgresql@latest", "go-swag@1.8.12"], "env": { "ALLOWED_ORIGINS": "*", "DB_HOST": "localhost", diff --git a/devbox.lock b/devbox.lock index 36ec25e..727e8af 100644 --- a/devbox.lock +++ b/devbox.lock @@ -1,51 +1,51 @@ { "lockfile_version": "1", "packages": { - "go-swag@latest": { - "last_modified": "2024-10-20T12:41:22Z", - "resolved": "github:NixOS/nixpkgs/ca30f584e18024baf39c395001262ed936f27ebd#go-swag", + "go-swag@1.8.12": { + "last_modified": "2024-03-08T13:51:52Z", + "resolved": "github:NixOS/nixpkgs/a343533bccc62400e8a9560423486a3b6c11a23b#go-swag", "source": "devbox-search", - "version": "1.16.4", + "version": "1.8.12", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/6injiyldyzxfma8fn4cr9m6kk1d4wzgc-go-swag-1.16.4", + "path": "/nix/store/sdl346zvps3hm9r2zbxm5sxqydzfbr3h-go-swag-1.8.12", "default": true } ], - "store_path": "/nix/store/6injiyldyzxfma8fn4cr9m6kk1d4wzgc-go-swag-1.16.4" + "store_path": "/nix/store/sdl346zvps3hm9r2zbxm5sxqydzfbr3h-go-swag-1.8.12" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/x9cxjc66kbyxyhps5d8im20ryh8x0w4c-go-swag-1.16.4", + "path": "/nix/store/1m1aa9mhfkw8z55h0m7mfv06mn04m65s-go-swag-1.8.12", "default": true } ], - "store_path": "/nix/store/x9cxjc66kbyxyhps5d8im20ryh8x0w4c-go-swag-1.16.4" + "store_path": "/nix/store/1m1aa9mhfkw8z55h0m7mfv06mn04m65s-go-swag-1.8.12" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/mqq20s7w8vsq8a04lch5sbzlck1bx1a0-go-swag-1.16.4", + "path": "/nix/store/dqzrhw11y2vwkar2kwsbhgz483zchy05-go-swag-1.8.12", "default": true } ], - "store_path": "/nix/store/mqq20s7w8vsq8a04lch5sbzlck1bx1a0-go-swag-1.16.4" + "store_path": "/nix/store/dqzrhw11y2vwkar2kwsbhgz483zchy05-go-swag-1.8.12" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/vlib2003m3vl5lb68ngvw8ncw32s2hbj-go-swag-1.16.4", + "path": "/nix/store/zyi1wnwd54m1ysj3l6lqj2ndi9h17k0k-go-swag-1.8.12", "default": true } ], - "store_path": "/nix/store/vlib2003m3vl5lb68ngvw8ncw32s2hbj-go-swag-1.16.4" + "store_path": "/nix/store/zyi1wnwd54m1ysj3l6lqj2ndi9h17k0k-go-swag-1.8.12" } } }, diff --git a/docs/docs.go b/docs/docs.go index 539f9ea..94bb251 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,4 +1,5 @@ -// Package docs Code generated by swaggo/swag. DO NOT EDIT +// Code generated by swaggo/swag. DO NOT EDIT. + package docs import "github.com/swaggo/swag" @@ -14,176 +15,7 @@ const docTemplate = `{ }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", - "paths": { - "/oracle/circulated-icy": { - "get": { - "description": "Get Circulated ICY", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Oracle" - ], - "summary": "Get Circulated ICY", - "operationId": "getCirculatedICY", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/oracle/icy-btc-ratio": { - "get": { - "description": "Get ICY/BTC Realtime Price", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Oracle" - ], - "summary": "Get ICY/BTC Realtime Price", - "operationId": "getICYBTCRatio", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/oracle/icy-btc-ratio-cached": { - "get": { - "description": "Get ICY/BTC cached Price", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Oracle" - ], - "summary": "Get ICY/BTC cached Price", - "operationId": "getICYBTCRatioCached", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/oracle/treasury-btc": { - "get": { - "description": "Get Treasury BTC", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Oracle" - ], - "summary": "Get Treasury BTC", - "operationId": "getTreasuryBTC", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "ApiError": { - "description": "validation error details", - "type": "object", - "properties": { - "enums": { - "description": "available options incase of field's payload is enums", - "type": "array", - "items": { - "type": "string" - } - }, - "field": { - "description": "the field cause the error", - "type": "string" - }, - "msg": { - "description": "error message", - "type": "string" - } - } - }, - "ErrorResponse": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/ApiError" - } - } - } - }, - "github_com_dwarvesf_icy-backend_internal_model.Web3BigInt": { - "type": "object", - "properties": { - "decimal": { - "type": "integer" - }, - "value": { - "type": "string" - } - } - } - } + "paths": {} }` // SwaggerInfo holds exported Swagger Info so clients can modify it @@ -196,8 +28,6 @@ var SwaggerInfo = &swag.Spec{ Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, - LeftDelim: "{{", - RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index 1ba70cf..ec416cd 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -3,174 +3,5 @@ "info": { "contact": {} }, - "paths": { - "/oracle/circulated-icy": { - "get": { - "description": "Get Circulated ICY", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Oracle" - ], - "summary": "Get Circulated ICY", - "operationId": "getCirculatedICY", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/oracle/icy-btc-ratio": { - "get": { - "description": "Get ICY/BTC Realtime Price", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Oracle" - ], - "summary": "Get ICY/BTC Realtime Price", - "operationId": "getICYBTCRatio", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/oracle/icy-btc-ratio-cached": { - "get": { - "description": "Get ICY/BTC cached Price", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Oracle" - ], - "summary": "Get ICY/BTC cached Price", - "operationId": "getICYBTCRatioCached", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/oracle/treasury-btc": { - "get": { - "description": "Get Treasury BTC", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "Oracle" - ], - "summary": "Get Treasury BTC", - "operationId": "getTreasuryBTC", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - } - }, - "definitions": { - "ApiError": { - "description": "validation error details", - "type": "object", - "properties": { - "enums": { - "description": "available options incase of field's payload is enums", - "type": "array", - "items": { - "type": "string" - } - }, - "field": { - "description": "the field cause the error", - "type": "string" - }, - "msg": { - "description": "error message", - "type": "string" - } - } - }, - "ErrorResponse": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/ApiError" - } - } - } - }, - "github_com_dwarvesf_icy-backend_internal_model.Web3BigInt": { - "type": "object", - "properties": { - "decimal": { - "type": "integer" - }, - "value": { - "type": "string" - } - } - } - } + "paths": {} } \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 39aeda8..b64379c 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,116 +1,4 @@ -definitions: - ApiError: - description: validation error details - properties: - enums: - description: available options incase of field's payload is enums - items: - type: string - type: array - field: - description: the field cause the error - type: string - msg: - description: error message - type: string - type: object - ErrorResponse: - properties: - error: - type: string - errors: - items: - $ref: '#/definitions/ApiError' - type: array - type: object - github_com_dwarvesf_icy-backend_internal_model.Web3BigInt: - properties: - decimal: - type: integer - value: - type: string - type: object info: contact: {} -paths: - /oracle/circulated-icy: - get: - consumes: - - application/json - description: Get Circulated ICY - operationId: getCirculatedICY - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get Circulated ICY - tags: - - Oracle - /oracle/icy-btc-ratio: - get: - consumes: - - application/json - description: Get ICY/BTC Realtime Price - operationId: getICYBTCRatio - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get ICY/BTC Realtime Price - tags: - - Oracle - /oracle/icy-btc-ratio-cached: - get: - consumes: - - application/json - description: Get ICY/BTC cached Price - operationId: getICYBTCRatioCached - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get ICY/BTC cached Price - tags: - - Oracle - /oracle/treasury-btc: - get: - consumes: - - application/json - description: Get Treasury BTC - operationId: getTreasuryBTC - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/github_com_dwarvesf_icy-backend_internal_model.Web3BigInt' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get Treasury BTC - tags: - - Oracle +paths: {} swagger: "2.0"