Add expiration to the CLI
This commit is contained in:
parent
3dba0451cd
commit
7ca05e92b9
1 changed files with 10 additions and 0 deletions
|
@ -20,6 +20,8 @@ pub struct Config {
|
|||
domain_file: Option<PathBuf>,
|
||||
#[arg(short, long, value_name = "FILE")]
|
||||
revocation_list: Option<PathBuf>,
|
||||
#[arg(short = 'x', long, default_value_t = 1296000)]
|
||||
expiration: u64,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
|
@ -51,4 +53,12 @@ impl Config {
|
|||
pub fn domains(&self) -> &[String] {
|
||||
&self.domain
|
||||
}
|
||||
|
||||
pub fn expiration(&self) -> Option<u64> {
|
||||
if self.expiration != 0 {
|
||||
Some(self.expiration)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue