- update storage

master
李光春 1 year ago
parent fe7b166df1
commit 013838b100

@ -48,6 +48,7 @@ type AliYun struct {
// NewAliYun 初始化
// https://help.aliyun.com/document_detail/32144.html
// https://github.com/aliyun/aliyun-oss-go-sdk
func NewAliYun(config *AliYunConfig) (*AliYun, error) {
app := &AliYun{}
app.accessKeyId = config.AccessKeyId

@ -18,6 +18,7 @@ type Baidu struct {
// NewBaidu 初始化
// https://cloud.baidu.com/doc/BOS/s/4jwvyry1p
// https://github.com/baidubce/bce-sdk-go
func NewBaidu(accessKey string, secretAccessKey, endpoint, bucketName string) *Baidu {
app := &Baidu{AccessKey: accessKey, SecretAccessKey: secretAccessKey, Endpoint: endpoint, BucketName: bucketName}
clientConfig := bos.BosClientConfiguration{

@ -17,6 +17,7 @@ type Huaweicloud struct {
// NewHuaweicloud 初始化
// https://support.huaweicloud.com/sdk-go-devg-obs/obs_33_0001.html
// https://github.com/huaweicloud/huaweicloud-sdk-go-obs
func NewHuaweicloud(accessKey string, secretKey string, endpoint string, bucketName string) *Huaweicloud {
app := &Huaweicloud{AccessKey: accessKey, SecretKey: secretKey, Endpoint: endpoint, BucketName: bucketName}
app.client, app.error = obs.New(accessKey, secretKey, endpoint)

@ -19,6 +19,7 @@ type Qiniu struct {
// NewQiniu 初始化
// https://developer.qiniu.com/kodo/1238/go
// https://github.com/qiniu/go-sdk
func NewQiniu(accessKey string, secretKey string, bucketName string) *Qiniu {
app := &Qiniu{AccessKey: accessKey, SecretKey: secretKey, BucketName: bucketName}
app.client = qbox.NewMac(accessKey, secretKey)

@ -21,6 +21,7 @@ type Tencent struct {
// NewTencent 初始化
// https://cloud.tencent.com/document/product/436/31215
// https://github.com/tencentyun/cos-go-sdk-v5
func NewTencent(secretID, secretKey, regions, bucketName string) *Tencent {
app := &Tencent{SecretID: secretID, SecretKey: secretKey, Regions: regions, BucketName: bucketName}
u, _ := url.Parse(fmt.Sprintf("https://%s.cos.%s.myqcloud.com", bucketName, regions))

@ -14,6 +14,7 @@ type Upyun struct {
}
// NewUpyun 初始化
// https://help.upyun.com/docs/storage/
// https://github.com/upyun/go-sdk
func NewUpyun(operator string, password string, bucketName string) *Upyun {
app := &Upyun{Operator: operator, Password: password, BucketName: bucketName}

Loading…
Cancel
Save