[new] list command

This commit is contained in:
sorosz committed 2022-09-10 20:54:48 +02:00
1 parent 041a7c4268
commit 713f7196cf
9 files changed
+292

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
package util
import (
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
)
type S3 struct {
Endpoint string
AccessKeyID string
SecretAccessKey string
UseSSL bool
Client *minio.Client
}
func (s *S3) Init() error {
var err error
s.Client, err = minio.New(s.Endpoint, &minio.Options{
Creds: credentials.NewStaticV4(s.AccessKeyID, s.SecretAccessKey, ""),
Secure: s.UseSSL,
})
if err != nil {
return err
}
return nil
}