From 89016d99a20269c1a576bd4c7673f83af55e8218 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 17 Nov 2020 15:46:20 -0800 Subject: codegen rust crate for v0.3.3 --- rust/fatcat-openapi/examples/server_lib/server.rs | 208 +++++++++++----------- 1 file changed, 100 insertions(+), 108 deletions(-) (limited to 'rust/fatcat-openapi/examples/server_lib/server.rs') diff --git a/rust/fatcat-openapi/examples/server_lib/server.rs b/rust/fatcat-openapi/examples/server_lib/server.rs index 838bd63d..6b681c7e 100644 --- a/rust/fatcat-openapi/examples/server_lib/server.rs +++ b/rust/fatcat-openapi/examples/server_lib/server.rs @@ -31,19 +31,19 @@ use fatcat_openapi::{ pub struct Server; impl Api for Server { - fn auth_check(&self, role: Option, context: &Context) -> Box + Send> { + fn auth_check(&self, role: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!("auth_check({:?}) - X-Span-ID: {:?}", role, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn auth_oidc(&self, oidc_params: models::AuthOidc, context: &Context) -> Box + Send> { + fn auth_oidc(&self, oidc_params: models::AuthOidc, context: &Context) -> Box + Send> { let context = context.clone(); println!("auth_oidc({:?}) - X-Span-ID: {:?}", oidc_params, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn create_auth_token(&self, editor_id: String, duration_seconds: Option, context: &Context) -> Box + Send> { + fn create_auth_token(&self, editor_id: String, duration_seconds: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_auth_token(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -54,19 +54,19 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_changelog(&self, limit: Option, context: &Context) -> Box + Send> { + fn get_changelog(&self, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_changelog({:?}) - X-Span-ID: {:?}", limit, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_changelog_entry(&self, index: i64, context: &Context) -> Box + Send> { + fn get_changelog_entry(&self, index: i64, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_changelog_entry({}) - X-Span-ID: {:?}", index, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn create_container(&self, editgroup_id: String, entity: models::ContainerEntity, context: &Context) -> Box + Send> { + fn create_container(&self, editgroup_id: String, entity: models::ContainerEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_container(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -77,7 +77,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_container_auto_batch(&self, auto_batch: models::ContainerAutoBatch, context: &Context) -> Box + Send> { + fn create_container_auto_batch(&self, auto_batch: models::ContainerAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_container_auto_batch({:?}) - X-Span-ID: {:?}", @@ -87,7 +87,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_container(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_container(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_container(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -98,7 +98,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_container_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_container_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_container_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -109,7 +109,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_container(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_container(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_container(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -121,13 +121,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_container_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_container_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_container_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_container_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_container_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_container_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -138,13 +138,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_container_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_container_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_container_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_container_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_container_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_container_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -163,7 +163,7 @@ impl Api for Server { expand: Option, hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "lookup_container({:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -176,7 +176,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_container(&self, editgroup_id: String, ident: String, entity: models::ContainerEntity, context: &Context) -> Box + Send> { + fn update_container(&self, editgroup_id: String, ident: String, entity: models::ContainerEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_container(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -188,7 +188,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_creator(&self, editgroup_id: String, entity: models::CreatorEntity, context: &Context) -> Box + Send> { + fn create_creator(&self, editgroup_id: String, entity: models::CreatorEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_creator(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -199,7 +199,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_creator_auto_batch(&self, auto_batch: models::CreatorAutoBatch, context: &Context) -> Box + Send> { + fn create_creator_auto_batch(&self, auto_batch: models::CreatorAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_creator_auto_batch({:?}) - X-Span-ID: {:?}", @@ -209,7 +209,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_creator(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_creator(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_creator(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -220,7 +220,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_creator_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_creator_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_creator_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -231,7 +231,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_creator(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_creator(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_creator(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -243,13 +243,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_creator_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_creator_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_creator_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_creator_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_creator_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_creator_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -260,13 +260,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_creator_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_creator_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_creator_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_creator_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_creator_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_creator_releases(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -277,7 +277,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_creator_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_creator_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_creator_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -296,7 +296,7 @@ impl Api for Server { expand: Option, hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "lookup_creator({:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -309,7 +309,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_creator(&self, editgroup_id: String, ident: String, entity: models::CreatorEntity, context: &Context) -> Box + Send> { + fn update_creator(&self, editgroup_id: String, ident: String, entity: models::CreatorEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_creator(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -321,13 +321,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn accept_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send> { + fn accept_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("accept_editgroup(\"{}\") - X-Span-ID: {:?}", editgroup_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn create_editgroup(&self, editgroup: models::Editgroup, context: &Context) -> Box + Send> { + fn create_editgroup(&self, editgroup: models::Editgroup, context: &Context) -> Box + Send> { let context = context.clone(); println!("create_editgroup({:?}) - X-Span-ID: {:?}", editgroup, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) @@ -338,7 +338,7 @@ impl Api for Server { editgroup_id: String, annotation: models::EditgroupAnnotation, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "create_editgroup_annotation(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -349,13 +349,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send> { + fn get_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_editgroup(\"{}\") - X-Span-ID: {:?}", editgroup_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_editgroup_annotations(&self, editgroup_id: String, expand: Option, context: &Context) -> Box + Send> { + fn get_editgroup_annotations(&self, editgroup_id: String, expand: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_editgroup_annotations(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -373,7 +373,7 @@ impl Api for Server { before: Option>, since: Option>, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "get_editgroups_reviewable({:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -386,13 +386,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_editgroup( - &self, - editgroup_id: String, - editgroup: models::Editgroup, - submit: Option, - context: &Context, - ) -> Box + Send> { + fn update_editgroup(&self, editgroup_id: String, editgroup: models::Editgroup, submit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_editgroup(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -404,7 +398,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_editor(&self, editor_id: String, context: &Context) -> Box + Send> { + fn get_editor(&self, editor_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_editor(\"{}\") - X-Span-ID: {:?}", editor_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) @@ -417,7 +411,7 @@ impl Api for Server { before: Option>, since: Option>, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "get_editor_annotations(\"{}\", {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -437,7 +431,7 @@ impl Api for Server { before: Option>, since: Option>, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "get_editor_editgroups(\"{}\", {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -450,7 +444,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_editor(&self, editor_id: String, editor: models::Editor, context: &Context) -> Box + Send> { + fn update_editor(&self, editor_id: String, editor: models::Editor, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_editor(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -461,7 +455,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_file(&self, editgroup_id: String, entity: models::FileEntity, context: &Context) -> Box + Send> { + fn create_file(&self, editgroup_id: String, entity: models::FileEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_file(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -472,7 +466,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_file_auto_batch(&self, auto_batch: models::FileAutoBatch, context: &Context) -> Box + Send> { + fn create_file_auto_batch(&self, auto_batch: models::FileAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_file_auto_batch({:?}) - X-Span-ID: {:?}", @@ -482,7 +476,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_file(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_file(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_file(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -493,7 +487,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_file_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_file_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_file_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -504,7 +498,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_file(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_file(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_file(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -516,13 +510,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_file_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_file_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_file_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_file_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_file_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_file_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -533,13 +527,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_file_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_file_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_file_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_file_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_file_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_file_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -559,7 +553,7 @@ impl Api for Server { expand: Option, hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "lookup_file({:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -573,7 +567,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_file(&self, editgroup_id: String, ident: String, entity: models::FileEntity, context: &Context) -> Box + Send> { + fn update_file(&self, editgroup_id: String, ident: String, entity: models::FileEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_file(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -585,7 +579,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_fileset(&self, editgroup_id: String, entity: models::FilesetEntity, context: &Context) -> Box + Send> { + fn create_fileset(&self, editgroup_id: String, entity: models::FilesetEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_fileset(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -596,7 +590,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_fileset_auto_batch(&self, auto_batch: models::FilesetAutoBatch, context: &Context) -> Box + Send> { + fn create_fileset_auto_batch(&self, auto_batch: models::FilesetAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_fileset_auto_batch({:?}) - X-Span-ID: {:?}", @@ -606,7 +600,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_fileset(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_fileset(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_fileset(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -617,7 +611,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_fileset_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_fileset_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_fileset_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -628,7 +622,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_fileset(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_fileset(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_fileset(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -640,13 +634,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_fileset_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_fileset_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_fileset_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_fileset_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_fileset_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_fileset_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -657,13 +651,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_fileset_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_fileset_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_fileset_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_fileset_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_fileset_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_fileset_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -675,7 +669,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_fileset(&self, editgroup_id: String, ident: String, entity: models::FilesetEntity, context: &Context) -> Box + Send> { + fn update_fileset(&self, editgroup_id: String, ident: String, entity: models::FilesetEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_fileset(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -687,7 +681,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_release(&self, editgroup_id: String, entity: models::ReleaseEntity, context: &Context) -> Box + Send> { + fn create_release(&self, editgroup_id: String, entity: models::ReleaseEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_release(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -698,7 +692,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_release_auto_batch(&self, auto_batch: models::ReleaseAutoBatch, context: &Context) -> Box + Send> { + fn create_release_auto_batch(&self, auto_batch: models::ReleaseAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_release_auto_batch({:?}) - X-Span-ID: {:?}", @@ -708,7 +702,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_release(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_release(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_release(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -719,7 +713,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_release_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_release_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_release_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -730,7 +724,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_release(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -742,13 +736,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_release_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_release_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_release_files(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_release_files(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_files(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -759,7 +753,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_filesets(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_release_filesets(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_filesets(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -770,7 +764,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_release_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -781,13 +775,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_release_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_release_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_release_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_release_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -799,7 +793,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_webcaptures(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_release_webcaptures(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_webcaptures(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -822,13 +816,15 @@ impl Api for Server { jstor: Option, ark: Option, mag: Option, + doaj: Option, + dblp: Option, expand: Option, hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( - "lookup_release({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", + "lookup_release({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", doi, wikidata_qid, isbn13, @@ -839,6 +835,8 @@ impl Api for Server { jstor, ark, mag, + doaj, + dblp, expand, hide, context.x_span_id.unwrap_or(String::from("")).clone() @@ -846,7 +844,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_release(&self, editgroup_id: String, ident: String, entity: models::ReleaseEntity, context: &Context) -> Box + Send> { + fn update_release(&self, editgroup_id: String, ident: String, entity: models::ReleaseEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_release(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -858,7 +856,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_webcapture(&self, editgroup_id: String, entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { + fn create_webcapture(&self, editgroup_id: String, entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_webcapture(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -869,7 +867,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_webcapture_auto_batch(&self, auto_batch: models::WebcaptureAutoBatch, context: &Context) -> Box + Send> { + fn create_webcapture_auto_batch(&self, auto_batch: models::WebcaptureAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_webcapture_auto_batch({:?}) - X-Span-ID: {:?}", @@ -879,7 +877,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_webcapture(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_webcapture(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_webcapture(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -890,7 +888,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_webcapture_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_webcapture_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_webcapture_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -901,7 +899,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_webcapture(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_webcapture(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -913,13 +911,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_webcapture_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_webcapture_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_webcapture_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_webcapture_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -930,19 +928,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_webcapture_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_webcapture_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture_revision( - &self, - rev_id: String, - expand: Option, - hide: Option, - context: &Context, - ) -> Box + Send> { + fn get_webcapture_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_webcapture_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -954,7 +946,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_webcapture(&self, editgroup_id: String, ident: String, entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { + fn update_webcapture(&self, editgroup_id: String, ident: String, entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_webcapture(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -966,7 +958,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_work(&self, editgroup_id: String, entity: models::WorkEntity, context: &Context) -> Box + Send> { + fn create_work(&self, editgroup_id: String, entity: models::WorkEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_work(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -977,7 +969,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_work_auto_batch(&self, auto_batch: models::WorkAutoBatch, context: &Context) -> Box + Send> { + fn create_work_auto_batch(&self, auto_batch: models::WorkAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_work_auto_batch({:?}) - X-Span-ID: {:?}", @@ -987,7 +979,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_work(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_work(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_work(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -998,7 +990,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_work_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_work_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_work_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -1009,7 +1001,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_work(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_work(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_work(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -1021,13 +1013,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_work_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_work_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_work_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_work_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_work_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_work_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -1038,13 +1030,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_work_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_work_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_work_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_work_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_work_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_work_releases(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -1055,7 +1047,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_work_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_work_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_work_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -1067,7 +1059,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_work(&self, editgroup_id: String, ident: String, entity: models::WorkEntity, context: &Context) -> Box + Send> { + fn update_work(&self, editgroup_id: String, ident: String, entity: models::WorkEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_work(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", -- cgit v1.2.3