[#191] v2: Add ObjectID filters for ACL and Object packages

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-11-10 13:43:25 +03:00 committed by Alex Vanin
parent fe48e3ab5b
commit abed8a9156
4 changed files with 12 additions and 0 deletions

View file

@ -29,6 +29,7 @@ type filterKeyType int
const (
_ filterKeyType = iota
fKeyObjVersion
fKeyObjID
fKeyObjContainerID
fKeyObjOwnerID
fKeyObjCreationEpoch
@ -74,6 +75,8 @@ func (k filterKey) String() string {
return k.str
case fKeyObjVersion:
return v2acl.FilterObjectVersion
case fKeyObjID:
return v2acl.FilterObjectID
case fKeyObjContainerID:
return v2acl.FilterObjectContainerID
case fKeyObjOwnerID:

View file

@ -61,6 +61,7 @@ type SearchFilters []SearchFilter
const (
_ filterKeyType = iota
fKeyVersion
fKeyObjectID
fKeyContainerID
fKeyOwnerID
fKeyCreationEpoch
@ -80,6 +81,8 @@ func (k filterKey) String() string {
return k.str
case fKeyVersion:
return v2object.FilterHeaderVersion
case fKeyObjectID:
return v2object.FilterHeaderObjectID
case fKeyContainerID:
return v2object.FilterHeaderContainerID
case fKeyOwnerID:

View file

@ -7,6 +7,9 @@ const (
// FilterObjectVersion is a filter key to "version" field of the object header.
FilterObjectVersion = ObjectFilterPrefix + "version"
// FilterObjectID is a filter key to "object_id" field of the object.
FilterObjectID = ObjectFilterPrefix + "objectID"
// FilterObjectContainerID is a filter key to "container_id" field of the object header.
FilterObjectContainerID = ObjectFilterPrefix + "containerID"

View file

@ -7,6 +7,9 @@ const (
// FilterHeaderVersion is a filter key to "version" field of the object header.
FilterHeaderVersion = ReservedFilterPrefix + "version"
// FilterHeaderObjectID is a filter key to "object_id" field of the object.
FilterHeaderObjectID = ReservedFilterPrefix + "objectID"
// FilterHeaderContainerID is a filter key to "container_id" field of the object header.
FilterHeaderContainerID = ReservedFilterPrefix + "containerID"