summaryrefslogtreecommitdiff
path: root/cf-r2/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-06 03:05:47 -0600
committerJeff Carr <[email protected]>2025-01-06 03:05:47 -0600
commit35bec795e7195e967d95399329fe7b6d0b7cc069 (patch)
tree3f1085a03ff5398a4299886342a6802e6b6f4822 /cf-r2/main.go
parent8f9b66f6c8565f08e18098e330dfe73c22592b9f (diff)
parent98b0d445bc513c5439421d1ec0d32874fc1350f9 (diff)
Merge branch 'jcarr' of gitea.wit.com:jcarr/wit-utils into jcarr
Diffstat (limited to 'cf-r2/main.go')
-rw-r--r--cf-r2/main.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/cf-r2/main.go b/cf-r2/main.go
new file mode 100644
index 0000000..ce3c910
--- /dev/null
+++ b/cf-r2/main.go
@@ -0,0 +1,26 @@
+package main
+
+import (
+ "log"
+
+ "github.com/minio/minio-go/v7"
+ "github.com/minio/minio-go/v7/pkg/credentials"
+)
+
+func main() {
+ endpoint := "play.min.io"
+ accessKeyID := "Q3AM3UQ867SPQQA43P2F"
+ secretAccessKey := "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
+ useSSL := true
+
+ // Initialize minio client object.
+ minioClient, err := minio.New(endpoint, &minio.Options{
+ Creds: credentials.NewStaticV4(accessKeyID, secretAccessKey, ""),
+ Secure: useSSL,
+ })
+ if err != nil {
+ log.Fatalln(err)
+ }
+
+ log.Printf("%#v\n", minioClient) // minioClient is now set up
+}