diff --git a/object/service.proto b/object/service.proto index 4b2ec1f..146e631 100644 --- a/object/service.proto +++ b/object/service.proto @@ -305,6 +305,9 @@ message GetRequest { // If set, makes Get return payload only, completely omitting Init response // message with header data. bool payload_only = 4; + + // Requested extended payload range. MUST NOT be set together with `range`. + ExtendedRange extended_range = 5; } // Body of get object request message. Body body = 1; @@ -706,6 +709,17 @@ message Range { uint64 length = 2; } +// Extended object payload range. +message ExtendedRange { + // Offset of the first byte from the object payload start. If omitted, the + // range is defined by `last_pos` as the number of bytes from the payload end. + optional uint64 first_pos = 1; + + // Offset of the last byte from the object payload start. If omitted, the + // range starts at `first_pos` and extends to the end of the payload. + optional uint64 last_pos = 2; +} + // Request part of object's payload. // // The query for a parent object's EC part locally stored on the server is diff --git a/proto-docs/object.md b/proto-docs/object.md index 6ea928e..d16134b 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -12,6 +12,7 @@ - [DeleteRequest.Body](#neo.fs.v2.object.DeleteRequest.Body) - [DeleteResponse](#neo.fs.v2.object.DeleteResponse) - [DeleteResponse.Body](#neo.fs.v2.object.DeleteResponse.Body) + - [ExtendedRange](#neo.fs.v2.object.ExtendedRange) - [GetRangeHashRequest](#neo.fs.v2.object.GetRangeHashRequest) - [GetRangeHashRequest.Body](#neo.fs.v2.object.GetRangeHashRequest.Body) - [GetRangeHashResponse](#neo.fs.v2.object.GetRangeHashResponse) @@ -432,6 +433,18 @@ Object DELETE Response has an empty body. | tombstone | [neo.fs.v2.refs.Address](#neo.fs.v2.refs.Address) | | Address of the tombstone created for the deleted object | + + +### Message ExtendedRange +Extended object payload range. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| first_pos | [uint64](#uint64) | optional | Offset of the first byte from the object payload start. If omitted, the range is defined by `last_pos` as the number of bytes from the payload end. | +| last_pos | [uint64](#uint64) | optional | Offset of the last byte from the object payload start. If omitted, the range starts at `first_pos` and extends to the end of the payload. | + + ### Message GetRangeHashRequest @@ -595,6 +608,7 @@ GET Object request body | raw | [bool](#bool) | | If `raw` flag is set, request will work only with objects that are physically stored on the peer node | | range | [Range](#neo.fs.v2.object.Range) | | Requested payload range (whole payload if not specified). | | payload_only | [bool](#bool) | | If set, makes Get return payload only, completely omitting Init response message with header data. | +| extended_range | [ExtendedRange](#neo.fs.v2.object.ExtendedRange) | | Requested extended payload range. MUST NOT be set together with `range`. |