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.
20 lines
374 B
20 lines
374 B
4 months ago
|
package initialize
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
"service-api/global"
|
||
|
|
||
|
"github.com/minio/minio-go"
|
||
|
)
|
||
|
|
||
|
func Minio() {
|
||
|
minioCfg := global.MG_CONFIG.Minio
|
||
|
// Initialize minio client object.
|
||
|
minioClient, err := minio.New(minioCfg.Endpoint, minioCfg.AccessKeyID, minioCfg.SecretAccessKey, minioCfg.UseSSL)
|
||
|
if err != nil {
|
||
|
log.Fatalln(err)
|
||
|
return
|
||
|
}
|
||
|
global.MG_MINIO = minioClient
|
||
|
}
|