Add zulip webhook
This commit is contained in:
20
webhook/webhook.go
Normal file
20
webhook/webhook.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user