mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
adjust api, test commands with a greenmail instance
This commit is contained in:
+12
-3
@@ -1,11 +1,12 @@
|
||||
use clap::Parser;
|
||||
use email::account::config::DEFAULT_INBOX_FOLDER;
|
||||
|
||||
/// The folder name argument parser.
|
||||
/// The optional folder name flag parser.
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct FolderNameArg {
|
||||
pub struct FolderNameOptionalFlag {
|
||||
/// The name of the folder.
|
||||
#[arg(name = "folder_name", value_name = "FOLDER")]
|
||||
#[arg(long = "folder", short = 'f')]
|
||||
#[arg(name = "folder_name", value_name = "NAME", default_value = DEFAULT_INBOX_FOLDER)]
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
@@ -17,6 +18,14 @@ pub struct FolderNameOptionalArg {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
/// The required folder name argument parser.
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct FolderNameArg {
|
||||
/// The name of the folder.
|
||||
#[arg(name = "folder_name", value_name = "FOLDER")]
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
/// The source folder name argument parser.
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct SourceFolderNameArg {
|
||||
|
||||
@@ -16,8 +16,8 @@ use self::{
|
||||
|
||||
/// Manage folders.
|
||||
///
|
||||
/// A folder (AKA mailbox, or directory) contains envelopes and
|
||||
/// messages. This subcommand allows you to manage them.
|
||||
/// A folder (as known as mailbox, or directory) contains one or more
|
||||
/// emails. This subcommand allows you to manage them.
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub enum FolderSubcommand {
|
||||
#[command(alias = "add", alias = "new")]
|
||||
|
||||
Reference in New Issue
Block a user