goploy/internal/media/media.go
2023-06-28 10:32:00 +08:00

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{}
}
}