mirror of
https://github.com/restic/restic.git
synced 2026-11-11 14:30:34 +00:00
Add ability to open bucket using S3 object for testing purposes.
This commit is contained in:
1 parent
b793261ba1
commit
4aa75994b0
2 files changed
+6
-1
No files matched your search
@@ -28,6 +28,11 @@ type S3 struct {
|
||||
path string
|
||||
}
|
||||
|
||||
// Open a backend using an S3 bucket object
|
||||
func OpenS3Bucket(bucket *s3.Bucket, bucketname string) *S3 {
|
||||
return &S3{bucket: bucket, path: bucketname}
|
||||
}
|
||||
|
||||
// Open opens the s3 backend at bucket and region.
|
||||
func Open(regionname, bucketname string) (*S3, error) {
|
||||
auth, err := aws.EnvAuth()
|
||||
|
||||
Reference in new issue
Block a user