forked from TrueCloudLab/frostfs-node
[#88] object/search: Use String() methods to calculate ID values
Replace hex encoding of IDs with String() call (base58) in search query processing. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
ca986fc5ff
commit
5318abcf38
1 changed files with 3 additions and 5 deletions
|
@ -1,8 +1,6 @@
|
||||||
package query
|
package query
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/hex"
|
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-api-go/pkg/container"
|
"github.com/nspcc-dev/neofs-api-go/pkg/container"
|
||||||
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||||
"github.com/nspcc-dev/neofs-api-go/pkg/owner"
|
"github.com/nspcc-dev/neofs-api-go/pkg/owner"
|
||||||
|
@ -21,15 +19,15 @@ func New(filters objectSDK.SearchFilters) query.Query {
|
||||||
}
|
}
|
||||||
|
|
||||||
func idValue(id *objectSDK.ID) string {
|
func idValue(id *objectSDK.ID) string {
|
||||||
return hex.EncodeToString(id.ToV2().GetValue())
|
return id.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
func cidValue(id *container.ID) string {
|
func cidValue(id *container.ID) string {
|
||||||
return hex.EncodeToString(id.ToV2().GetValue())
|
return id.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
func ownerIDValue(id *owner.ID) string {
|
func ownerIDValue(id *owner.ID) string {
|
||||||
return hex.EncodeToString(id.ToV2().GetValue())
|
return id.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *Query) Match(obj *object.Object, handler func(*objectSDK.ID)) {
|
func (q *Query) Match(obj *object.Object, handler func(*objectSDK.ID)) {
|
||||||
|
|
Loading…
Reference in a new issue