WIP Impl Action
This commit is contained in:
parent
23fed5b6ca
commit
b8bac1142c
28 changed files with 363 additions and 58 deletions
|
|
@ -4,7 +4,7 @@ use std::fmt;
|
|||
use std::path::Path;
|
||||
|
||||
use command_runner::CommandRunner;
|
||||
use symbols::Symbol;
|
||||
use symbols::{Action, OwnedSymbolAction, Symbol, SymbolAction, SymbolRunner};
|
||||
|
||||
pub struct TlsKey<'a> {
|
||||
domain: Cow<'a, str>,
|
||||
|
|
@ -47,6 +47,14 @@ impl<'a> Symbol for TlsKey<'a> {
|
|||
fn execute(&self) -> Result<(), Box<Error>> {
|
||||
self.command_runner.run_successfully("openssl", &["genrsa", "-out", &self.get_path(), &self.get_bytes().to_string()])
|
||||
}
|
||||
|
||||
fn as_action<'b>(&'b self, runner: &'b SymbolRunner) -> Box<Action + 'b> {
|
||||
Box::new(SymbolAction::new(runner, self))
|
||||
}
|
||||
|
||||
fn into_action<'b>(self: Box<Self>, runner: &'b SymbolRunner) -> Box<Action + 'b> where Self: 'b {
|
||||
Box::new(OwnedSymbolAction::new(runner, *self))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue