使用统一方法pgk进行调用
This commit is contained in:
19
pgk/notice/notice.go
Normal file
19
pgk/notice/notice.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package notice
|
||||
|
||||
import (
|
||||
v1 "github.com/ayflying/utility_go/api/pgk/v1"
|
||||
"github.com/ayflying/utility_go/pgk/notice/drive"
|
||||
)
|
||||
|
||||
type MessageV1 interface {
|
||||
Send(value string)
|
||||
}
|
||||
|
||||
func New(typ v1.NoticeType, host string) MessageV1 {
|
||||
switch typ {
|
||||
case v1.NoticeType_DINGTALK:
|
||||
return drive.Load(host)
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user