Adding error support to all commands in storage interface

This commit is contained in:
Frederick F. Kautz IV
2015-01-25 15:35:08 -08:00
parent d37bbfec41
commit 2368e7c936
5 changed files with 36 additions and 17 deletions

View File

@@ -24,14 +24,14 @@ import (
type Storage interface {
// Bucket Operations
ListBuckets(prefix string) ([]BucketMetadata, error)
StoreBucket(bucket string) error
ListBuckets(prefix string) []BucketMetadata
// Object Operations
GetObjectMetadata(bucket string, object string) (ObjectMetadata, error)
CopyObjectToWriter(w io.Writer, bucket string, object string) (int64, error)
GetObjectMetadata(bucket string, object string) (ObjectMetadata, error)
ListObjects(bucket, prefix string, count int) ([]ObjectMetadata, bool, error)
StoreObject(bucket string, key string, data io.Reader) error
ListObjects(bucket, prefix string, count int) ([]ObjectMetadata, bool)
}
type BucketMetadata struct {