Documentation
¶
Overview ¶
Package webhook handles the management of webhooks and webhook deliveries.
Index ¶
- type DeliveryTask
- type Manager
- func (m *Manager) Close()
- func (m *Manager) Create(webhook models.Webhook) (models.Webhook, error)
- func (m *Manager) Delete(id int) error
- func (m *Manager) Get(id int) (models.Webhook, error)
- func (m *Manager) GetAll() ([]models.Webhook, error)
- func (m *Manager) Run(ctx context.Context)
- func (m *Manager) SendTestWebhook(id int) error
- func (m *Manager) Toggle(id int) (models.Webhook, error)
- func (m *Manager) TriggerEvent(event models.WebhookEvent, data any)
- func (m *Manager) Update(id int, webhook models.Webhook) (models.Webhook, error)
- type Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeliveryTask ¶
type DeliveryTask struct {
Event models.WebhookEvent
Payload any
}
DeliveryTask represents a webhook delivery task
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles webhook-related operations.
func (*Manager) Close ¶
func (m *Manager) Close()
Close signals the manager to stop processing and waits for all workers to finish.
func (*Manager) SendTestWebhook ¶
SendTestWebhook sends a test webhook to the specified webhook ID.
func (*Manager) TriggerEvent ¶
func (m *Manager) TriggerEvent(event models.WebhookEvent, data any)
TriggerEvent triggers webhooks for a specific event with the provided data.
Click to show internal directories.
Click to hide internal directories.