Skip to content

Small tool to interact with your S3-compatible Cloud Object Storage and perform various operations

License

Notifications You must be signed in to change notification settings

shahzadhaider1/go-bucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-bucket

A small tool to interact with your S3-compatible Cloud Object Storage and perform various operations.

Usage

Here is how you can use this in your code:

  1. Create a new file main.go and paste the following code in it
  2. Run go mod tidy
  3. Run go run main.go
package main

import (
	"fmt"

	"github.com/shahzadhaider1/go-bucket/bucket"
)

func main() {
	creds := &bucket.Credentials{
		AccessKey:  "access_key",
		SecretKey:  "secret_key",
		Endpoint:   "endpoint",
		BucketName: "bucket_name",
	}

	if err := creds.ClearBucket(); err != nil {
		fmt.Println("failed to clear bucket, err : ", err)
	}

}

About

Small tool to interact with your S3-compatible Cloud Object Storage and perform various operations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages