1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use std::path::PathBuf;

use structopt::StructOpt;

#[derive(StructOpt)]
pub struct Options {
    /// Path to gmail configuration, relative to directory.
    #[structopt(long, short = "c", default_value = "gmail.yaml")]
    pub conf: PathBuf,

    #[structopt(subcommand)]
    pub subcommand: Command,
}

#[derive(StructOpt)]
pub enum Command {
    Daemon,
    ListAccounts,
    Login(LoginOptions),
    Logout(LogoutOptions),
}

#[derive(StructOpt)]
pub struct LoginOptions {
    pub email: String,
}

#[derive(StructOpt)]
pub struct LogoutOptions {
    pub email: String,
}