1pub mod build;
2pub mod consts;
3pub mod embed;
4pub mod error;
5pub mod graceful;
6pub mod helper;
7pub mod manage;
8pub mod proxy;
9pub mod router;
10pub mod schedule;
11pub mod swagger;
12
13#[macro_export]
28macro_rules! extract_all_files {
29 ($asset:ty) => {
30 for file in <$asset>::iter() {
31 tracing::debug!("extract {}", file.as_ref());
32 let filepath = file.as_ref();
33 if let Some(parent) = std::path::Path::new(filepath).parent() {
34 if !parent.exists() {
35 tokio::fs::create_dir_all(parent).await?;
36 }
37 }
38 let file = <$asset>::get(filepath).unwrap().data;
39 tokio::fs::write(filepath, file).await?;
40 #[cfg(unix)]
41 $crate::helper::add_execute_permission(filepath).await?;
42 }
43 };
44}