• haoyanbin's avatar
    1 · 9bf9e037
    haoyanbin authored
    9bf9e037
upload.go 855 Bytes
package upload

import (
	"mime/multipart"
)

//@author: [ccfish86](https://github.com/ccfish86)
//@author: [SliverHorn](https://github.com/SliverHorn)
//@interface_name: OSS
//@description: OSS接口

type OSS interface {
	UploadFile(file *multipart.FileHeader, directory, bucketName, bucketUrl string) (string, string, error)
	DeleteFile(key string, bucketName string) error
}

//@author: [ccfish86](https://github.com/ccfish86)
//@author: [SliverHorn](https://github.com/SliverHorn)
//@function: NewOss
//@description: OSS接口
//@description: OSS的实例化方法
//@return: OSS

func NewOss() OSS {
	//switch global.GVA_CONFIG.System.OssType {
	//case "local":
	//	return &Local{}
	//case "qiniu":
	//	return &Qiniu{}
	//case "tencent-cos":
	//	return &TencentCOS{}
	//case "aliyun-oss":
	return &AliyunOSS{}
	//default:
	//	return &Local{}
	//}
}