Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.13 KB

README.md

File metadata and controls

43 lines (30 loc) · 1.13 KB

Go Report Card GoDoc

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:

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 ./...