mockforge_core/contract_webhooks/
mod.rs

1//! Contract change webhook system
2//!
3//! This module provides webhook functionality for notifying external systems
4//! about contract mismatches, breaking changes, and drift patterns.
5//!
6//! # Features
7//!
8//! - Configurable webhook endpoints
9//! - Event filtering by severity
10//! - Retry logic with exponential backoff
11//! - Webhook signing for security
12//!
13//! # Example Usage
14//!
15//! ```rust,ignore
16//! use mockforge_core::contract_webhooks::{WebhookDispatcher, WebhookConfig, ContractEvent};
17//!
18//! async fn example() -> mockforge_core::Result<()> {
19//!     let config = WebhookConfig {
20//!         url: "https://slack.example.com/webhooks/contracts".to_string(),
21//!         events: vec!["contract.breaking_change".to_string()],
22//!         severity_threshold: Some("high".to_string()),
23//!         ..Default::default()
24//!     };
25//!
26//!     let dispatcher = WebhookDispatcher::new(vec![config]);
27//!
28//!     let event = ContractEvent::BreakingChange {
29//!         endpoint: "/api/users".to_string(),
30//!         description: "Required field removed".to_string(),
31//!         severity: "critical".to_string(),
32//!     };
33//!
34//!     dispatcher.dispatch(&event).await?;
35//!     Ok(())
36//! }
37//! ```
38
39pub mod types;
40pub mod webhook_dispatcher;
41
42// Re-export main types
43pub use types::{ContractEvent, WebhookConfig, WebhookPayload, WebhookResult};
44pub use webhook_dispatcher::WebhookDispatcher;