完成文本审查服务开发

This commit is contained in:
GeekMaster
2025-08-31 18:21:09 +08:00
parent 0585edd895
commit 9a4239290b
27 changed files with 896 additions and 164 deletions

View File

@@ -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