GitXplorerGitXplorer
a

fss3

public
55 stars
4 forks
2 issues

Commits

List of commits on branch master.
Verified
a7fb1f497f5f6e9257bd532c4c5d44fa842d218b

Bump golang.org/x/net from 0.17.0 to 0.23.0 (#4)

ddependabot[bot] committed 9 months ago
Verified
7c14e2b17bc9dff3df0710235d681d4db8c9a346

Bump golang.org/x/net from 0.7.0 to 0.17.0 (#3)

ddependabot[bot] committed a year ago
Verified
0d5c1874e7c7b5c2ab6d72c46db47154d5104cbd

chore: bump golang.org/x/crypto

aaymanbagabas committed 2 years ago
Verified
3c56c2fc424ec45f3355ed9b46c41af6cfe59bba

chore: bump golang.org/x/net

aaymanbagabas committed 2 years ago
Verified
25a95a656ec259bcb9bfc1f8c5d93329b793ae3d

feat: add Chmod()

aaymanbagabas committed 3 years ago
Verified
f242ccef131bf27ba4127d65f351b4d7eccf2810

ci: fix bucket creation

aaymanbagabas committed 3 years ago

README

The README file for this repository.

FSS3

Build Status Go version Go Reference Go Report Card GitHub release

FSS3 is an S3 filesystem abstraction layer for Golang that implements most of fs, and io interfaces, and os functions. It is based on minio-go which makes it compatible with any S3 compliant service.

Download

go get github.com/aymanbagabas/fss3

Quick Start

package main

import "github.com/aymanbagabas/fss3"

func main() {
	cfg := fss3.Config{
		AccessKeyID:     "AWS_ACCESS_KEY_ID",
		SecretAccessKey: "AWS_SECRET_ACCESS_KEY",
		Endpoint:        "ENDPOINT",
		UseSSL:          true,
		BucketName:      "MY_BUCKET_NAME",
		Region:          "REGION",
		DirFileName:     "_", // special directory file name that stores directory metadata
		Umask:           0, // Don't set umask
	}
	s3, err := fss3.New(cfg)
	if err != nil {
		panic(err)
	}

	err = s3.Mkdir("Newfolder", 0777)
	if err != nil {
		panic(err)
	}

	data := []byte{"hello world"}
	err = s3.WriteFile("Newfolder/myfile.txt", data, 0644)
	if err != nil {
		panic(err)
	}

	err = s3.RemoveAll("Newfolder")
	if err != nil {
		panic(err)
	}
}

License

This library is distributed under the MIT License, see LICENSE for more information.