updated to buckete.minio.store virtual host style

This commit is contained in:
Michael Hohn
2025-03-26 09:02:08 -07:00
committed by =Michael Hohn
parent 8d4c766e8c
commit 47a021d84a
4 changed files with 19 additions and 18 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"io"
"log/slog"
"github.com/hohn/mrvacommander/pkg/common"
"github.com/minio/minio-go/v7"
@@ -14,7 +15,7 @@ import (
// XX: static types: split by type?
// Restrict the keys / values and centralize the common ones here
const (
QL_DB_BUCKETNAME = "qldb"
QL_DB_BUCKETNAME = "mrvabucket"
)
type MinIOCodeQLDatabaseStore struct {
@@ -24,8 +25,9 @@ type MinIOCodeQLDatabaseStore struct {
func NewMinIOCodeQLDatabaseStore(endpoint, id, secret string) (*MinIOCodeQLDatabaseStore, error) {
minioClient, err := minio.New(endpoint, &minio.Options{
Creds: credentials.NewStaticV4(id, secret, ""),
Secure: false,
Creds: credentials.NewStaticV4(id, secret, ""),
Secure: false,
BucketLookup: minio.BucketLookupDNS, // Enable virtual-host-style addressing
})
if err != nil {
return nil, err