mirror of
https://gitee.com/goploy/goploy.git
synced 2024-12-02 12:10:05 +08:00
20 lines
379 B
Go
20 lines
379 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{}
|
|
}
|
|
}
|