Documentation
¶
Index ¶
- func AllEventTypeStrings() []string
- func IsValidEventType(value string) bool
- func NormalizeEventTypes(input []string) ([]string, error)
- func ValidateNotifiarrAPIKey(ctx context.Context, rawURL string) error
- func ValidateURL(rawURL string) error
- type AutomationActionSummary
- type AutomationRuleSummary
- type AutomationsEventData
- type CrossSeedEventData
- type Event
- type EventDefinition
- type EventType
- type LabelCount
- type Notifier
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllEventTypeStrings ¶
func AllEventTypeStrings() []string
func IsValidEventType ¶
func NormalizeEventTypes ¶
func ValidateNotifiarrAPIKey ¶
func ValidateURL ¶
Types ¶
type AutomationActionSummary ¶
type AutomationRuleSummary ¶
type AutomationRuleSummary struct {
RuleID int `json:"rule_id,omitempty"`
RuleName string `json:"rule_name"`
Applied int `json:"applied"`
Failed int `json:"failed"`
Actions []AutomationActionSummary `json:"actions,omitempty"`
}
type AutomationsEventData ¶
type AutomationsEventData struct {
Applied int `json:"applied"`
Failed int `json:"failed"`
Rules []AutomationRuleSummary `json:"rules,omitempty"`
Samples []string `json:"samples,omitempty"`
}
type CrossSeedEventData ¶
type CrossSeedEventData struct {
RunID int64 `json:"run_id,omitempty"`
Mode string `json:"mode,omitempty"`
Status string `json:"status,omitempty"`
FeedItems int `json:"feed_items,omitempty"`
Candidates int `json:"candidates,omitempty"`
Processed int `json:"processed,omitempty"`
Total int `json:"total,omitempty"`
Matches int `json:"matches,omitempty"`
Complete int `json:"complete,omitempty"`
Pending int `json:"pending,omitempty"`
Added int `json:"added,omitempty"`
Failed int `json:"failed,omitempty"`
Skipped int `json:"skipped,omitempty"`
Recommendation string `json:"recommendation,omitempty"`
Samples []string `json:"samples,omitempty"`
}
type Event ¶
type Event struct {
Type EventType
Title string
Message string
StartedAt *time.Time
CompletedAt *time.Time
CrossSeed *CrossSeedEventData
Automations *AutomationsEventData
InstanceID int
InstanceName string
TorrentName string
TorrentHash string
TorrentAddedOn int64
TorrentETASeconds int64
TorrentState string
TorrentProgress float64
TorrentRatio float64
TorrentTotalSizeBytes int64
TorrentDownloadedBytes int64
TorrentAmountLeftBytes int64
TorrentDlSpeedBps int64
TorrentUpSpeedBps int64
TorrentNumSeeds int64
TorrentNumLeechs int64
TrackerDomain string
Category string
Tags []string
BackupKind models.BackupRunKind
BackupRunID int64
BackupTorrentCount int
DirScanRunID int64
DirScanMatchesFound int
DirScanTorrentsAdded int
OrphanScanRunID int64
OrphanScanFilesDeleted int
OrphanScanFoldersDeleted int
ErrorMessage string
ErrorMessages []string
}
type EventDefinition ¶
type EventDefinition struct {
Type EventType `json:"type"`
Label string `json:"label"`
Description string `json:"description"`
}
func EventDefinitions ¶
func EventDefinitions() []EventDefinition
type EventType ¶
type EventType string
const ( EventTorrentAdded EventType = "torrent_added" EventTorrentCompleted EventType = "torrent_completed" EventBackupSucceeded EventType = "backup_succeeded" EventBackupFailed EventType = "backup_failed" EventDirScanCompleted EventType = "dir_scan_completed" EventDirScanFailed EventType = "dir_scan_failed" EventOrphanScanCompleted EventType = "orphan_scan_completed" EventOrphanScanFailed EventType = "orphan_scan_failed" EventCrossSeedAutomationSucceeded EventType = "cross_seed_automation_succeeded" EventCrossSeedAutomationFailed EventType = "cross_seed_automation_failed" EventCrossSeedSearchSucceeded EventType = "cross_seed_search_succeeded" EventCrossSeedSearchFailed EventType = "cross_seed_search_failed" EventCrossSeedCompletionSucceeded EventType = "cross_seed_completion_succeeded" EventCrossSeedCompletionFailed EventType = "cross_seed_completion_failed" EventCrossSeedWebhookSucceeded EventType = "cross_seed_webhook_succeeded" EventCrossSeedWebhookFailed EventType = "cross_seed_webhook_failed" EventAutomationsActionsApplied EventType = "automations_actions_applied" EventAutomationsRunFailed EventType = "automations_run_failed" )
type LabelCount ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(store *models.NotificationTargetStore, instanceStore *models.InstanceStore, logger zerolog.Logger) *Service
Click to show internal directories.
Click to hide internal directories.