[#190] status: Add OBJECT_ALREADY_REMOVED code

Add `OBJECT_ALREADY_REMOVED` value to `Object` enumeration. Return this
status from object GET/HEAD/RANGE operations.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-02-21 18:58:34 +03:00 committed by LeL
parent 83b0eef37d
commit fc79cd18cc
2 changed files with 12 additions and 3 deletions

View file

@ -30,7 +30,9 @@ service ObjectService {
// - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT):
// object not found in container;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION):
// provided session token has expired.
// provided session token has expired;
// - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT):
// the requested object has been marked as deleted.
rpc Get(GetRequest) returns (stream GetResponse);
// Put the object into container. Request uses gRPC stream. First message
@ -93,7 +95,9 @@ service ObjectService {
// - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT):
// object not found in container;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION):
// provided session token has expired.
// provided session token has expired;
// - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT):
// the requested object has been marked as deleted.
rpc Head(HeadRequest) returns (HeadResponse);
// Search objects in container. Search query allows to match by Object
@ -128,7 +132,9 @@ service ObjectService {
// - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT):
// object not found in container;
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION):
// provided session token has expired.
// provided session token has expired;
// - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT):
// the requested object has been marked as deleted.
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
// Returns homomorphic or regular hash of object's payload range after

View file

@ -112,6 +112,9 @@ enum Object {
// [**2051**] Locking an object with a non-REGULAR type rejected.
LOCK_NON_REGULAR_OBJECT = 3;
// [**2052**] Object has been marked deleted.
OBJECT_ALREADY_REMOVED = 4;
}
// Section of statuses for container-related operations.