diff options
author | Katharina Fey <kookie@spacekookie.de> | 2018-09-08 23:33:22 +0200 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2018-09-08 23:33:22 +0200 |
commit | c352fd1c6b5b7119dfa9cc8eb642aa3ee7127a01 (patch) | |
tree | be59e8c0e0ebfc673fef04c342837c2e41aec1ea /lockchain-files/examples/create.rs | |
parent | ddebbc0b7f45eaf07a2242fd91f1a92ee27099a9 (diff) |
Assorted code fixes
Diffstat (limited to 'lockchain-files/examples/create.rs')
-rw-r--r-- | lockchain-files/examples/create.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lockchain-files/examples/create.rs b/lockchain-files/examples/create.rs index b1c6a94..68fd980 100644 --- a/lockchain-files/examples/create.rs +++ b/lockchain-files/examples/create.rs @@ -4,7 +4,7 @@ extern crate lockchain_files as files; use files::DataVault; use lcc::traits::Vault; use lcc::users::User; -use lcc::{Generator, EncryptedBody, Payload, Record}; +use lcc::{EncryptedBody, Generator, Payload, Record, VaultType}; use std::env; fn main() { @@ -12,7 +12,13 @@ fn main() { let path = env::args().nth(1).unwrap(); let name = env::args().nth(2).unwrap(); - let mut vault: DataVault<EncryptedBody> = Generator::new().path(name, path).finalise(); + let mut vault: DataVault<EncryptedBody> = Generator::new() + .path(name, path) + .user_type(VaultType::SoloUser { + username: "spacekookie".into(), + secret: "foobar3264".into(), + }).finalise() + .unwrap(); vault.sync(); // let vault: DataVault<EncryptedBody> = DataVault::new(&name, &path); |