mirror of
https://github.com/minio/minio.git
synced 2025-01-23 20:53:18 -05:00
Merge pull request #124 from fkautz/pr_out_objectdescription_is_now_more_exact_only_exposes_necessary_details
ObjectDescription is now more exact, only exposes necessary details.
This commit is contained in:
commit
9ea907e062
@ -139,8 +139,7 @@ func (aStorage *appendStorage) List() ([]storage.ObjectDescription, error) {
|
|||||||
var objectDescription storage.ObjectDescription
|
var objectDescription storage.ObjectDescription
|
||||||
objectDescription.Name = objectName
|
objectDescription.Name = objectName
|
||||||
objectDescription.Md5sum = ""
|
objectDescription.Md5sum = ""
|
||||||
objectDescription.Hash = ""
|
objectDescription.Murmur3 = ""
|
||||||
objectDescription.Protectionlevel = ""
|
|
||||||
objectDescList = append(objectDescList, objectDescription)
|
objectDescList = append(objectDescList, objectDescription)
|
||||||
}
|
}
|
||||||
if len(objectDescList) == 0 {
|
if len(objectDescList) == 0 {
|
||||||
|
@ -120,11 +120,10 @@ func (eStorage *encodedStorage) List() ([]storage.ObjectDescription, error) {
|
|||||||
var objectDescList []storage.ObjectDescription
|
var objectDescList []storage.ObjectDescription
|
||||||
for objectName, objectEntry := range eStorage.objects {
|
for objectName, objectEntry := range eStorage.objects {
|
||||||
var objectDescription storage.ObjectDescription
|
var objectDescription storage.ObjectDescription
|
||||||
protectionLevel := strconv.Itoa(objectEntry.Encoderparams.K) + "," + strconv.Itoa(objectEntry.Encoderparams.M)
|
//protectionLevel := strconv.Itoa(objectEntry.Encoderparams.K) + "," + strconv.Itoa(objectEntry.Encoderparams.M)
|
||||||
objectDescription.Name = objectName
|
objectDescription.Name = objectName
|
||||||
objectDescription.Md5sum = hex.EncodeToString(objectEntry.Md5sum)
|
objectDescription.Md5sum = hex.EncodeToString(objectEntry.Md5sum)
|
||||||
objectDescription.Hash = strconv.FormatUint(objectEntry.Murmurhash, 16)
|
objectDescription.Murmur3 = strconv.FormatUint(objectEntry.Murmurhash, 16)
|
||||||
objectDescription.Protectionlevel = protectionLevel
|
|
||||||
objectDescList = append(objectDescList, objectDescription)
|
objectDescList = append(objectDescList, objectDescription)
|
||||||
}
|
}
|
||||||
if len(objectDescList) == 0 {
|
if len(objectDescList) == 0 {
|
||||||
|
@ -84,8 +84,7 @@ func (fsStorage *fileSystemStorage) List() ([]storage.ObjectDescription, error)
|
|||||||
var objectDescription storage.ObjectDescription
|
var objectDescription storage.ObjectDescription
|
||||||
objectDescription.Name = objectName
|
objectDescription.Name = objectName
|
||||||
objectDescription.Md5sum = hex.EncodeToString(objectEntry.Md5sum)
|
objectDescription.Md5sum = hex.EncodeToString(objectEntry.Md5sum)
|
||||||
objectDescription.Hash = strconv.FormatUint(objectEntry.Murmurhash, 16)
|
objectDescription.Murmur3 = strconv.FormatUint(objectEntry.Murmurhash, 16)
|
||||||
objectDescription.Protectionlevel = ""
|
|
||||||
objectDescList = append(objectDescList, objectDescription)
|
objectDescList = append(objectDescList, objectDescription)
|
||||||
}
|
}
|
||||||
if len(objectDescList) == 0 {
|
if len(objectDescList) == 0 {
|
||||||
|
@ -12,6 +12,5 @@ type ObjectStorage interface {
|
|||||||
type ObjectDescription struct {
|
type ObjectDescription struct {
|
||||||
Name string
|
Name string
|
||||||
Md5sum string
|
Md5sum string
|
||||||
Protectionlevel string
|
Murmur3 string
|
||||||
Hash string
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user