Adding etag to headers

This commit is contained in:
Frederick F. Kautz IV
2015-01-21 15:02:08 -08:00
parent e410337d26
commit 9ca1e37235
3 changed files with 12 additions and 0 deletions

View File

@@ -150,3 +150,9 @@ func isValidBucket(bucket string) bool {
}
return valid
}
func (storage *Storage) GetObjectMetadata(bucket, key string) mstorage.ObjectMetadata {
objectKey := bucket + ":" + key
return storage.objectdata[objectKey].metadata
}

View File

@@ -26,6 +26,7 @@ type Storage interface {
ListBuckets(prefix string) []BucketMetadata
// Object Operations
GetObjectMetadata(bucket string, object string) ObjectMetadata
CopyObjectToWriter(w io.Writer, bucket string, object string) (int64, error)
StoreObject(bucket string, key string, data io.Reader) error
ListObjects(bucket, prefix string, count int) []ObjectMetadata