Add the Task struct.
This commit is contained in:
parent
3846a62591
commit
4d62527e23
|
@ -8,8 +8,10 @@ use {
|
||||||
};
|
};
|
||||||
|
|
||||||
mod general;
|
mod general;
|
||||||
|
mod task;
|
||||||
|
|
||||||
pub use general::*;
|
pub use general::*;
|
||||||
|
pub use task::*;
|
||||||
|
|
||||||
/// The main Hooked configuration struct.
|
/// The main Hooked configuration struct.
|
||||||
#[derive(Debug, Default, Deserialize, Serialize)]
|
#[derive(Debug, Default, Deserialize, Serialize)]
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
//! Task to perform in hooks.
|
||||||
|
|
||||||
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
/// Task to perform in hooks.
|
||||||
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
pub struct Task {
|
||||||
|
/// Command to execute directly.
|
||||||
|
pub command: Option<String>,
|
||||||
|
|
||||||
|
/// Path to a script to execute.
|
||||||
|
pub script: Option<PathBuf>,
|
||||||
|
}
|
Loading…
Reference in New Issue