mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-28 21:50:26 +08:00
node: Implement Client
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::rc::Rc;
|
||||
use std::{fmt, fs, io};
|
||||
|
||||
use git_ref_format::refspec;
|
||||
@@ -25,7 +26,7 @@ pub static NAMESPACES_GLOB: Lazy<refspec::PatternString> =
|
||||
|
||||
pub struct Storage {
|
||||
path: PathBuf,
|
||||
signer: Box<dyn Signer>,
|
||||
signer: Rc<dyn Signer>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for Storage {
|
||||
@@ -76,7 +77,7 @@ impl Storage {
|
||||
|
||||
Ok(Self {
|
||||
path,
|
||||
signer: Box::new(signer),
|
||||
signer: Rc::new(signer),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -84,6 +85,10 @@ impl Storage {
|
||||
self.path.as_path()
|
||||
}
|
||||
|
||||
pub fn signer(&self) -> Rc<dyn Signer> {
|
||||
self.signer.clone()
|
||||
}
|
||||
|
||||
pub fn projects(&self) -> Result<Vec<ProjId>, Error> {
|
||||
let mut projects = Vec::new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user