Adding content type to backend storage drivers

This commit is contained in:
Frederick F. Kautz IV
2015-02-04 17:32:40 -08:00
parent e5cd3dcb7c
commit 288bc3fcc7
6 changed files with 144 additions and 46 deletions

View File

@@ -31,7 +31,7 @@ type Storage interface {
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
StoreObject(bucket string, key string, contentType string, data io.Reader) error
}
type BucketMetadata struct {
@@ -40,11 +40,13 @@ type BucketMetadata struct {
}
type ObjectMetadata struct {
Bucket string
Key string
Created time.Time
Size int64
ETag string
Bucket string
Key string
ContentType string
Created time.Time
ETag string
Size int64
}
func IsValidBucket(bucket string) bool {