diff --git a/container/service.proto b/container/service.proto index 0749926..fae6d4c 100644 --- a/container/service.proto +++ b/container/service.proto @@ -21,8 +21,8 @@ service ContainerService { // is added into smart contract storage. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // request to save the container has been sent to the sidechain; + // - **OK** (0, SECTION_SUCCESS): \ + // request to save the container has been sent to the sidechain; // - Common failures (SECTION_FAILURE_COMMON). rpc Put(PutRequest) returns (PutResponse); @@ -32,26 +32,26 @@ service ContainerService { // is added into smart contract storage. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // request to remove the container has been sent to the sidechain; + // - **OK** (0, SECTION_SUCCESS): \ + // request to remove the container has been sent to the sidechain; // - Common failures (SECTION_FAILURE_COMMON). rpc Delete(DeleteRequest) returns (DeleteResponse); // Returns container structure from `Container` smart contract storage. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // container has been successfully read; + // - **OK** (0, SECTION_SUCCESS): \ + // container has been successfully read; // - Common failures (SECTION_FAILURE_COMMON); - // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): - // requested container not found. + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // requested container not found. rpc Get(GetRequest) returns (GetResponse); // Returns all owner's containers from 'Container` smart contract' storage. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // container list has been successfully read; + // - **OK** (0, SECTION_SUCCESS): \ + // container list has been successfully read; // - Common failures (SECTION_FAILURE_COMMON). rpc List(ListRequest) returns (ListResponse); @@ -60,8 +60,8 @@ service ContainerService { // added into smart contract storage. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // request to save container eACL has been sent to the sidechain; + // - **OK** (0, SECTION_SUCCESS): \ + // request to save container eACL has been sent to the sidechain; // - Common failures (SECTION_FAILURE_COMMON). rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse); @@ -69,18 +69,18 @@ service ContainerService { // storage. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // container eACL has been successfully read; + // - **OK** (0, SECTION_SUCCESS): \ + // container eACL has been successfully read; // - Common failures (SECTION_FAILURE_COMMON); - // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): - // container not found. + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // container not found. rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse); // Announce container used space values for P2P synchronization. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // estimation of used space has been successfully announced; + // - **OK** (0, SECTION_SUCCESS): \ + // estimation of used space has been successfully announced; // - Common failures (SECTION_FAILURE_COMMON). rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) returns (AnnounceUsedSpaceResponse); } diff --git a/object/service.proto b/object/service.proto index 061050f..4170e1d 100644 --- a/object/service.proto +++ b/object/service.proto @@ -20,19 +20,19 @@ service ObjectService { // keeping receiving order. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // object has been successfully read; + // - **OK** (0, SECTION_SUCCESS): \ + // object has been successfully read; // - Common failures (SECTION_FAILURE_COMMON); - // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): - // object container not found; - // - **ACCESS_DENIED** (2048, SECTION_OBJECT): - // read access to the object is denied; - // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): - // object not found in container; - // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired; - // - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): - // the requested object has been marked as deleted. + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object container not found; + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // read access to the object is denied; + // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + // object not found in container; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // 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 @@ -43,41 +43,41 @@ service ObjectService { // Chunk messages SHOULD be sent in direct order of fragmentation. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // object has been successfully saved in the container; + // - **OK** (0, SECTION_SUCCESS): \ + // object has been successfully saved in the container; // - Common failures (SECTION_FAILURE_COMMON); - // - **LOCKED** (2050, SECTION_OBJECT): - // placement of an object of type TOMBSTONE that includes at least one locked - // object is prohibited; - // - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): - // placement of an object of type LOCK that includes at least one object of - // type other than REGULAR is prohibited; - // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): - // object storage container not found; - // - **ACCESS_DENIED** (2048, SECTION_OBJECT): - // write access to the container is denied; - // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): - // (for trusted object preparation) session private key does not exist or has + // - **LOCKED** (2050, SECTION_OBJECT): \ + // placement of an object of type TOMBSTONE that includes at least one locked + // object is prohibited; + // - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \ + // placement of an object of type LOCK that includes at least one object of + // type other than REGULAR is prohibited; + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object storage container not found; + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // write access to the container is denied; + // - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ + // (for trusted object preparation) session private key does not exist or has // been deleted; - // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired. + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // provided session token has expired. rpc Put(stream PutRequest) returns (PutResponse); // Delete the object from a container. There is no immediate removal // guarantee. Object will be marked for removal and deleted eventually. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // object has been successfully marked to be removed from the container; + // - **OK** (0, SECTION_SUCCESS): \ + // object has been successfully marked to be removed from the container; // - Common failures (SECTION_FAILURE_COMMON); - // - **LOCKED** (2050, SECTION_OBJECT): - // deleting a locked object is prohibited; - // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): - // object container not found; - // - **ACCESS_DENIED** (2048, SECTION_OBJECT): - // delete access to the object is denied; - // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired. + // - **LOCKED** (2050, SECTION_OBJECT): \ + // deleting a locked object is prohibited; + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object container not found; + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // delete access to the object is denied; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // provided session token has expired. rpc Delete(DeleteRequest) returns (DeleteResponse); // Returns the object Headers without data payload. By default full header is @@ -85,19 +85,19 @@ service ObjectService { // the very minimal information would be returned instead. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // object header has been successfully read; + // - **OK** (0, SECTION_SUCCESS): \ + // object header has been successfully read; // - Common failures (SECTION_FAILURE_COMMON); - // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): - // object container not found; - // - **ACCESS_DENIED** (2048, SECTION_OBJECT): - // access to operation HEAD of the object is denied; - // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): - // object not found in container; - // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired; - // - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): - // the requested object has been marked as deleted. + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object container not found; + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // access to operation HEAD of the object is denied; + // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + // object not found in container; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // 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 @@ -105,15 +105,15 @@ service ObjectService { // Specification section for more details. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // objects have been successfully selected; + // - **OK** (0, SECTION_SUCCESS): \ + // objects have been successfully selected; // - Common failures (SECTION_FAILURE_COMMON); - // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): - // search container not found; - // - **ACCESS_DENIED** (2048, SECTION_OBJECT): - // access to operation SEARCH of the object is denied; - // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired. + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // search container not found; + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // access to operation SEARCH of the object is denied; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // provided session token has expired. rpc Search(SearchRequest) returns (stream SearchResponse); // Get byte range of data payload. Range is set as an (offset, length) tuple. @@ -122,19 +122,19 @@ service ObjectService { // order. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // data range of the object payload has been successfully read; + // - **OK** (0, SECTION_SUCCESS): \ + // data range of the object payload has been successfully read; // - Common failures (SECTION_FAILURE_COMMON); - // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): - // object container not found; - // - **ACCESS_DENIED** (2048, SECTION_OBJECT): - // access to operation RANGE of the object is denied; - // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): - // object not found in container; - // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired; - // - **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): - // the requested object has been marked as deleted. + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object container not found; + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // access to operation RANGE of the object is denied; + // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + // object not found in container; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // 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 @@ -143,17 +143,17 @@ service ObjectService { // request. Note that hash is calculated for XORed data. // // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // data range of the object payload has been successfully hashed; + // - **OK** (0, SECTION_SUCCESS): \ + // data range of the object payload has been successfully hashed; // - Common failures (SECTION_FAILURE_COMMON); - // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): - // object container not found; - // - **ACCESS_DENIED** (2048, SECTION_OBJECT): - // access to operation RANGEHASH of the object is denied; - // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): - // object not found in container; - // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): - // provided session token has expired. + // - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + // object container not found; + // - **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + // access to operation RANGEHASH of the object is denied; + // - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + // object not found in container; + // - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + // provided session token has expired. rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); } diff --git a/proto-docs/container.md b/proto-docs/container.md index 13bd4db..80684db 100644 --- a/proto-docs/container.md +++ b/proto-docs/container.md @@ -85,8 +85,8 @@ verified by Inner Ring nodes. After one more block in sidechain, container is added into smart contract storage. Statuses: -- **OK** (0, SECTION_SUCCESS): -request to save the container has been sent to the sidechain; +- **OK** (0, SECTION_SUCCESS): \ + request to save the container has been sent to the sidechain; - Common failures (SECTION_FAILURE_COMMON). | Name | Input | Output | @@ -100,8 +100,8 @@ verified by Inner Ring nodes. After one more block in sidechain, container is added into smart contract storage. Statuses: -- **OK** (0, SECTION_SUCCESS): -request to remove the container has been sent to the sidechain; +- **OK** (0, SECTION_SUCCESS): \ + request to remove the container has been sent to the sidechain; - Common failures (SECTION_FAILURE_COMMON). | Name | Input | Output | @@ -112,9 +112,11 @@ request to remove the container has been sent to the sidechain; Returns container structure from `Container` smart contract storage. Statuses: -- **OK** (0, SECTION_SUCCESS): -container has been successfully read; -- Common failures (SECTION_FAILURE_COMMON). +- **OK** (0, SECTION_SUCCESS): \ + container has been successfully read; +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + requested container not found. | Name | Input | Output | | ---- | ----- | ------ | @@ -124,8 +126,8 @@ container has been successfully read; Returns all owner's containers from 'Container` smart contract' storage. Statuses: -- **OK** (0, SECTION_SUCCESS): -container list has been successfully read; +- **OK** (0, SECTION_SUCCESS): \ + container list has been successfully read; - Common failures (SECTION_FAILURE_COMMON). | Name | Input | Output | @@ -138,8 +140,8 @@ immediately. After one more block in sidechain, Extended ACL changes are added into smart contract storage. Statuses: -- **OK** (0, SECTION_SUCCESS): -request to save container eACL has been sent to the sidechain; +- **OK** (0, SECTION_SUCCESS): \ + request to save container eACL has been sent to the sidechain; - Common failures (SECTION_FAILURE_COMMON). | Name | Input | Output | @@ -151,9 +153,11 @@ Returns Extended ACL table and signature from `Container` smart contract storage. Statuses: -- **OK** (0, SECTION_SUCCESS): -container eACL has been successfully read; -- Common failures (SECTION_FAILURE_COMMON). +- **OK** (0, SECTION_SUCCESS): \ + container eACL has been successfully read; +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + container not found. | Name | Input | Output | | ---- | ----- | ------ | @@ -163,8 +167,8 @@ container eACL has been successfully read; Announce container used space values for P2P synchronization. Statuses: -- **OK** (0, SECTION_SUCCESS): -estimation of used space has been successfully announced; +- **OK** (0, SECTION_SUCCESS): \ + estimation of used space has been successfully announced; - Common failures (SECTION_FAILURE_COMMON). | Name | Input | Output | diff --git a/proto-docs/lock.md b/proto-docs/lock.md new file mode 100644 index 0000000..b23c734 --- /dev/null +++ b/proto-docs/lock.md @@ -0,0 +1,62 @@ +# Protocol Documentation + + +## Table of Contents + +- [lock/types.proto](#lock/types.proto) + + - Messages + - [Lock](#neo.fs.v2.lock.Lock) + + +- [Scalar Value Types](#scalar-value-types) + + + + +
+ +## lock/types.proto + + + + + + + +### Message Lock +Lock objects protects a list of objects from being deleted. Lifetime of the +lock object is limited similar to regular objects in +`__NEOFS__EXPIRATION_EPOCH` attribute. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| members | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of objects to lock. Must not be empty or carry empty IDs. All members must be of the `REGULAR` type. | + + + + + + + +## Scalar Value Types + +| .proto Type | Notes | C++ Type | Java Type | Python Type | +| ----------- | ----- | -------- | --------- | ----------- | +| double | | double | double | float | +| float | | float | float | float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | +| sfixed32 | Always four bytes. | int32 | int | int | +| sfixed64 | Always eight bytes. | int64 | long | int/long | +| bool | | bool | boolean | boolean | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | + diff --git a/proto-docs/object.md b/proto-docs/object.md index fa33d43..a483e8c 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -93,9 +93,19 @@ be restored by concatenation of object message payload and all chunks keeping receiving order. Statuses: -- **OK** (0, SECTION_SUCCESS): -object has been successfully read; -- Common failures (SECTION_FAILURE_COMMON). +- **OK** (0, SECTION_SUCCESS): \ + object has been successfully read; +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + object container not found; +- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + read access to the object is denied; +- **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + object not found in container; +- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + provided session token has expired; +- **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): \ + the requested object has been marked as deleted. | Name | Input | Output | | ---- | ----- | ------ | @@ -110,9 +120,24 @@ object payload. All messages, except first one, SHOULD be payload chunks. Chunk messages SHOULD be sent in direct order of fragmentation. Statuses: -- **OK** (0, SECTION_SUCCESS): -object has been successfully saved in the container; -- Common failures (SECTION_FAILURE_COMMON). +- **OK** (0, SECTION_SUCCESS): \ + object has been successfully saved in the container; +- Common failures (SECTION_FAILURE_COMMON); +- **LOCKED** (2050, SECTION_OBJECT): \ + placement of an object of type TOMBSTONE that includes at least one locked + object is prohibited; +- **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \ + placement of an object of type LOCK that includes at least one object of + type other than REGULAR is prohibited; +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + object storage container not found; +- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + write access to the container is denied; +- **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \ + (for trusted object preparation) session private key does not exist or has +been deleted; +- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + provided session token has expired. | Name | Input | Output | | ---- | ----- | ------ | @@ -123,9 +148,17 @@ Delete the object from a container. There is no immediate removal guarantee. Object will be marked for removal and deleted eventually. Statuses: -- **OK** (0, SECTION_SUCCESS): -object has been successfully marked to be removed from the container; -- Common failures (SECTION_FAILURE_COMMON). +- **OK** (0, SECTION_SUCCESS): \ + object has been successfully marked to be removed from the container; +- Common failures (SECTION_FAILURE_COMMON); +- **LOCKED** (2050, SECTION_OBJECT): \ + deleting a locked object is prohibited; +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + object container not found; +- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + delete access to the object is denied; +- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + provided session token has expired. | Name | Input | Output | | ---- | ----- | ------ | @@ -137,9 +170,19 @@ returned. If `main_only` request field is set, the short header with only the very minimal information would be returned instead. Statuses: -- **OK** (0, SECTION_SUCCESS): -object header has been successfully read; -- Common failures (SECTION_FAILURE_COMMON). +- **OK** (0, SECTION_SUCCESS): \ + object header has been successfully read; +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + object container not found; +- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + access to operation HEAD of the object is denied; +- **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + object not found in container; +- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + provided session token has expired; +- **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): \ + the requested object has been marked as deleted. | Name | Input | Output | | ---- | ----- | ------ | @@ -151,9 +194,15 @@ Header's filed values. Please see the corresponding NeoFS Technical Specification section for more details. Statuses: -- **OK** (0, SECTION_SUCCESS): -objects have been successfully selected; -- Common failures (SECTION_FAILURE_COMMON). +- **OK** (0, SECTION_SUCCESS): \ + objects have been successfully selected; +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + search container not found; +- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + access to operation SEARCH of the object is denied; +- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + provided session token has expired. | Name | Input | Output | | ---- | ----- | ------ | @@ -166,9 +215,19 @@ restored by concatenation of all received payload chunks keeping receiving order. Statuses: -- **OK** (0, SECTION_SUCCESS): -data range of the object payload has been successfully read; -- Common failures (SECTION_FAILURE_COMMON). +- **OK** (0, SECTION_SUCCESS): \ + data range of the object payload has been successfully read; +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + object container not found; +- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + access to operation RANGE of the object is denied; +- **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + object not found in container; +- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + provided session token has expired; +- **OBJECT_ALREADY_REMOVED** (2052, SECTION_OBJECT): \ + the requested object has been marked as deleted. | Name | Input | Output | | ---- | ----- | ------ | @@ -181,9 +240,17 @@ length) tuples. Hashes order in response corresponds to ranges order in request. Note that hash is calculated for XORed data. Statuses: -- **OK** (0, SECTION_SUCCESS): -data range of the object payload has been successfully hashed; -- Common failures (SECTION_FAILURE_COMMON). +- **OK** (0, SECTION_SUCCESS): \ + data range of the object payload has been successfully hashed; +- Common failures (SECTION_FAILURE_COMMON); +- **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \ + object container not found; +- **ACCESS_DENIED** (2048, SECTION_OBJECT): \ + access to operation RANGEHASH of the object is denied; +- **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \ + object not found in container; +- **TOKEN_EXPIRED** (4097, SECTION_SESSION): \ + provided session token has expired. | Name | Input | Output | | ---- | ----- | ------ | @@ -780,6 +847,9 @@ Object structure. Object is immutable and content-addressed. It means `ObjectID` will change if header or payload changes. It's calculated as a hash of header field, which contains hash of object's payload. +For non-regular object types payload format depends on object type specified +in the header. + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | @@ -843,19 +913,21 @@ Type of match expression ### ObjectType Type of the object payload content. Only `REGULAR` type objects can be split, -hence `TOMBSTONE` and `STORAGE_GROUP` payload is limited by maximal object -size. +hence `TOMBSTONE`, `STORAGE_GROUP` and `LOCK` payload is limited by maximal +object size. String presentation of object type is the same as definition: * REGULAR * TOMBSTONE * STORAGE_GROUP +* LOCK | Name | Number | Description | | ---- | ------ | ----------- | | REGULAR | 0 | Just a normal object | | TOMBSTONE | 1 | Used internally to identify deleted objects | | STORAGE_GROUP | 2 | StorageGroup information | +| LOCK | 3 | Object lock | diff --git a/proto-docs/status.md b/proto-docs/status.md index de1b44b..ea97ac7 100644 --- a/proto-docs/status.md +++ b/proto-docs/status.md @@ -109,8 +109,11 @@ Section of statuses for object-related operations. | Name | Number | Description | | ---- | ------ | ----------- | -| ACCESS_DENIED | 0 | [**2048**] Access denied by ACL. Details: - [**0**] Human-readable description. | +| ACCESS_DENIED | 0 | [**2048**] Access denied by ACL. Details: - [**0**] Human-readable description (UTF-8 encoded string). | | OBJECT_NOT_FOUND | 1 | [**2049**] Object not found. | +| LOCKED | 2 | [**2050**] Operation rejected by the object lock. | +| LOCK_NON_REGULAR_OBJECT | 3 | [**2051**] Locking an object with a non-REGULAR type rejected. | +| OBJECT_ALREADY_REMOVED | 4 | [**2052**] Object has been marked deleted. |