Separate accounting service from it's types

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
Stanislav Bogatyrev 2020-08-18 14:32:48 +03:00 committed by Alex Vanin
parent 13a80df882
commit b07c1c3173
3 changed files with 35 additions and 9 deletions

View file

@ -5,6 +5,7 @@ package neo.fs.v2.accounting;
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc;accounting"; option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc;accounting";
option csharp_namespace = "NeoFS.API.v2.Accounting"; option csharp_namespace = "NeoFS.API.v2.Accounting";
import "accounting/types.proto";
import "refs/types.proto"; import "refs/types.proto";
import "service/types.proto"; import "service/types.proto";
@ -42,15 +43,6 @@ message BalanceRequest {
neo.fs.v2.service.RequestVerificationHeader verify_header = 3; neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
} }
// Decimal represents the decimal numbers.
message Decimal {
// value carries number value.
int64 value = 1;
// precision carries value precision.
uint32 precision = 2;
}
// Message defines the response body of Balance method. // Message defines the response body of Balance method.
// //
// The amount of funds is calculated in decimal numbers. // The amount of funds is calculated in decimal numbers.

15
accounting/types.proto Normal file
View file

@ -0,0 +1,15 @@
syntax = "proto3";
package neo.fs.v2.accounting;
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc;accounting";
option csharp_namespace = "NeoFS.API.v2.Accounting";
// Decimal represents the decimal numbers.
message Decimal {
// value carries number value.
int64 value = 1;
// precision carries value precision.
uint32 precision = 2;
}

View file

@ -12,6 +12,11 @@
- [BalanceRequest.Body](#neo.fs.v2.accounting.BalanceRequest.Body) - [BalanceRequest.Body](#neo.fs.v2.accounting.BalanceRequest.Body)
- [BalanceResponse](#neo.fs.v2.accounting.BalanceResponse) - [BalanceResponse](#neo.fs.v2.accounting.BalanceResponse)
- [BalanceResponse.Body](#neo.fs.v2.accounting.BalanceResponse.Body) - [BalanceResponse.Body](#neo.fs.v2.accounting.BalanceResponse.Body)
- [accounting/types.proto](#accounting/types.proto)
- Messages
- [Decimal](#neo.fs.v2.accounting.Decimal) - [Decimal](#neo.fs.v2.accounting.Decimal)
@ -103,6 +108,20 @@ Request body
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| balance | [Decimal](#neo.fs.v2.accounting.Decimal) | | Carries the amount of funds on the account. | | balance | [Decimal](#neo.fs.v2.accounting.Decimal) | | Carries the amount of funds on the account. |
<!-- end messages -->
<!-- end enums -->
<a name="accounting/types.proto"></a>
<p align="right"><a href="#top">Top</a></p>
## accounting/types.proto
<!-- end services -->
<a name="neo.fs.v2.accounting.Decimal"></a> <a name="neo.fs.v2.accounting.Decimal"></a>