contrato: M2M infra linking (servidores, conx_dbs, ai_configs)

This commit is contained in:
Lizandro Guarnizo
2026-06-10 00:18:31 -05:00
parent 478c2bde00
commit 03eb6d874e
4 changed files with 152 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
package main
import (
"context"
"fmt"
"log"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
)
func main() {
minioClient, err := minio.New("135.181.2.237:9000", &minio.Options{
Creds: credentials.NewStaticV4("admin", "lsE6TAihW98iaXKDWG+6gGLYAFdyp2iC", ""),
Secure: false,
BucketLookup: minio.BucketLookupPath,
})
if err != nil {
log.Fatalf("Error: %v", err)
}
ctx := context.Background()
var count int64
opts := minio.ListObjectsOptions{Recursive: true}
for obj := range minioClient.ListObjects(ctx, "vcard-usite", opts) {
if obj.Err != nil {
log.Fatalf("Error: %v", obj.Err)
}
count++
if count%500 == 0 {
fmt.Printf("MinIO: %d objetos...\n", count)
}
}
fmt.Printf("\nTotal en MinIO: %d objetos\n", count)
}