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;
|
2023-05-07 17:11:52 +00:00
|
|
|
mod cancel;
|
2023-05-04 18:35:31 +00:00
|
|
|
mod delete;
|
2023-05-04 18:46:44 +00:00
|
|
|
mod delete_all;
|
2023-05-05 13:45:56 +00:00
|
|
|
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;
|
2023-05-05 13:45:56 +00:00
|
|
|
mod import;
|
2023-07-25 16:09:34 +00:00
|
|
|
mod menu;
|
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;
|
2023-05-07 17:11:52 +00:00
|
|
|
pub use cancel::cancel;
|
2023-05-04 18:35:31 +00:00
|
|
|
pub use delete::delete;
|
2023-05-04 18:46:44 +00:00
|
|
|
pub use delete_all::delete_all;
|
2023-05-05 13:45:56 +00:00
|
|
|
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;
|
2023-05-05 13:45:56 +00:00
|
|
|
pub use import::import;
|
2023-07-25 16:09:34 +00:00
|
|
|
pub use menu::menu;
|
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;
|
2023-06-29 14:33:26 +00:00
|
|
|
|
2023-05-27 22:42:06 +00:00
|
|
|
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,
|
2023-07-29 13:00:02 +00:00
|
|
|
#[command(description = "gives you a menu to manage your accounts")]
|
|
|
|
Menu,
|
2023-05-27 22:42:06 +00:00
|
|
|
#[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,
|
|
|
|
}
|