Streaming client for Amazon AWS S3
Golang library that allows Get and Put operations from/to Amazon S3 in streaming fashion.
go get github.com/indiependente/s3stream
Get:
rc, err := store.Get(prefix, bucketname, filename)
rc
is an io.ReadCloser
which you can stream from.
Put:
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:
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 ./...