[#33] Add route to get NeoFS balance

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-07-28 19:57:40 +03:00 committed by Alex Vanin
parent aaf7433c7b
commit 6e01a0ead7
9 changed files with 530 additions and 0 deletions

View file

@ -30,6 +30,40 @@ func init() {
"host": "localhost:8090",
"basePath": "/v1",
"paths": {
"/accounting/balance/{address}": {
"get": {
"security": [],
"description": "Getting balance of provided wallet address in NeoFS.",
"produces": [
"application/json"
],
"summary": "Get balance in NeoFS",
"operationId": "getBalance",
"parameters": [
{
"type": "string",
"description": "Base58 encoded wallet address.",
"name": "address",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Balance of address in NeoFS",
"schema": {
"$ref": "#/definitions/Balance"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/auth": {
"post": {
"security": [],
@ -546,6 +580,25 @@ func init() {
"value": "tag value"
}
},
"Balance": {
"type": "object",
"required": [
"address",
"value",
"precision"
],
"properties": {
"address": {
"type": "string"
},
"precision": {
"type": "integer"
},
"value": {
"type": "string"
}
}
},
"Bearer": {
"description": "Bearer token that is expected to be formed.",
"type": "object",
@ -1305,6 +1358,40 @@ func init() {
"host": "localhost:8090",
"basePath": "/v1",
"paths": {
"/accounting/balance/{address}": {
"get": {
"security": [],
"description": "Getting balance of provided wallet address in NeoFS.",
"produces": [
"application/json"
],
"summary": "Get balance in NeoFS",
"operationId": "getBalance",
"parameters": [
{
"type": "string",
"description": "Base58 encoded wallet address.",
"name": "address",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Balance of address in NeoFS",
"schema": {
"$ref": "#/definitions/Balance"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/auth": {
"post": {
"security": [],
@ -1917,6 +2004,25 @@ func init() {
"value": "tag value"
}
},
"Balance": {
"type": "object",
"required": [
"address",
"value",
"precision"
],
"properties": {
"address": {
"type": "string"
},
"precision": {
"type": "integer"
},
"value": {
"type": "string"
}
}
},
"Bearer": {
"description": "Bearer token that is expected to be formed.",
"type": "object",