2017-05-08 23:07:07 +02:00
|
|
|
package s3manager
|
2017-04-02 17:10:36 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
|
|
|
|
minio "github.com/minio/minio-go"
|
|
|
|
)
|
|
|
|
|
2018-04-24 22:35:21 +02:00
|
|
|
//go:generate moq -out s3_test.go -pkg s3manager_test . S3
|
|
|
|
|
2017-05-08 23:07:07 +02:00
|
|
|
// S3 is a client to interact with S3 storage.
|
|
|
|
type S3 interface {
|
2017-12-05 23:30:28 +01:00
|
|
|
GetObject(string, string, minio.GetObjectOptions) (*minio.Object, error)
|
2017-04-02 17:10:36 +02:00
|
|
|
ListBuckets() ([]minio.BucketInfo, error)
|
|
|
|
ListObjectsV2(string, string, bool, <-chan struct{}) <-chan minio.ObjectInfo
|
|
|
|
MakeBucket(string, string) error
|
2017-12-05 23:30:28 +01:00
|
|
|
PutObject(string, string, io.Reader, int64, minio.PutObjectOptions) (int64, error)
|
2017-04-02 17:10:36 +02:00
|
|
|
RemoveBucket(string) error
|
|
|
|
RemoveObject(string, string) error
|
|
|
|
}
|