notify

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package notify envoie des notifications multi-plateformes (Discord, Telegram, Matrix).

Toutes les notifications sont envoyées de manière asynchrone via des goroutines — elles ne bloquent jamais le flux HTTP principal.

Chaque plateforme est conditionnelle : si l'URL/token est vide dans la configuration, l'envoi est simplement ignoré.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier struct {
	// contains filtered or unexported fields
}

Notifier gère l'envoi asynchrone de notifications vers Discord, Telegram et Matrix.

func New

func New(cfg config.WebhooksConfig) *Notifier

New crée un nouveau Notifier à partir de la configuration webhooks.

func (*Notifier) NotifyAccessExpiry

func (n *Notifier) NotifyAccessExpiry(username string, daysLeft int)

NotifyAccessExpiry signale à l'admin qu'un utilisateur va bientôt expirer.

func (*Notifier) NotifyBackupCreated

func (n *Notifier) NotifyBackupCreated(fileName string, sizeBytes int64)

NotifyBackupCreated alerte qu'une nouvelle sauvegarde a été générée.

func (*Notifier) NotifyTaskExecuted

func (n *Notifier) NotifyTaskExecuted(taskName string, success bool, err error)

NotifyTaskExecuted envoie une notification sur le statut d'exécution d'une tâche.

func (*Notifier) NotifyUserRegistered

func (n *Notifier) NotifyUserRegistered(event UserRegisteredEvent)

NotifyUserRegistered envoie des notifications d'inscription sur toutes les plateformes configurées. L'exécution est entièrement asynchrone — cette méthode retourne immédiatement.

type UserRegisteredEvent

type UserRegisteredEvent struct {
	Username    string
	DisplayName string
	Email       string
	InviteCode  string
	InvitedBy   string
	JellyfinID  string
	LdapDN      string
	Timestamp   time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL