forked from TrueCloudLab/frostfs-s3-gw
[#458] *: Refactor working with NeoFS identities
Pull latest changes from NeoFS SDK Go library. Decrease redundant and unsafe usage of ID pointers. Use `EncodeToString` method in order to calculate protocol strings. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3f0dbcc995
commit
087d500c5f
34 changed files with 259 additions and 280 deletions
|
@ -115,7 +115,7 @@ func objectInfoFromMeta(bkt *data.BucketInfo, meta *object.Object, prefix, delim
|
|||
objID, _ := meta.ID()
|
||||
payloadChecksum, _ := meta.PayloadChecksum()
|
||||
return &data.ObjectInfo{
|
||||
ID: &objID,
|
||||
ID: objID,
|
||||
CID: bkt.CID,
|
||||
IsDir: isDir,
|
||||
|
||||
|
@ -125,7 +125,7 @@ func objectInfoFromMeta(bkt *data.BucketInfo, meta *object.Object, prefix, delim
|
|||
CreationEpoch: meta.CreationEpoch(),
|
||||
ContentType: mimeType,
|
||||
Headers: userHeaders,
|
||||
Owner: meta.OwnerID(),
|
||||
Owner: *meta.OwnerID(),
|
||||
Size: size,
|
||||
HashSum: hex.EncodeToString(payloadChecksum.Value()),
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ func filenameFromObject(o *object.Object) string {
|
|||
}
|
||||
}
|
||||
objID, _ := o.ID()
|
||||
return objID.String()
|
||||
return objID.EncodeToString()
|
||||
}
|
||||
|
||||
// NameFromString splits name into a base file name and a directory path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue