Files
service-common/module/cos.go

22 lines
358 B
Go

package module
import (
"git.hlsq.asia/alex/service-common/config"
"git.hlsq.asia/alex/service-common/cos"
)
// Cos 对象存储模块
type Cos struct {
DefaultModule
Cfg map[string]*config.CosConfig
}
func (m *Cos) Init() error {
if cfg, ok := m.Cfg["tencent"]; ok {
if err := cos.InitTencent(cfg); err != nil {
return err
}
}
return nil
}