Trait git_next_git::ForgeLike
source · pub trait ForgeLike: Debug + Send + Sync {
// Required methods
fn duplicate(&self) -> Box<dyn ForgeLike>;
fn name(&self) -> String;
fn is_message_authorised(
&self,
message: &ForgeNotification,
expected: &WebhookAuth,
) -> bool;
fn parse_webhook_body(&self, body: &Body) -> Result<Push>;
fn commit_status<'life0, 'life1, 'async_trait>(
&'life0 self,
commit: &'life1 Commit,
) -> Pin<Box<dyn Future<Output = Status> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_webhooks<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 WebhookUrl,
) -> Pin<Box<dyn Future<Output = Result<Vec<WebhookId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn unregister_webhook<'life0, 'life1, 'async_trait>(
&'life0 self,
webhook: &'life1 WebhookId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn register_webhook<'life0, 'life1, 'async_trait>(
&'life0 self,
webhook_url: &'life1 WebhookUrl,
) -> Pin<Box<dyn Future<Output = Result<RegisteredWebhook>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn should_ignore_message(&self, _message: &ForgeNotification) -> bool { ... }
}
Required Methods§
fn duplicate(&self) -> Box<dyn ForgeLike>
fn name(&self) -> String
Checks that the message has a valid authorisation.
sourcefn parse_webhook_body(&self, body: &Body) -> Result<Push>
fn parse_webhook_body(&self, body: &Body) -> Result<Push>
Parses the webhook body into Some(Push) struct if appropriate, or None if not.
sourcefn commit_status<'life0, 'life1, 'async_trait>(
&'life0 self,
commit: &'life1 Commit,
) -> Pin<Box<dyn Future<Output = Status> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn commit_status<'life0, 'life1, 'async_trait>(
&'life0 self,
commit: &'life1 Commit,
) -> Pin<Box<dyn Future<Output = Status> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Checks the results of any (e.g. CI) status checks for the commit.
fn list_webhooks<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 WebhookUrl,
) -> Pin<Box<dyn Future<Output = Result<Vec<WebhookId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unregister_webhook<'life0, 'life1, 'async_trait>(
&'life0 self,
webhook: &'life1 WebhookId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_webhook<'life0, 'life1, 'async_trait>(
&'life0 self,
webhook_url: &'life1 WebhookUrl,
) -> Pin<Box<dyn Future<Output = Result<RegisteredWebhook>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
sourcefn should_ignore_message(&self, _message: &ForgeNotification) -> bool
fn should_ignore_message(&self, _message: &ForgeNotification) -> bool
Checks if the message should be ignored.
Default implementation says that no messages should be ignored.