From bdda149bf7408c05108e8265413fe7e130c1f4e4 Mon Sep 17 00:00:00 2001 From: Joshua Mo Date: Mon, 25 Dec 2023 15:12:56 +0000 Subject: [PATCH] refactor v0.1.0 --- Cargo.lock | 108 ++++++++++++++++++++++++---------------- README.md | 2 +- chamber-cli/Cargo.toml | 6 ++- chamber-cli/src/args.rs | 10 ++-- 4 files changed, 76 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3666ff1..a832ab5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -338,13 +338,45 @@ dependencies = [ ] [[package]] -name = "boulder-cli" -version = "0.0.1" +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chamber-cli" +version = "0.1.0" dependencies = [ "aes-gcm", "bincode", - "boulder-core", - "boulder-server", + "chamber-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap", "comfy-table 7.1.0", "generic-array", @@ -359,8 +391,33 @@ dependencies = [ ] [[package]] -name = "boulder-core" -version = "0.0.1" +name = "chamber-core" +version = "0.1.0" +dependencies = [ + "aes-gcm", + "async-trait", + "axum", + "bincode", + "chrono", + "generic-array", + "hyper", + "nanoid", + "serde", + "serde_bytes", + "serde_json", + "sqlx", + "tokio", + "tower", + "tracing", + "typenum", + "zeroize", +] + +[[package]] +name = "chamber-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fe89be25e9b715d1c143958764afea8a96bc2fcae7581128f81fb0ae01e96ae" dependencies = [ "aes-gcm", "async-trait", @@ -382,13 +439,13 @@ dependencies = [ ] [[package]] -name = "boulder-server" -version = "0.0.1" +name = "chamber-server" +version = "0.1.0" dependencies = [ "aes-gcm", "axum", "bincode", - "boulder-core", + "chamber-core 0.1.0", "chrono", "generic-array", "headers 0.4.0", @@ -408,39 +465,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - [[package]] name = "chrono" version = "0.4.31" diff --git a/README.md b/README.md index 6b6d3b6..3c21040 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Do you have NIH syndrome? Me too, which is why I made this web service so I can ## Usage The easiest way to start using Chamber is via the CLI. Currently there is no package published on crates.io, so you will need to install it using the following: ```bash -cargo install chamber +cargo install chamber-cli ``` You'll want to then set the URL of your Chamber instance using `chamber website set [VALUE]`. diff --git a/chamber-cli/Cargo.toml b/chamber-cli/Cargo.toml index a6a31c8..8bbb721 100644 --- a/chamber-cli/Cargo.toml +++ b/chamber-cli/Cargo.toml @@ -2,7 +2,8 @@ name = "chamber-cli" version = "0.1.0" edition = "2021" -description = "The core for Chamber, the self-hostable SecretOps service." +license = "MIT" +description = "The CLI for Chamber, the self-hostable SecretOps service." homepage = "https://www.github.com/joshua-mo-143/chamber" documentation = "https://www.github.com/joshua-mo-143/chamber" repository = "https://www.github.com/joshua-mo-143/chamber" @@ -20,7 +21,8 @@ home = "0.5.9" reqwest = { version = "0.11.22", features = ["json", "blocking", "multipart"] } toml = "0.8.8" inquire = "0.6.2" -chamber-core = { path = "../chamber-core" } +# chamber-core = { path = "../chamber-core" } +chamber-core = "0.1.0" bincode = { workspace = true } aes-gcm = { workspace = true } generic-array = { workspace = true } diff --git a/chamber-cli/src/args.rs b/chamber-cli/src/args.rs index 0db8e4b..b80688e 100644 --- a/chamber-cli/src/args.rs +++ b/chamber-cli/src/args.rs @@ -20,17 +20,17 @@ pub enum Commands { #[command(subcommand)] cmd: UserCommands, }, - /// Commands related to setting/getting the URL for your Boulder instance. + /// Commands related to setting/getting the URL for your Chamber instance. Website { #[command(subcommand)] cmd: WebsiteCommands, }, - /// Log in to your Boulder instance. + /// Log in to your Chamber instance. Login(LoginArgs), - /// Commands related to generating keys for your Boulder instance. + /// Commands related to generating keys for your Chamber instance. Keygen(KeygenArgs), - /// Unseal your Boulder instance. - Unseal { boulder_key: String }, + /// Unseal your Chamber instance. + Unseal { chamber_key: String }, Upload(UploadArgs) }