add minio and file upload
This commit is contained in:
1 parent
be3dc28e68
commit
d6555e1133
364 files changed
+137053
-22
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package minio
|
||||
|
||||
import (
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio-go/v7/pkg/credentials"
|
||||
)
|
||||
|
||||
// Connect initializes a MinIO client using the given credentials. Callers
|
||||
// are expected to source endpoint/accessKey/secretKey from configuration
|
||||
// rather than hardcoding them.
|
||||
func Connect(endpoint, accessKey, secretKey string, useSSL bool) (*minio.Client, error) {
|
||||
return minio.New(endpoint, &minio.Options{
|
||||
Creds: credentials.NewStaticV4(accessKey, secretKey, ""),
|
||||
Secure: useSSL,
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user