Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3501184
D6204.id21086.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6204.id21086.diff
View Options
diff --git a/services/backup/src/service/handlers/add_attachments.rs b/services/backup/src/service/handlers/add_attachments.rs
new file mode 100644
--- /dev/null
+++ b/services/backup/src/service/handlers/add_attachments.rs
@@ -0,0 +1,11 @@
+use tonic::Status;
+
+use super::proto;
+use crate::database::DatabaseClient;
+
+pub async fn handle_add_attachments(
+ db: &DatabaseClient,
+ request: proto::AddAttachmentsRequest,
+) -> Result<(), Status> {
+ unimplemented!()
+}
diff --git a/services/backup/src/service/mod.rs b/services/backup/src/service/mod.rs
--- a/services/backup/src/service/mod.rs
+++ b/services/backup/src/service/mod.rs
@@ -18,6 +18,7 @@
/// submodule containing gRPC endpoint handler implementations
mod handlers {
+ pub(super) mod add_attachments;
pub(super) mod create_backup;
// re-exports for convenient usage in handlers
@@ -139,12 +140,28 @@
Err(Status::unimplemented("unimplemented"))
}
- #[instrument(skip(self))]
+ #[instrument(skip_all,
+ fields(
+ backup_id = &request.get_ref().backup_id,
+ log_id = &request.get_ref().log_id)
+ )]
async fn add_attachments(
&self,
- _request: Request<proto::AddAttachmentsRequest>,
+ request: Request<proto::AddAttachmentsRequest>,
) -> Result<Response<()>, Status> {
- Err(Status::unimplemented("unimplemented"))
+ info!(
+ "AddAttachment request. New holders: {}",
+ &request.get_ref().holders
+ );
+
+ handlers::add_attachments::handle_add_attachments(
+ &self.db,
+ request.into_inner(),
+ )
+ .await?;
+
+ info!("Request processed successfully");
+ Ok(Response::new(()))
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 3:31 AM (18 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684965
Default Alt Text
D6204.id21086.diff (1 KB)
Attached To
Mode
D6204: [services][backup] AddAttachments 1/4 - create handler module
Attached
Detach File
Event Timeline
Log In to Comment