From d22c2557cb471a114d014a62941a1611a96043a0 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Tue, 11 Aug 2020 11:12:37 +0300 Subject: [PATCH] [#37] Add body message to balance requests Signed-off-by: Alex Vanin --- accounting/service.proto | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/accounting/service.proto b/accounting/service.proto index 7062b53..b276fdc 100644 --- a/accounting/service.proto +++ b/accounting/service.proto @@ -6,6 +6,8 @@ option go_package = "github.com/nspcc-dev/neofs-api-go/accounting"; option csharp_namespace = "NeoFS.API.Accounting"; import "refs/types.proto"; +import "service/meta.proto"; +import "service/verify.proto"; // The service provides methods for obtaining information // about the account balance in NeoFS system. @@ -22,8 +24,23 @@ service Accounting { // To gain access to the requested information, the request body must be formed // according to the requirements from the system specification. message BalanceRequest { - // Carries user identifier in NeoFS system for which the balance is requested. - refs.OwnerID owner_id = 1; + message Body { + // Carries user identifier in NeoFS system for which the balance + // is requested. + refs.OwnerID owner_id = 1; + } + + // Body of the balance request message. + Body body = 1; + + // Carries request meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.RequestMetaHeader meta_header = 2; + + // Carries request verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.RequestVerificationHeader verify_header = 3; } // Decimal represents the decimal numbers. @@ -39,6 +56,20 @@ message Decimal { // // The amount of funds is calculated in decimal numbers. message BalanceResponse { - // Carries the amount of funds on the account. - Decimal balance = 1; + message Body { + // Carries the amount of funds on the account. + Decimal balance = 1; + } + + // Body of the balance response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request execution. + service.ResponseMetaHeader meta_header = 2; + + // Carries response verification information. This header is used to + // authenticate the nodes of the message route and check the correctness + // of transmission. + service.ResponseVerificationHeader verify_header = 3; }