Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aymanbagabas/fss3
FSS3 is an S3 filesystem abstraction layer for Golang
https://github.com/aymanbagabas/fss3
aws aws-s3 go golang minio minio-client s3
Last synced: 3 months ago
JSON representation
FSS3 is an S3 filesystem abstraction layer for Golang
- Host: GitHub
- URL: https://github.com/aymanbagabas/fss3
- Owner: aymanbagabas
- License: mit
- Created: 2021-08-20T20:40:55.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-20T00:51:23.000Z (9 months ago)
- Last Synced: 2024-10-16T19:46:37.945Z (3 months ago)
- Topics: aws, aws-s3, go, golang, minio, minio-client, s3
- Language: Go
- Homepage:
- Size: 53.7 KB
- Stars: 55
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FSS3
[![Build Status](https://github.com/aymanbagabas/fss3/actions/workflows/ci.yml/badge.svg)](https://github.com/aymanbagabas/fss3/actions/workflows/ci.yml)
[![Go version](https://img.shields.io/github/go-mod/go-version/aymanbagabas/fss3.svg)](https://github.com/aymanbagabas/fss3)
[![Go Reference](https://pkg.go.dev/badge/github.com/aymanbagabas/fss3.svg)](https://pkg.go.dev/github.com/aymanbagabas/fss3)
[![Go Report Card](https://goreportcard.com/badge/github.com/aymanbagabas/fss3)](https://goreportcard.com/report/github.com/aymanbagabas/fss3)
[![GitHub release](https://img.shields.io/github/release/aymanbagabas/fss3.svg)](https://GitHub.com/aymanbagabas/fss3/releases/)FSS3 is an S3 filesystem abstraction layer for Golang that implements most of [fs](https://pkg.go.dev/io/fs), and [io](https://pkg.go.dev/io) interfaces, and [os](https://pkg.go.dev/os) functions. It is based on [minio-go](https://github.com/minio/minio-go) which makes it compatible with any S3 compliant service.
## Download
```
go get github.com/aymanbagabas/fss3
```## Quick Start
```go
package mainimport "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](https://opensource.org/licenses/MIT), see [LICENSE](https://github.com/aymanbagabas/fss3/blob/master/LICENSE) for more information.