-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdoc.go
30 lines (30 loc) · 1012 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Package s3io is an abstraction layer on the s3 sdk.
//
// The s3io package provides a bucket that can interact with all elements within the bucket.
// And can be configured with the "WithBucket..." options
//
// bucket, err := s3io.OpenBucket(ctx, "my-bucket-name", s3io.WithBucketCredentials("access-key", "secret-key"))
//
// There is an ObjectReader to preform read opperations on an s3 object.
//
// rd := bucket.NewReader(ctx, "path/to/object.txt", s3io.WithReaderConcurrency(10))
//
// _, err := io.Copy(os.Stdout, rd)
//
// And there is an ObjectWriter to preform write opperations on an s3 object.
// Note The writer MUST close to safe the object.
//
// wr := bucket.NewWriter(ctx, "path/to/object.txt")
// defer wr.Close()
//
// _, err := io.WriteString(wr, "Hello world!")
// if err != nil {
// return err
// }
//
// if err := wr.Close(); err != nil {
// return err
// }
//
// The s3io reader and writer stream the objects from and to your s3 instance while being memory efficient.
package s3io