node: Implement auto-fetching of projects

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2022-09-13 10:16:05 +02:00
parent a5a7af57b5
commit 92f17d71c3
6 changed files with 148 additions and 64 deletions
+5
View File
@@ -116,6 +116,7 @@ impl Remote<Unverified> {
}
pub trait ReadStorage {
fn url(&self) -> Url;
fn get(&self, proj: &ProjId) -> Result<Option<Remotes<Unverified>>, Error>;
fn inventory(&self) -> Result<Inventory, Error>;
}
@@ -140,6 +141,10 @@ where
T: Deref<Target = S>,
S: ReadStorage,
{
fn url(&self) -> Url {
self.deref().url()
}
fn inventory(&self) -> Result<Inventory, Error> {
self.deref().inventory()
}