Files
hideck/internal/device/notifier.go
T

16 lines
470 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package device
import "time"
// Notifier 定义了设备池需要的事件通知接口,
// 用于解耦具体的通知实现(如 Telegram 或 Webhook)
type Notifier interface {
NotifySMS(deviceID, sender, content string, timestamp time.Time)
NotifyIPRotated(deviceID, oldIP, newIP string, duration time.Duration)
NotifyRaw(msg string)
}
type SMSSourceNotifier interface {
NotifySMSWithSource(deviceID, sender, content, source string, timestamp time.Time)
}