Add zulip webhook

This commit is contained in:
2025-10-10 20:43:09 +02:00
parent 75b1045983
commit cdc896c5f0
3 changed files with 91 additions and 1 deletions

20
webhook/webhook.go Normal file
View File

@@ -0,0 +1,20 @@
// Package webhook provides a generic webhook interface for sending messages
// with channel, topic, and message parameters.
package webhook
import (
"time"
)
// WebhookMessage represents the structure of a webhook message
type WebhookMessage struct {
Channel string `json:"channel"`
Topic string `json:"topic"`
Message string `json:"message"`
Timestamp time.Time `json:"timestamp"`
}
// WebhookInterface defines the contract for webhook operations
type WebhookInterface interface {
Post(channel, topic, message string) error
}