minio/pkg/donutbox/donutbox.go

27 lines
860 B
Go
Raw Normal View History

2015-03-14 21:02:19 -04:00
package donutbox
import "io"
// DonutBox is an interface specifying how the storage driver should interact with its underlying system.
type DonutBox interface {
// system operations
ListBuckets() ([]string, error)
// bucket operations
CreateBucket(bucket string) error
2015-03-15 03:41:06 -04:00
ListObjectsInBucket(bucket, prefix string) ([]string, error)
GetBucketMetadata(bucket string) (map[string]string, error)
SetBucketMetadata(bucket string, metadata map[string]string) error
2015-03-14 21:02:19 -04:00
// object operations
2015-03-14 22:21:27 -04:00
GetObjectWriter(bucket, object string, column, blockSize uint) *io.PipeWriter
2015-03-14 21:02:19 -04:00
GetObjectReader(bucket, object string, column int) (io.Reader, error)
2015-03-15 03:41:06 -04:00
SetObjectMetadata(bucket, object string, metadata map[string]string) error
GetObjectMetadata(bucket, object string) (map[string]string, error)
2015-03-14 21:02:19 -04:00
}
// Result is a result for async tasks
type Result struct {
Err error
}