Returns the string contents of the specified secret. Returns an error if the secret's contents cannot be decoded as UTF-8.
(&self, id: CatalogItemId)
| 58 | /// |
| 59 | /// Returns an error if the secret's contents cannot be decoded as UTF-8. |
| 60 | async fn read_string(&self, id: CatalogItemId) -> Result<String, anyhow::Error> { |
| 61 | let contents = self.read(id).await?; |
| 62 | String::from_utf8(contents).context("converting secret value to string") |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | #[derive(Debug)] |
no test coverage detected