[#33] accounting: Tidy up the format
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
e6fce062df
commit
d308f91872
2 changed files with 39 additions and 17 deletions
|
@ -1,5 +1,7 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package accounting;
|
package accounting;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/accounting";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/accounting";
|
||||||
option csharp_namespace = "NeoFS.API.Accounting";
|
option csharp_namespace = "NeoFS.API.Accounting";
|
||||||
|
|
||||||
|
@ -7,20 +9,30 @@ import "service/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
|
|
||||||
// Accounting is a service that provides access for accounting balance
|
// The service provides methods for obtaining information
|
||||||
// information
|
// about the account balance in NeoFS system.
|
||||||
service Accounting {
|
service Accounting {
|
||||||
// Balance returns current balance status of the NeoFS user
|
// Returns the amount of funds for the requested NeoFS account.
|
||||||
rpc Balance(BalanceRequest) returns (BalanceResponse);
|
rpc Balance (BalanceRequest) returns (BalanceResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Message defines the request body of Balance method.
|
||||||
|
//
|
||||||
|
// To indicate the account for which the balance is requested, its identifier is used.
|
||||||
|
//
|
||||||
|
// To gain access to the requested information, the request body must be formed according
|
||||||
|
// to the requirements from the system specification.
|
||||||
message BalanceRequest {
|
message BalanceRequest {
|
||||||
// OwnerID carries user identifier in NeoFS system.
|
// Carries user identifier in NeoFS system for which the balance is requested.
|
||||||
refs.OwnerID OwnerID = 1;
|
refs.OwnerID OwnerID = 1;
|
||||||
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
|
||||||
service.RequestMetaHeader Meta = 98;
|
// Carries request meta information. Header data is used only to regulate message
|
||||||
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
// transport and does not affect request execution.
|
||||||
service.RequestVerificationHeader Verify = 99;
|
service.RequestMetaHeader MetaHeader = 98;
|
||||||
|
|
||||||
|
// Carries request verification information. This header is used to authenticate
|
||||||
|
// the nodes of the message route and check the correctness of transmission.
|
||||||
|
service.RequestVerificationHeader VerifyHeader = 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decimal represents the decimal numbers.
|
// Decimal represents the decimal numbers.
|
||||||
|
@ -32,7 +44,10 @@ message Decimal {
|
||||||
uint32 Precision = 2;
|
uint32 Precision = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Message defines the response body of Balance method.
|
||||||
|
//
|
||||||
|
// The amount of funds is calculated in decimal numbers.
|
||||||
message BalanceResponse {
|
message BalanceResponse {
|
||||||
// Balance contains current account balance state
|
// Carries the amount of funds on the account.
|
||||||
Decimal Balance = 1;
|
Decimal Balance = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
<a name="accounting.Accounting"></a>
|
<a name="accounting.Accounting"></a>
|
||||||
|
|
||||||
### Service "accounting.Accounting"
|
### Service "accounting.Accounting"
|
||||||
Accounting is a service that provides access for accounting balance
|
The service provides methods for obtaining information
|
||||||
information
|
about the account balance in NeoFS system.
|
||||||
|
|
||||||
```
|
```
|
||||||
rpc Balance(BalanceRequest) returns (BalanceResponse);
|
rpc Balance(BalanceRequest) returns (BalanceResponse);
|
||||||
|
@ -38,7 +38,7 @@ rpc Balance(BalanceRequest) returns (BalanceResponse);
|
||||||
|
|
||||||
#### Method Balance
|
#### Method Balance
|
||||||
|
|
||||||
Balance returns current balance status of the NeoFS user
|
Returns the amount of funds for the requested NeoFS account.
|
||||||
|
|
||||||
| Name | Input | Output |
|
| Name | Input | Output |
|
||||||
| ---- | ----- | ------ |
|
| ---- | ----- | ------ |
|
||||||
|
@ -49,25 +49,32 @@ Balance returns current balance status of the NeoFS user
|
||||||
<a name="accounting.BalanceRequest"></a>
|
<a name="accounting.BalanceRequest"></a>
|
||||||
|
|
||||||
### Message BalanceRequest
|
### Message BalanceRequest
|
||||||
|
Message defines the request body of Balance method.
|
||||||
|
|
||||||
|
To indicate the account for which the balance is requested, its identifier is used.
|
||||||
|
|
||||||
|
To gain access to the requested information, the request body must be formed according
|
||||||
|
to the requirements from the system specification.
|
||||||
|
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| OwnerID | [refs.OwnerID](#refs.OwnerID) | | OwnerID carries user identifier in NeoFS system. |
|
| OwnerID | [refs.OwnerID](#refs.OwnerID) | | Carries user identifier in NeoFS system for which the balance is requested. |
|
||||||
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
| MetaHeader | [service.RequestMetaHeader](#service.RequestMetaHeader) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
|
||||||
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
| VerifyHeader | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
|
||||||
|
|
||||||
|
|
||||||
<a name="accounting.BalanceResponse"></a>
|
<a name="accounting.BalanceResponse"></a>
|
||||||
|
|
||||||
### Message BalanceResponse
|
### Message BalanceResponse
|
||||||
|
Message defines the response body of Balance method.
|
||||||
|
|
||||||
|
The amount of funds is calculated in decimal numbers.
|
||||||
|
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Balance | [Decimal](#accounting.Decimal) | | Balance contains current account balance state |
|
| Balance | [Decimal](#accounting.Decimal) | | Carries the amount of funds on the account. |
|
||||||
|
|
||||||
|
|
||||||
<a name="accounting.Decimal"></a>
|
<a name="accounting.Decimal"></a>
|
||||||
|
|
Loading…
Reference in a new issue