pub struct WebhookService { /* private fields */ }Implementations§
Source§impl WebhookService
impl WebhookService
pub async fn send_webhook( &self, url: &str, payload: Value, config: Option<WebhookConfig>, ) -> IntegrationResult<WebhookDeliveryResult>
pub async fn get_endpoint_stats( &self, endpoint_id: &str, ) -> IntegrationResult<WebhookStats>
pub async fn test_endpoint( &self, endpoint_id: &str, ) -> IntegrationResult<WebhookTestResult>
Source§impl WebhookService
impl WebhookService
pub fn new() -> Self
pub async fn register_endpoint( &self, endpoint: WebhookEndpoint, ) -> IntegrationResult<String>
pub async fn update_endpoint( &self, endpoint: WebhookEndpoint, ) -> IntegrationResult<()>
pub async fn get_endpoint( &self, endpoint_id: &str, ) -> IntegrationResult<Option<WebhookEndpoint>>
pub async fn list_endpoints(&self) -> IntegrationResult<Vec<WebhookEndpoint>>
pub async fn remove_endpoint( &self, endpoint_id: &str, ) -> IntegrationResult<bool>
pub async fn handle_webhook( &self, endpoint_id: &str, request: WebhookRequest, ) -> IntegrationResult<WebhookResponse>
pub async fn verify_signature( &self, endpoint_id: &str, payload: &Value, signature: &str, ) -> IntegrationResult<bool>
Trait Implementations§
Source§impl Debug for WebhookService
impl Debug for WebhookService
Auto Trait Implementations§
impl !Freeze for WebhookService
impl !RefUnwindSafe for WebhookService
impl Send for WebhookService
impl Sync for WebhookService
impl Unpin for WebhookService
impl !UnwindSafe for WebhookService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more