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-08-12 15:13:07 +02:00
|
|
|
//go:generate moq -out mocks/s3.go -pkg mocks . S3
|
2018-04-24 22:35:21 +02:00
|
|
|
|
2017-05-08 23:07:07 +02:00
|
|
|
// S3 is a client to interact with S3 storage.
|
|
|
|
type S3 interface {
|
2018-08-02 15:41:18 +02:00
|
|
|
GetObject(bucketName, objectName string, opts minio.GetObjectOptions) (*minio.Object, error)
|
2017-04-02 17:10:36 +02:00
|
|
|
ListBuckets() ([]minio.BucketInfo, error)
|
2018-08-02 15:41:18 +02:00
|
|
|
ListObjectsV2(bucketName, objectPrefix string, recursive bool, doneCh <-chan struct{}) <-chan minio.ObjectInfo
|
|
|
|
MakeBucket(bucketName, location string) error
|
|
|
|
PutObject(bucketName, objectName string, reader io.Reader, objectSize int64, opts minio.PutObjectOptions) (int64, error)
|
|
|
|
RemoveBucket(bucketName string) error
|
|
|
|
RemoveObject(bucketName, objectName string) error
|
2017-04-02 17:10:36 +02:00
|
|
|
}
|