08cefb1
use crate::hook::types::{HookEvent, HookEventKind, HookResult, ScriptOutput};
pub trait HookOps {
fn hook_pre_receive(&self, event: &HookEvent) -> Result<HookResult, crate::Error>;
fn hook_post_receive(&self, event: &HookEvent) -> Result<HookResult, crate::Error>;
fn hook_emit(&self, event: &HookEvent) -> Result<(), crate::Error>;
fn hook_execute_script(
&self,
script: &str,
args: &[&str],
) -> Result<ScriptOutput, crate::Error>;
fn hook_supported(&self, kind: HookEventKind) -> bool;
}