From cfa4e1ea20b87504c92e1d3ba1973f0e89d98daf Mon Sep 17 00:00:00 2001 From: Anatolii Kurotych Date: Tue, 22 Oct 2024 15:54:49 +0300 Subject: [PATCH 1/4] Add info_stream_filtered --- src/service/mobile_config.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/service/mobile_config.proto b/src/service/mobile_config.proto index d4e9653f..a15e2096 100644 --- a/src/service/mobile_config.proto +++ b/src/service/mobile_config.proto @@ -79,6 +79,16 @@ message gateway_info_stream_res_v1 { bytes signature = 4; } +message gateway_info_stream_filtered_req_v1 { + // max number of gateway info records in each message of the response stream + uint32 batch_size = 1; + // Device types that will be returned in the response + repeated device_type devicy_types = 2; + // pubkey binary of the signing keypair + bytes signer = 3; + bytes signature = 4; +} + message entity_verify_req_v1 { // binary identifier of the entity bytes entity_id = 1; @@ -257,6 +267,10 @@ service gateway { // Get a stream of gateway info rpc info_stream(gateway_info_stream_req_v1) returns (stream gateway_info_stream_res_v1); + // Get a stream of getaeway info filtered by device type(s) + rpc info_stream_filtered(gateway_info_stream_filtered_req_v1) + returns (stream gateway_info_stream_res_v1); + } service entity { From 8e29a8d894e375b0a3b5615f02a27c430916fd72 Mon Sep 17 00:00:00 2001 From: Anatolii Kurotych Date: Tue, 22 Oct 2024 16:01:39 +0300 Subject: [PATCH 2/4] format --- src/service/mobile_config.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/service/mobile_config.proto b/src/service/mobile_config.proto index a15e2096..89e162b5 100644 --- a/src/service/mobile_config.proto +++ b/src/service/mobile_config.proto @@ -82,7 +82,7 @@ message gateway_info_stream_res_v1 { message gateway_info_stream_filtered_req_v1 { // max number of gateway info records in each message of the response stream uint32 batch_size = 1; - // Device types that will be returned in the response + // Device types that will be returned in the response repeated device_type devicy_types = 2; // pubkey binary of the signing keypair bytes signer = 3; @@ -270,7 +270,6 @@ service gateway { // Get a stream of getaeway info filtered by device type(s) rpc info_stream_filtered(gateway_info_stream_filtered_req_v1) returns (stream gateway_info_stream_res_v1); - } service entity { From 56207ca2bd76b7590c457b2582090e8783d0586e Mon Sep 17 00:00:00 2001 From: Anatolii Kurotych Date: Tue, 22 Oct 2024 16:21:00 +0300 Subject: [PATCH 3/4] Fix typo --- src/service/mobile_config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/mobile_config.proto b/src/service/mobile_config.proto index 89e162b5..f39cd1fa 100644 --- a/src/service/mobile_config.proto +++ b/src/service/mobile_config.proto @@ -83,7 +83,7 @@ message gateway_info_stream_filtered_req_v1 { // max number of gateway info records in each message of the response stream uint32 batch_size = 1; // Device types that will be returned in the response - repeated device_type devicy_types = 2; + repeated device_type device_types = 2; // pubkey binary of the signing keypair bytes signer = 3; bytes signature = 4; From 1c8796510bbf7513bd35b745fc58aca4a5ca08eb Mon Sep 17 00:00:00 2001 From: Anatolii Kurotych Date: Tue, 22 Oct 2024 17:16:46 +0300 Subject: [PATCH 4/4] Add optional parameter device_types to gateway_info_stream_req_v1 --- src/service/mobile_config.proto | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/service/mobile_config.proto b/src/service/mobile_config.proto index f39cd1fa..24ed41eb 100644 --- a/src/service/mobile_config.proto +++ b/src/service/mobile_config.proto @@ -67,6 +67,9 @@ message gateway_info_stream_req_v1 { // pubkey binary of the signing keypair bytes signer = 2; bytes signature = 3; + // Device types that will be returned in the response + // Returns all devices if empty + repeated device_type device_types = 4; } message gateway_info_stream_res_v1 { @@ -79,16 +82,6 @@ message gateway_info_stream_res_v1 { bytes signature = 4; } -message gateway_info_stream_filtered_req_v1 { - // max number of gateway info records in each message of the response stream - uint32 batch_size = 1; - // Device types that will be returned in the response - repeated device_type device_types = 2; - // pubkey binary of the signing keypair - bytes signer = 3; - bytes signature = 4; -} - message entity_verify_req_v1 { // binary identifier of the entity bytes entity_id = 1; @@ -267,9 +260,6 @@ service gateway { // Get a stream of gateway info rpc info_stream(gateway_info_stream_req_v1) returns (stream gateway_info_stream_res_v1); - // Get a stream of getaeway info filtered by device type(s) - rpc info_stream_filtered(gateway_info_stream_filtered_req_v1) - returns (stream gateway_info_stream_res_v1); } service entity {