From 8528f06157b0e60842c860f81e3f2a69aa07aae9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 24 Aug 2018 12:59:28 -0700 Subject: WIP: autoaccept --- rust/fatcat-api/examples/server_lib/server.rs | 48 ++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 9 deletions(-) (limited to 'rust/fatcat-api/examples/server_lib/server.rs') diff --git a/rust/fatcat-api/examples/server_lib/server.rs b/rust/fatcat-api/examples/server_lib/server.rs index 32c7e97f..60e19847 100644 --- a/rust/fatcat-api/examples/server_lib/server.rs +++ b/rust/fatcat-api/examples/server_lib/server.rs @@ -38,13 +38,15 @@ impl Api for Server { &self, entity_list: &Vec, autoaccept: Option, + editgroup: Option, context: &Context, ) -> Box + Send> { let context = context.clone(); println!( - "create_container_batch({:?}, {:?}) - X-Span-ID: {:?}", + "create_container_batch({:?}, {:?}, {:?}) - X-Span-ID: {:?}", entity_list, autoaccept, + editgroup, context.x_span_id.unwrap_or(String::from("")).clone() ); Box::new(futures::failed("Generic failure".into())) @@ -56,12 +58,19 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_creator_batch(&self, entity_list: &Vec, autoaccept: Option, context: &Context) -> Box + Send> { + fn create_creator_batch( + &self, + entity_list: &Vec, + autoaccept: Option, + editgroup: Option, + context: &Context, + ) -> Box + Send> { let context = context.clone(); println!( - "create_creator_batch({:?}, {:?}) - X-Span-ID: {:?}", + "create_creator_batch({:?}, {:?}, {:?}) - X-Span-ID: {:?}", entity_list, autoaccept, + editgroup, context.x_span_id.unwrap_or(String::from("")).clone() ); Box::new(futures::failed("Generic failure".into())) @@ -79,12 +88,19 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_file_batch(&self, entity_list: &Vec, autoaccept: Option, context: &Context) -> Box + Send> { + fn create_file_batch( + &self, + entity_list: &Vec, + autoaccept: Option, + editgroup: Option, + context: &Context, + ) -> Box + Send> { let context = context.clone(); println!( - "create_file_batch({:?}, {:?}) - X-Span-ID: {:?}", + "create_file_batch({:?}, {:?}, {:?}) - X-Span-ID: {:?}", entity_list, autoaccept, + editgroup, context.x_span_id.unwrap_or(String::from("")).clone() ); Box::new(futures::failed("Generic failure".into())) @@ -96,12 +112,19 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_release_batch(&self, entity_list: &Vec, autoaccept: Option, context: &Context) -> Box + Send> { + fn create_release_batch( + &self, + entity_list: &Vec, + autoaccept: Option, + editgroup: Option, + context: &Context, + ) -> Box + Send> { let context = context.clone(); println!( - "create_release_batch({:?}, {:?}) - X-Span-ID: {:?}", + "create_release_batch({:?}, {:?}, {:?}) - X-Span-ID: {:?}", entity_list, autoaccept, + editgroup, context.x_span_id.unwrap_or(String::from("")).clone() ); Box::new(futures::failed("Generic failure".into())) @@ -113,12 +136,19 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_work_batch(&self, entity_list: &Vec, autoaccept: Option, context: &Context) -> Box + Send> { + fn create_work_batch( + &self, + entity_list: &Vec, + autoaccept: Option, + editgroup: Option, + context: &Context, + ) -> Box + Send> { let context = context.clone(); println!( - "create_work_batch({:?}, {:?}) - X-Span-ID: {:?}", + "create_work_batch({:?}, {:?}, {:?}) - X-Span-ID: {:?}", entity_list, autoaccept, + editgroup, context.x_span_id.unwrap_or(String::from("")).clone() ); Box::new(futures::failed("Generic failure".into())) -- cgit v1.2.3