diff options
| author | Jeff Carr <[email protected]> | 2024-12-23 01:34:56 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-23 01:34:56 -0600 |
| commit | 91060915d061674def0bbf5d3c6464c62c9eba68 (patch) | |
| tree | b5561d7149f948960dd08c443e4f7b65f96706b4 /cf-r2 | |
| parent | c5fb46c60d4a0383e0e3586bd2d4968e8a8907b7 (diff) | |
maybe use cloudflare R2
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'cf-r2')
| -rw-r--r-- | cf-r2/main.go | 26 |
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 +} |
