mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
593 B
25 lines
593 B
2 years ago
|
package dao
|
||
|
|
||
|
import (
|
||
|
"github.com/rocboss/paopao-ce/global"
|
||
|
)
|
||
|
|
||
|
func getOssDomain() string {
|
||
|
if global.CfgIf("AliOSS") {
|
||
|
return "https://" + global.AliOSSSetting.Domain + "/"
|
||
|
} else if global.CfgIf("MinIO") {
|
||
|
domain := "http://"
|
||
|
if global.MinIOSetting.Secure {
|
||
|
domain = "http://"
|
||
|
}
|
||
|
return domain + global.MinIOSetting.Endpoint + "/" + global.MinIOSetting.Bucket + "/"
|
||
|
} else if global.CfgIf("S3") {
|
||
|
domain := "http://"
|
||
|
if global.S3Setting.Secure {
|
||
|
domain = "https://"
|
||
|
}
|
||
|
return domain + global.S3Setting.Endpoint + "/" + global.S3Setting.Bucket + "/"
|
||
|
}
|
||
|
return ""
|
||
|
}
|