diff --git a/pkg/object/search.go b/pkg/object/search.go index 5d59e1a8..208fcf48 100644 --- a/pkg/object/search.go +++ b/pkg/object/search.go @@ -15,12 +15,18 @@ type SearchMatchType uint32 const ( MatchUnknown SearchMatchType = iota MatchStringEqual + MatchStringNotEqual + MatchNotPresent ) func (m SearchMatchType) ToV2() v2object.MatchType { switch m { case MatchStringEqual: return v2object.MatchStringEqual + case MatchStringNotEqual: + return v2object.MatchStringNotEqual + case MatchNotPresent: + return v2object.MatchNotPresent default: return v2object.MatchUnknown } @@ -30,6 +36,10 @@ func SearchMatchFromV2(t v2object.MatchType) (m SearchMatchType) { switch t { case v2object.MatchStringEqual: m = MatchStringEqual + case v2object.MatchStringNotEqual: + m = MatchStringNotEqual + case v2object.MatchNotPresent: + m = MatchNotPresent default: m = MatchUnknown } diff --git a/pkg/object/search_test.go b/pkg/object/search_test.go index 48291060..573d06be 100644 --- a/pkg/object/search_test.go +++ b/pkg/object/search_test.go @@ -12,8 +12,10 @@ import ( var ( eqV2Matches = map[object.SearchMatchType]v2object.MatchType{ - object.MatchUnknown: v2object.MatchUnknown, - object.MatchStringEqual: v2object.MatchStringEqual, + object.MatchUnknown: v2object.MatchUnknown, + object.MatchStringEqual: v2object.MatchStringEqual, + object.MatchStringNotEqual: v2object.MatchStringNotEqual, + object.MatchNotPresent: v2object.MatchNotPresent, } ) diff --git a/v2/object/grpc/service.pb.go b/v2/object/grpc/service.pb.go index 890ac966..8f0ea63c 100644 Binary files a/v2/object/grpc/service.pb.go and b/v2/object/grpc/service.pb.go differ diff --git a/v2/object/grpc/types.pb.go b/v2/object/grpc/types.pb.go index 1109640a..b7fdd95a 100644 Binary files a/v2/object/grpc/types.pb.go and b/v2/object/grpc/types.pb.go differ diff --git a/v2/object/types.go b/v2/object/types.go index 3c258eb5..bed48d45 100644 --- a/v2/object/types.go +++ b/v2/object/types.go @@ -226,6 +226,8 @@ const ( const ( MatchUnknown MatchType = iota MatchStringEqual + MatchStringNotEqual + MatchNotPresent ) func (h *ShortHeader) GetVersion() *refs.Version {