更新库pkg

This commit is contained in:
ayflying
2025-03-14 14:26:07 +08:00
parent 4963780a32
commit 5fbe4d5dcf
18 changed files with 443 additions and 12 deletions

20
pkg/notice/notice.go Normal file
View File

@@ -0,0 +1,20 @@
package notice
import (
v1 "github.com/ayflying/utility_go/api/pgk/v1"
"github.com/ayflying/utility_go/pkg/notice/drive"
)
type MessageV1 interface {
Send(value string)
}
func New(typ v1.NoticeType, host string, value ...interface{}) MessageV1 {
switch typ {
case v1.NoticeType_DINGTALK:
return drive.DingTalkLoad(host)
case v1.NoticeType_EMAIL:
return drive.MailLoad(host, value[0].(int), value[1].(string), value[2].(string))
}
return nil
}