diff --git a/accounting/service.proto b/accounting/service.proto index 2f8e1c8..6f45b30 100644 --- a/accounting/service.proto +++ b/accounting/service.proto @@ -5,7 +5,6 @@ option csharp_namespace = "NeoFS.API.Accounting"; import "service/meta.proto"; import "service/verify.proto"; -import "decimal/decimal.proto"; import "refs/types.proto"; // Accounting is a service that provides access for accounting balance @@ -24,7 +23,16 @@ message BalanceRequest { service.RequestVerificationHeader Verify = 99; } +// Decimal represents the decimal numbers. +message Decimal { + // Value carries number value. + int64 Value = 1; + + // Precision carries value precision. + uint32 Precision = 2; +} + message BalanceResponse { // Balance contains current account balance state - decimal.Decimal Balance = 1; + Decimal Balance = 1; } diff --git a/decimal/decimal.proto b/decimal/decimal.proto deleted file mode 100644 index 6282c12..0000000 --- a/decimal/decimal.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; -package decimal; -option go_package = "github.com/nspcc-dev/neofs-api-go/decimal"; -option csharp_namespace = "NeoFS.API.Decimal"; - -// Decimal represents the decimal numbers. -message Decimal { - // Value carries number value. - int64 Value = 1; - - // Precision carries value precision. - uint32 Precision = 2; -} diff --git a/proto-docs/accounting.md b/proto-docs/accounting.md index 7b31f60..64eea91 100644 --- a/proto-docs/accounting.md +++ b/proto-docs/accounting.md @@ -10,6 +10,7 @@ - Messages - [BalanceRequest](#accounting.BalanceRequest) - [BalanceResponse](#accounting.BalanceResponse) + - [Decimal](#accounting.Decimal) - [Scalar Value Types](#scalar-value-types) @@ -66,7 +67,19 @@ Balance returns current balance status of the NeoFS user | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| Balance | [decimal.Decimal](#decimal.Decimal) | | Balance contains current account balance state | +| Balance | [Decimal](#accounting.Decimal) | | Balance contains current account balance state | + + + + +### Message Decimal +Decimal represents the decimal numbers. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| Value | [int64](#int64) | | Value carries number value. | +| Precision | [uint32](#uint32) | | Precision carries value precision. | diff --git a/proto-docs/decimal.md b/proto-docs/decimal.md deleted file mode 100644 index 62acb86..0000000 --- a/proto-docs/decimal.md +++ /dev/null @@ -1,61 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [decimal/decimal.proto](#decimal/decimal.proto) - - - Messages - - [Decimal](#decimal.Decimal) - - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## decimal/decimal.proto - - - - - - - -### Message Decimal -Decimal is a structure used for representation of assets amount - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| Value | [int64](#int64) | | Value is value number | -| Precision | [uint32](#uint32) | | Precision is precision number | - - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| double | | double | double | float | -| float | | float | float | float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| bool | | bool | boolean | boolean | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | -