From f3c6edc5c6375cc9e2a87576cd18dd782ed0c038 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Thu, 9 Sep 2021 16:05:01 -0600 Subject: [PATCH] remove unneccesary file --- appmgr/src/lib.rs | 2 +- appmgr/src/registry.rs | 46 ------------------------------------------ 2 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 appmgr/src/registry.rs diff --git a/appmgr/src/lib.rs b/appmgr/src/lib.rs index a5b87f4b5..6d1022e3b 100644 --- a/appmgr/src/lib.rs +++ b/appmgr/src/lib.rs @@ -26,8 +26,8 @@ pub mod manager; pub mod middleware; pub mod migration; pub mod net; -pub mod registry; pub mod s9pk; +pub mod setup; pub mod shutdown; pub mod sound; pub mod ssh; diff --git a/appmgr/src/registry.rs b/appmgr/src/registry.rs deleted file mode 100644 index 03261c0fe..000000000 --- a/appmgr/src/registry.rs +++ /dev/null @@ -1,46 +0,0 @@ -use emver::VersionRange; -use tokio_compat_02::FutureExt; - -use crate::s9pk::manifest::Manifest; -use crate::{Error, ResultExt as _}; - -pub async fn manifest(id: &str, version: &VersionRange) -> Result { - let manifest: Manifest = reqwest::get(&format!( - "{}/manifest/{}?spec={}", - &*crate::APP_REGISTRY_URL, - id, - version - )) - .compat() - .await - .with_kind(crate::ErrorKind::Network)? - .error_for_status() - .with_kind(crate::ErrorKind::Registry)? - .json() - .await - .with_kind(crate::ErrorKind::Deserialization)?; - Ok(manifest) -} - -pub async fn version(id: &str, version: &VersionRange) -> Result { - #[derive(serde::Deserialize)] - struct VersionRes { - version: emver::Version, - } - - let version: VersionRes = reqwest::get(&format!( - "{}/version/{}?spec={}", - &*crate::APP_REGISTRY_URL, - id, - version - )) - .compat() - .await - .with_kind(crate::ErrorKind::Network)? - .error_for_status() - .with_kind(crate::ErrorKind::Registry)? - .json() - .await - .with_kind(crate::ErrorKind::Deserialization)?; - Ok(version.version) -}