diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-19 15:14:36 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-19 15:14:36 +0200 |
commit | 1dcb11643c783096e1b52bf48d6b76121504e6bd (patch) | |
tree | 658f1db34d0e4f91331dabcab85a5898a95d4ad4 /src/login/mod.rs | |
parent | 6be90936a108d971e0cfa3ddaa9c2d54557e30f3 (diff) | |
download | aerogramme-1dcb11643c783096e1b52bf48d6b76121504e6bd.tar.gz aerogramme-1dcb11643c783096e1b52bf48d6b76121504e6bd.zip |
CLI skeleton
Diffstat (limited to 'src/login/mod.rs')
-rw-r--r-- | src/login/mod.rs | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/login/mod.rs b/src/login/mod.rs index 4022962..4130496 100644 --- a/src/login/mod.rs +++ b/src/login/mod.rs @@ -53,12 +53,6 @@ impl Credentials { pub fn bucket(&self) -> &str { self.storage.bucket.as_str() } - pub fn dump_config(&self) { - println!("aws_access_key_id = \"{}\"", self.storage.aws_access_key_id); - println!("aws_secret_access_key = \"{}\"", self.storage.aws_secret_access_key); - println!("master_key = \"{}\"", base64::encode(&self.keys.master)); - println!("secret_key = \"{}\"", base64::encode(&self.keys.secret)); - } } impl StorageCredentials { @@ -93,28 +87,40 @@ impl StorageCredentials { } impl CryptoKeys { - pub fn init(storage: &StorageCredentials) -> Result<Self> { + pub async fn init(storage: &StorageCredentials, password: &str) -> Result<Self> { unimplemented!() } - pub fn init_without_password(storage: &StorageCredentials, master_key: &Key, secret_key: &SecretKey) -> Result<Self> { + pub async fn init_without_password( + storage: &StorageCredentials, + master_key: &Key, + secret_key: &SecretKey, + ) -> Result<Self> { unimplemented!() } - pub fn open(storage: &StorageCredentials, password: &str) -> Result<Self> { + pub async fn open(storage: &StorageCredentials, password: &str) -> Result<Self> { unimplemented!() } - pub fn open_without_password(storage: &StorageCredentials, master_key: &Key, secret_key: &SecretKey) -> Result<Self> { + pub async fn open_without_password( + storage: &StorageCredentials, + master_key: &Key, + secret_key: &SecretKey, + ) -> Result<Self> { unimplemented!() } - pub fn add_password(&self, storage: &StorageCredentials, password: &str) -> Result<()> { + pub async fn add_password(&self, storage: &StorageCredentials, password: &str) -> Result<()> { unimplemented!() } - pub fn remove_password(&self, storage: &StorageCredentials, password: &str, allow_remove_all: bool) -> Result<()> { + pub async fn delete_password( + &self, + storage: &StorageCredentials, + password: &str, + allow_delete_all: bool, + ) -> Result<()> { unimplemented!() } } - |