refactor(handler): 重构runner及checker架构

This commit is contained in:
mei
2026-06-06 19:31:16 +08:00
parent 7c4fb1e1d8
commit 7957a91609
13 changed files with 405 additions and 19 deletions
+23
View File
@@ -0,0 +1,23 @@
package runner
import (
"log"
"github.com/ssdomei232/goodBaby/drivers/email"
"github.com/ssdomei232/goodBaby/model"
)
// EmailExecutor 邮件执行器
type EmailExecutor struct{}
func (e *EmailExecutor) GetType() string {
return "email"
}
func (e *EmailExecutor) Execute(rule *model.Rule) error {
log.Printf("执行邮件规则: %s (ID: %d)", rule.Name, rule.ID)
email.SendMail(rule)
return nil
}