mirror of
https://github.com/yibaiba/hideck.git
synced 2026-12-06 16:01:13 +00:00
16 lines
470 B
Go
16 lines
470 B
Go
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)
|
||
}
|