[#291] Remove unused pkg/services/object/search/query packages

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-29 17:23:01 +03:00 committed by Alex Vanin
parent 0ce124a6e3
commit d299d94049
3 changed files with 0 additions and 74 deletions

View file

@ -1,9 +0,0 @@
package query
import (
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
)
type Query interface {
ToSearchFilters() objectSDK.SearchFilters
}

View file

@ -1,31 +0,0 @@
package query
import (
"github.com/nspcc-dev/neofs-api-go/pkg/object"
v2object "github.com/nspcc-dev/neofs-api-go/v2/object"
"github.com/nspcc-dev/neofs-node/pkg/services/object/search/query"
)
// FIXME: this is a temporary solution for object fields filters
// fixme: remove it, it is broken now
func NewRightChildQuery(par *object.ID) query.Query {
q := &Query{
filters: make(object.SearchFilters, 0, 2),
}
q.filters.AddFilter(v2object.FilterHeaderParent, idValue(par), object.MatchStringEqual)
return q
}
// fixme: remove it, it is broken now
func NewLinkingQuery(par *object.ID) query.Query {
q := &Query{
filters: make(object.SearchFilters, 0, 2),
}
q.filters.AddFilter(v2object.FilterHeaderParent, idValue(par), object.MatchStringEqual)
return q
}

View file

@ -1,34 +0,0 @@
package query
import (
"github.com/nspcc-dev/neofs-api-go/pkg/container"
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
"github.com/nspcc-dev/neofs-api-go/pkg/owner"
"github.com/nspcc-dev/neofs-node/pkg/services/object/search/query"
)
type Query struct {
filters objectSDK.SearchFilters
}
func New(filters objectSDK.SearchFilters) query.Query {
return &Query{
filters: filters,
}
}
func idValue(id *objectSDK.ID) string {
return id.String()
}
func cidValue(id *container.ID) string {
return id.String()
}
func ownerIDValue(id *owner.ID) string {
return id.String()
}
func (q *Query) ToSearchFilters() objectSDK.SearchFilters {
return q.filters
}