From f48329dac3996b18e90ed491376da7c2f9094a4b Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Tue, 31 Aug 2021 21:03:53 +0100 Subject: [PATCH] (housekeeping): READMEs for each crate --- Cargo.lock | 4 ++++ Cargo.toml | 1 + chartered-fs/Cargo.toml | 8 ++++++++ chartered-fs/README.md | 4 ++++ chartered-git/README.md | 15 +++++++++++++++ chartered-web/README.md | 9 +++++++++ chartered-fs/src/lib.rs | 7 +++++++ 7 files changed, 48 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 80939a3..b0fd9d7 100644 --- a/Cargo.lock +++ a/Cargo.lock @@ -183,6 +183,10 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] +name = "chartered-fs" +version = "0.1.0" + +[[package]] name = "chartered-git" version = "0.1.0" dependencies = [ diff --git a/Cargo.toml b/Cargo.toml index 5560843..11a3cbb 100644 --- a/Cargo.toml +++ a/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = [ "chartered-git", "chartered-web", + "chartered-fs", ] diff --git a/chartered-fs/Cargo.toml b/chartered-fs/Cargo.toml new file mode 100644 index 0000000..c3fa827 100644 --- /dev/null +++ a/chartered-fs/Cargo.toml @@ -1,0 +1,8 @@ +[package] +name = "chartered-fs" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/chartered-fs/README.md b/chartered-fs/README.md new file mode 100644 index 0000000..cd000e0 100644 --- /dev/null +++ a/chartered-fs/README.md @@ -1,0 +1,4 @@ +# chartered-fs (library) + +A file-system abstraction layer, for switching between S3, local file +storage, etc. Used by `chartered-web` to store `.crate` files. diff --git a/chartered-git/README.md b/chartered-git/README.md new file mode 100644 index 0000000..7eea05f 100644 --- /dev/null +++ a/chartered-git/README.md @@ -1,0 +1,15 @@ +# chartered-git (binary) + +Spins up an isolated SSH server, accepting connections only from those +with known SSH keys and serves the git protocol over it. When requesting +the git packfile, it'll serve a cargo index with only packages the user +has access to in there. + +To ensure proper authorization when the user pulls the `.crate` file +over the HTTP API, the cargo index's `config.json` will have credentials +embedded into it specific to the user, which will be passed by cargo to +the HTTP API. + +The user is only served a single, detatched commit from this git server, +cargo handles this gracefully as it checks out the server's HEAD rather +than trying to merge it into a master branch. diff --git a/chartered-web/README.md b/chartered-web/README.md new file mode 100644 index 0000000..14aa84c 100644 --- /dev/null +++ a/chartered-web/README.md @@ -1,0 +1,9 @@ +# chartered-web (binary) + +The web UI and Cargo HTTP API implementation for chartered. The Cargo +HTTP API is authenticated using a key either generated during login on +the Web UI or embedded into the cargo index returned by `chartered-git`. + +The web UI also allows for adding SSH keys that can be used to +authenticate and identify yourself to `chartered-git`, it's also used +for group management, etc. diff --git a/chartered-fs/src/lib.rs b/chartered-fs/src/lib.rs new file mode 100644 index 0000000..31e1bb2 100644 --- /dev/null +++ a/chartered-fs/src/lib.rs @@ -1,0 +1,7 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +} -- rgit 0.1.3