Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3497619
D4164.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
909 B
Referenced Files
None
Subscribers
None
D4164.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4164: [services] Tests - Add backup utils
Attached
Detach File
Event Timeline
Log In to Comment