(path: impl AsRef<Path>)
| 11 | pub use dstack_types::{AppCompose, AppKeys, KeyProviderKind, SysConfig}; |
| 12 | |
| 13 | pub fn deserialize_json_file<T: DeserializeOwned>(path: impl AsRef<Path>) -> Result<T> { |
| 14 | let data = fs::read_to_string(path).context("Failed to read file")?; |
| 15 | serde_json::from_str(&data).context("Failed to parse json") |
| 16 | } |
| 17 | |
| 18 | pub fn sha256(data: &[u8]) -> [u8; 32] { |
| 19 | use sha2::Digest; |
no outgoing calls
no test coverage detected