From d0f6d1e4357d1e1a44b9ecf18408aa2b5d9716bb Mon Sep 17 00:00:00 2001 From: Pavel Popov Date: Wed, 9 Aug 2017 15:07:22 +0300 Subject: [PATCH] BJ-204: Reporting imrovements (#189) * BJ-204: signatures without maps * BJ-204: Change arguments in getReport method * BJ-204: now signature is required --- proto/reporting.thrift | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/proto/reporting.thrift b/proto/reporting.thrift index 968ac8c..2f03e7f 100644 --- a/proto/reporting.thrift +++ b/proto/reporting.thrift @@ -76,7 +76,15 @@ struct Report { struct FileMeta { 1: required FileID file_id 2: required string filename - 3: optional map signatures + 3: required Signature signature +} + +/** +* Cигнатуры файла +*/ +struct Signature { + 1: required string md5 + 2: required string sha256 } /** @@ -112,11 +120,11 @@ service Reporting { ReportID GenerateReport(1: ReportRequest request, 2: ReportType report_type) throws (1: PartyNotFound ex1, 2: ShopNotFound ex2, 3: InvalidRequest ex3) /** - * Запрос на получение отчета по его идентификатору + * Запрос на получение отчета * * ReportNotFound, если отчет не найден */ - Report GetReport(1: ReportID report_id) throws (1: ReportNotFound ex1) + Report GetReport(1: PartyID party_id, 2: ShopID shop_id, 3: ReportID report_id) throws (1: ReportNotFound ex1) /** * Сгенерировать ссылку на файл