Page MenuHomePhabricator

D4164.diff
No OneTemporary

D4164.diff

diff --git a/services/commtest/tests/backup/backup_utils.rs b/services/commtest/tests/backup/backup_utils.rs
new file mode 100644
--- /dev/null
+++ b/services/commtest/tests/backup/backup_utils.rs
@@ -0,0 +1,36 @@
+pub mod proto {
+ tonic::include_proto!("backup");
+}
+
+pub use proto::backup_service_client::BackupServiceClient;
+
+// stands for both, backup and log items
+#[allow(dead_code)]
+pub struct Item {
+ pub id: String,
+ pub chunks_sizes: Vec<usize>,
+ pub attachments_holders: Vec<String>,
+}
+
+#[allow(dead_code)]
+impl Item {
+ pub fn new(
+ id: String,
+ chunks_sizes: Vec<usize>,
+ attachments_holders: Vec<String>,
+ ) -> Item {
+ Item {
+ id,
+ chunks_sizes,
+ attachments_holders,
+ }
+ }
+}
+
+#[allow(dead_code)]
+pub struct BackupData {
+ pub user_id: String,
+ pub device_id: String,
+ pub backup_item: Item,
+ pub log_items: Vec<Item>,
+}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 7:28 PM (18 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2679129
Default Alt Text
D4164.diff (909 B)

Event Timeline