use std::collections::HashMap;
pub struct Client {
local_domain: LocalDomain,
s3_clients: HashMap<String, S3Client>,
}
impl Client {
pub async fn new() -> Self {
cwd = std::env::current_dir().unwrap();
Client {
local_domain = LocalDomain::new(cwd),
s3_clients: HashMap::new(),
}
}
pub async fn manifest3_from_uri(uri_string: String) -> Result<Manifest, Error> {
let uri = S3PackageURI::try_from(uri_string.as_str()).expect("Failed to parse URI");
let manifest: Manifest = browse_remote_package(local_domain.into(), uri)
.await
.expect("Failed to browse remote package");
println!("manifest: {:#?}", manifest);
Ok(manifest)
}
pub async fn domain_from_key(registry_uri: &str) -> Option<Domain> {
None
}
pub async fn domain_keys(&self) -> Vec<String> {
unimplemented!()
}
pub async fn domain_objects(&self, domain: &str) -> Vec<Domain> {
unimplemented!()
}
pub async fn domain_from_uri(uri: &str) -> Option<Domain> {
None
}
pub async fn namespace_from_uri(uri: &str) -> Option<Namespace> {
None
}
pub async fn manifest_from_uri(uri: &str) -> Option<Manifest4> {
None
}
pub async fn entry_from_uri(uri: &str) -> Option<Entry4> {
None
}
}