2019-08-28 10:07:50 +09:00
|
|
|
package arn
|
|
|
|
|
2024-08-09 12:09:51 +02:00
|
|
|
// import (
|
|
|
|
// "log"
|
2019-08-28 10:07:50 +09:00
|
|
|
|
2024-08-09 12:09:51 +02:00
|
|
|
// "github.com/minio/minio-go/v7"
|
|
|
|
// "github.com/minio/minio-go/v7/pkg/credentials"
|
|
|
|
// )
|
2019-08-28 10:07:50 +09:00
|
|
|
|
2024-08-09 12:09:51 +02:00
|
|
|
// // Spaces represents our file storage server.
|
|
|
|
// var Spaces *minio.Client
|
2019-08-28 10:07:50 +09:00
|
|
|
|
2024-08-09 12:09:51 +02:00
|
|
|
// // initSpaces starts our file storage client.
|
|
|
|
// func initSpaces() {
|
|
|
|
// if APIKeys.S3.ID == "" || APIKeys.S3.Secret == "" {
|
|
|
|
// return
|
|
|
|
// }
|
2019-08-28 10:07:50 +09:00
|
|
|
|
2024-08-09 12:09:51 +02:00
|
|
|
// go func() {
|
|
|
|
// var err error
|
|
|
|
// endpoint := "sfo2.digitaloceanspaces.com"
|
2019-08-28 10:07:50 +09:00
|
|
|
|
2024-08-09 12:09:51 +02:00
|
|
|
// // Initiate a client using DigitalOcean Spaces.
|
|
|
|
// Spaces, err = minio.New(endpoint, &minio.Options{
|
|
|
|
// Secure: true,
|
|
|
|
// Creds: credentials.NewStaticV4(APIKeys.S3.ID, APIKeys.S3.Secret, ""),
|
|
|
|
// })
|
2019-08-28 10:07:50 +09:00
|
|
|
|
2024-08-09 12:09:51 +02:00
|
|
|
// if err != nil {
|
|
|
|
// log.Fatal(err)
|
|
|
|
// }
|
|
|
|
// }()
|
|
|
|
// }
|