mirror of
https://gitee.com/goploy/goploy.git
synced 2024-12-04 21:21:40 +08:00
20 lines
377 B
Go
20 lines
377 B
Go
package media
|
|
|
|
import (
|
|
"github.com/zhenorzz/goploy/internal/media/dingtalk"
|
|
"github.com/zhenorzz/goploy/internal/media/feishu"
|
|
"strings"
|
|
)
|
|
|
|
type Media interface {
|
|
Login(authCode string, redirectUri string) (string, error)
|
|
}
|
|
|
|
func GetMedia(state string) Media {
|
|
if strings.Contains(state, "dingtalk") {
|
|
return dingtalk.Dingtalk{}
|
|
} else {
|
|
return feishu.Feishu{}
|
|
}
|
|
}
|