mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-28 22:14:28 +08:00
完成文本审查服务开发
This commit is contained in:
@@ -23,7 +23,7 @@ import (
|
||||
)
|
||||
|
||||
type AliYunOss struct {
|
||||
config *types.AliYunOssConfig
|
||||
config types.AliYunOssConfig
|
||||
bucket *oss.Bucket
|
||||
proxyURL string
|
||||
}
|
||||
@@ -33,7 +33,7 @@ func NewAliYunOss(sysConfig *types.SystemConfig, appConfig *types.AppConfig) (*A
|
||||
proxyURL: appConfig.ProxyURL,
|
||||
}
|
||||
if sysConfig.OSS.Active == AliYun {
|
||||
err := s.UpdateConfig(&sysConfig.OSS.AliYun)
|
||||
err := s.UpdateConfig(sysConfig.OSS.AliYun)
|
||||
if err != nil {
|
||||
logger.Errorf("阿里云OSS初始化失败: %v", err)
|
||||
}
|
||||
@@ -42,7 +42,7 @@ func NewAliYunOss(sysConfig *types.SystemConfig, appConfig *types.AppConfig) (*A
|
||||
|
||||
}
|
||||
|
||||
func (s *AliYunOss) UpdateConfig(config *types.AliYunOssConfig) error {
|
||||
func (s *AliYunOss) UpdateConfig(config types.AliYunOssConfig) error {
|
||||
client, err := oss.New(config.Endpoint, config.AccessKey, config.AccessSecret)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user