Authentication (#37)

* Initial authentication implementation

* Store user info in the database, improve encapsulation in profiles

* Add user list, remove unused dependencies, add spantraces

* Implement user remove, update UUID crate

* Add user set-default

* Revert submodule macro usage

* Make tracing significantly less verbose
This commit is contained in:
Danielle
2022-07-15 15:39:38 +00:00
committed by GitHub
parent 53948c7a5e
commit b223dc7cba
27 changed files with 1490 additions and 851 deletions

View File

@@ -1,17 +1,20 @@
use eyre::Result;
mod profile;
mod user;
#[derive(argh::FromArgs)]
#[derive(argh::FromArgs, Debug)]
#[argh(subcommand)]
pub enum SubCommand {
pub enum Subcommand {
Profile(profile::ProfileCommand),
User(user::UserCommand),
}
impl crate::Args {
pub async fn dispatch(&self) -> Result<()> {
match self.subcommand {
SubCommand::Profile(ref cmd) => cmd.dispatch(self).await,
}
dispatch!(self.subcommand, (self) => {
Subcommand::Profile,
Subcommand::User
})
}
}