新增快手平台和对应的接口

This commit is contained in:
2026-06-01 14:08:17 +08:00
parent 15db71b7ba
commit 812693caae
14 changed files with 1529 additions and 185 deletions

View File

@@ -15,6 +15,8 @@ import (
type PlatformConfig struct {
*entity.DatasourcePlatform
AccessToken string
AppKey string
AppSecret string
}
// GetApiUrl 拼接完整 API URL
@@ -52,6 +54,15 @@ func (m *PlatformManager) GetPlatform(ctx context.Context, platformCode string)
}
case "API_KEY":
cfg.AccessToken = platform.ApiKey
case "SIGN":
if platform.AuthConfig != nil {
if ak, _ := platform.AuthConfig["app_key"].(string); ak != "" {
cfg.AppKey = ak
}
if as, _ := platform.AuthConfig["app_secret"].(string); as != "" {
cfg.AppSecret = as
}
}
default:
logrus.Warnf("平台 %s 认证类型 %s 未处理", platformCode, platform.AuthType)
}