[#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 ( const (
_ filterKeyType = iota _ filterKeyType = iota
fKeyObjVersion fKeyObjVersion
fKeyObjID
fKeyObjContainerID fKeyObjContainerID
fKeyObjOwnerID fKeyObjOwnerID
fKeyObjCreationEpoch fKeyObjCreationEpoch
@ -74,6 +75,8 @@ func (k filterKey) String() string {
return k.str return k.str
case fKeyObjVersion: case fKeyObjVersion:
return v2acl.FilterObjectVersion return v2acl.FilterObjectVersion
case fKeyObjID:
return v2acl.FilterObjectID
case fKeyObjContainerID: case fKeyObjContainerID:
return v2acl.FilterObjectContainerID return v2acl.FilterObjectContainerID
case fKeyObjOwnerID: case fKeyObjOwnerID:

View file

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

View file

@ -7,6 +7,9 @@ const (
// FilterObjectVersion is a filter key to "version" field of the object header. // FilterObjectVersion is a filter key to "version" field of the object header.
FilterObjectVersion = ObjectFilterPrefix + "version" 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 is a filter key to "container_id" field of the object header.
FilterObjectContainerID = ObjectFilterPrefix + "containerID" FilterObjectContainerID = ObjectFilterPrefix + "containerID"

View file

@ -7,6 +7,9 @@ const (
// FilterHeaderVersion is a filter key to "version" field of the object header. // FilterHeaderVersion is a filter key to "version" field of the object header.
FilterHeaderVersion = ReservedFilterPrefix + "version" 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 is a filter key to "container_id" field of the object header.
FilterHeaderContainerID = ReservedFilterPrefix + "containerID" FilterHeaderContainerID = ReservedFilterPrefix + "containerID"