From d299d940498e7c3edb91b7d53421201a9c687387 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 29 Dec 2020 17:23:01 +0300 Subject: [PATCH] [#291] Remove unused pkg/services/object/search/query packages Signed-off-by: Leonard Lyubich --- pkg/services/object/search/query/query.go | 9 ------ pkg/services/object/search/query/v1/keys.go | 31 ------------------- pkg/services/object/search/query/v1/v1.go | 34 --------------------- 3 files changed, 74 deletions(-) delete mode 100644 pkg/services/object/search/query/query.go delete mode 100644 pkg/services/object/search/query/v1/keys.go delete mode 100644 pkg/services/object/search/query/v1/v1.go diff --git a/pkg/services/object/search/query/query.go b/pkg/services/object/search/query/query.go deleted file mode 100644 index 7c8dcc7ea..000000000 --- a/pkg/services/object/search/query/query.go +++ /dev/null @@ -1,9 +0,0 @@ -package query - -import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" -) - -type Query interface { - ToSearchFilters() objectSDK.SearchFilters -} diff --git a/pkg/services/object/search/query/v1/keys.go b/pkg/services/object/search/query/v1/keys.go deleted file mode 100644 index 7b866ce5a..000000000 --- a/pkg/services/object/search/query/v1/keys.go +++ /dev/null @@ -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 -} diff --git a/pkg/services/object/search/query/v1/v1.go b/pkg/services/object/search/query/v1/v1.go deleted file mode 100644 index b045986a9..000000000 --- a/pkg/services/object/search/query/v1/v1.go +++ /dev/null @@ -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 -}