(
&self,
key: &str,
file_path: Option<&str>,
)
| 130 | } |
| 131 | |
| 132 | pub async fn fetch_compressed_data_by_key( |
| 133 | &self, |
| 134 | key: &str, |
| 135 | file_path: Option<&str>, |
| 136 | ) -> Result<(Option<Vec<u8>>, usize), String> { |
| 137 | match self.get_driver() { |
| 138 | Ok(driver) => { |
| 139 | let json = driver.fetch_compressed_object(key, file_path).await; |
| 140 | if let Ok((data, size)) = json { |
| 141 | // println!("Fetched data file: {}", key); |
| 142 | return Ok((Some(data), size)); |
| 143 | } |
| 144 | |
| 145 | println!("No data file {} found", key); |
| 146 | Ok((None, 0)) |
| 147 | } |
| 148 | Err(err) => Err(err.to_string()), |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | pub async fn write_compressed_data( |
| 153 | &self, |
no test coverage detected