pass_manager/src/commands/mod.rs

62 lines
1.6 KiB
Rust
Raw Normal View History

2023-05-09 17:27:58 +00:00
//! This module consists of endpoints to handle commands
2023-05-03 18:08:14 +00:00
mod add_account;
mod cancel;
mod delete;
2023-05-04 18:46:44 +00:00
mod delete_all;
mod export;
2023-05-07 15:07:48 +00:00
mod gen_password;
2023-05-03 18:08:14 +00:00
mod get_account;
mod get_accounts;
mod help;
mod import;
2023-05-03 18:08:14 +00:00
mod set_master_pass;
2023-05-07 17:31:01 +00:00
mod start;
2023-05-03 18:08:14 +00:00
pub use add_account::add_account;
pub use cancel::cancel;
pub use delete::delete;
2023-05-04 18:46:44 +00:00
pub use delete_all::delete_all;
pub use export::export;
2023-05-07 15:07:48 +00:00
pub use gen_password::gen_password;
2023-05-03 18:08:14 +00:00
pub use get_account::get_account;
pub use get_accounts::get_accounts;
pub use help::help;
pub use import::import;
2023-05-03 18:08:14 +00:00
pub use set_master_pass::set_master_pass;
2023-05-07 17:31:01 +00:00
pub use start::start;
use teloxide::macros::BotCommands;
#[derive(BotCommands, Clone, Copy)]
#[command(
rename_rule = "snake_case",
description = "These commands are supported:"
)]
pub enum Command {
#[command(description = "displays the welcome message")]
Start,
#[command(description = "displays this text")]
Help,
#[command(description = "sets the master password")]
SetMasterPass,
#[command(description = "adds the account")]
AddAccount,
#[command(description = "gets the account")]
GetAccount,
#[command(description = "gets a list of accounts")]
GetAccounts,
#[command(description = "deletes the account")]
Delete,
#[command(description = "deletes all the accounts and the master password")]
DeleteAll,
#[command(description = "exports all the accounts in a json file")]
Export,
#[command(description = "loads the accounts from a json file")]
Import,
#[command(description = "generates 10 secure passwords")]
GenPassword,
#[command(description = "cancels the current action")]
Cancel,
}