https://github.com/indiependente/s3stream
Streaming client for Amazon AWS S3
https://github.com/indiependente/s3stream
aws aws-s3 golang streaming
Last synced: 10 months ago
JSON representation
Streaming client for Amazon AWS S3
- Host: GitHub
- URL: https://github.com/indiependente/s3stream
- Owner: indiependente
- License: mit
- Created: 2019-03-03T02:11:24.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-06-01T21:33:46.000Z (about 2 years ago)
- Last Synced: 2024-06-21T01:49:39.901Z (about 2 years ago)
- Topics: aws, aws-s3, golang, streaming
- Language: Go
- Size: 49.5 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://goreportcard.com/report/github.com/indiependente/s3stream)
[](https://godoc.org/github.com/indiependente/s3stream)
# s3stream
## What is it?
**Streaming client for Amazon AWS S3**
Golang library that allows Get and Put operations from/to Amazon S3 in streaming fashion.
## How to install
```
go get github.com/indiependente/s3stream
```
## Usage
Get:
```go
rc, err := store.Get(prefix, bucketname, filename)
```
`rc` is an `io.ReadCloser` which you can stream from.
Put:
```go
n, err := store.Put(prefix, bucketname, filename, r)
```
`r` is an `io.Reader` and Put will stream its content to the specified file in the desired bucket.
Look at the tests for more info on its usage.
You can run the tests locally by using Minio (https://github.com/minio/minio).
Example:
```shell
docker run --rm --name minio -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
-e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" -p 9000:9000 \
-d minio/minio server /data
go test ./...
```