start minIO, refactored files into packages

This commit is contained in:
2026-04-13 20:22:38 +02:00
parent 6435206683
commit c90c13b468
22 changed files with 311 additions and 218 deletions
+28
View File
@@ -0,0 +1,28 @@
package minio
import (
"context"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
)
func MinInit() {
ctx := context.Background()
dbConn, err := minio.New("localhost:9000", &minio.Options{
Creds: credentials.NewStaticV4("root", "change_to_env", ""),
Secure: false,
}) // TODO change in production
if err != nil {
panic(err)
}
exists, err := dbConn.BucketExists(ctx, "main")
if err != nil {
panic(err)
}
if !exists {
}
}