pass_manager/src/commands.rs

54 lines
1.4 KiB
Rust
Raw Normal View History

2023-05-09 17:27:58 +00:00
//! This module consists of endpoints to handle commands
2023-07-29 13:07:53 +00:00
crate::export_handlers!(
add_account,
cancel,
delete,
delete_all,
export,
gen_password,
get_account,
get_accounts,
help,
import,
menu,
set_master_pass,
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 = "gives you a menu to manage your accounts")]
Menu,
#[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,
}