Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ID int64 `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
Type string `json:"type"` // "discord" or "generic"
Enabled bool `json:"enabled"`
Events string `json:"events"` // comma-separated event types, or "*" for all
}
Config represents a webhook endpoint configuration.
type EventType ¶
type EventType string
EventType represents the type of webhook event.
const ( EventDownloadComplete EventType = "download_complete" EventDownloadFailed EventType = "download_failed" EventRequestApproved EventType = "request_approved" EventRequestCompleted EventType = "request_completed" EventRequestFailed EventType = "request_failed" EventSchedulerMatch EventType = "scheduler_match" EventSeriesMissing EventType = "series_missing" EventInfo EventType = "info" )
type Payload ¶
type Payload struct {
Event EventType `json:"event"`
Title string `json:"title"`
Message string `json:"message"`
Status string `json:"status"` // completed, failed, info
Timestamp string `json:"timestamp"`
Extra map[string]interface{} `json:"extra,omitempty"`
}
Payload is the data sent to webhooks.
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender manages sending webhook notifications.
func (*Sender) GetConfigs ¶
GetConfigs returns a copy of current configurations.
func (*Sender) SetConfigs ¶
SetConfigs replaces the current webhook configurations.
Click to show internal directories.
Click to hide internal directories.