forked from kemitix/git-next
35 lines
837 B
Rust
35 lines
837 B
Rust
|
use std::ops::Deref;
|
||
|
|
||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||
|
pub struct WebhookId(String);
|
||
|
impl WebhookId {
|
||
|
#[allow(dead_code)]
|
||
|
pub const fn new(id: String) -> Self {
|
||
|
Self(id)
|
||
|
}
|
||
|
}
|
||
|
impl Deref for WebhookId {
|
||
|
type Target = String;
|
||
|
fn deref(&self) -> &Self::Target {
|
||
|
&self.0
|
||
|
}
|
||
|
}
|
||
|
|
||
|
pub async fn unregister(
|
||
|
_webhook_id: WebhookId,
|
||
|
_repo_details: crate::server::config::RepoDetails,
|
||
|
_addr: actix::prelude::Addr<super::RepoActor>,
|
||
|
_net: kxio::network::Network,
|
||
|
) {
|
||
|
// TODO: (#17) unregister webhook
|
||
|
// on success - stop the actor
|
||
|
}
|
||
|
|
||
|
pub async fn register(
|
||
|
_repo_details: crate::server::config::RepoDetails,
|
||
|
_addr: actix::prelude::Addr<super::RepoActor>,
|
||
|
_net: kxio::network::Network,
|
||
|
) {
|
||
|
// TODO: (#15) register webhook - on success send webhook id to RepoActor
|
||
|
}
|