From b07c1c31734328a06e96c01dc644b6c01b4d272e Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Tue, 18 Aug 2020 14:32:48 +0300 Subject: [PATCH] Separate accounting service from it's types Signed-off-by: Stanislav Bogatyrev --- accounting/service.proto | 10 +--------- accounting/types.proto | 15 +++++++++++++++ proto-docs/accounting.md | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 accounting/types.proto diff --git a/accounting/service.proto b/accounting/service.proto index b4c6bd6..1af4641 100644 --- a/accounting/service.proto +++ b/accounting/service.proto @@ -5,6 +5,7 @@ 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"; +import "accounting/types.proto"; import "refs/types.proto"; import "service/types.proto"; @@ -42,15 +43,6 @@ message BalanceRequest { 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. // // The amount of funds is calculated in decimal numbers. diff --git a/accounting/types.proto b/accounting/types.proto new file mode 100644 index 0000000..6ebf289 --- /dev/null +++ b/accounting/types.proto @@ -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; +} \ No newline at end of file diff --git a/proto-docs/accounting.md b/proto-docs/accounting.md index 147046a..f29c60b 100644 --- a/proto-docs/accounting.md +++ b/proto-docs/accounting.md @@ -12,6 +12,11 @@ - [BalanceRequest.Body](#neo.fs.v2.accounting.BalanceRequest.Body) - [BalanceResponse](#neo.fs.v2.accounting.BalanceResponse) - [BalanceResponse.Body](#neo.fs.v2.accounting.BalanceResponse.Body) + + +- [accounting/types.proto](#accounting/types.proto) + + - Messages - [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. | + + + + + + + +

Top

+ +## accounting/types.proto + + + +