From 96924b04dc5cb287797a3d1e7b2975cffdd38c6c Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 4 Aug 2020 15:52:14 +0300 Subject: [PATCH] [#26] refs: Define ObjectID message This commit defines ObjectID message in refs package. In the future, this structure can be ported into messages in place of the object identifier field to maintain format uniformity. Also, storing the identifier in a dedicated message will allow, if necessary, to expand it with additional information without losing backward compatibility within one version of the API. Signed-off-by: Leonard Lyubich --- proto-docs/refs.md | 12 ++++++++++++ refs/types.proto | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/proto-docs/refs.md b/proto-docs/refs.md index b808482..94dbc86 100644 --- a/proto-docs/refs.md +++ b/proto-docs/refs.md @@ -7,6 +7,7 @@ - Messages - [Address](#refs.Address) + - [ObjectID](#refs.ObjectID) - [Scalar Value Types](#scalar-value-types) @@ -33,6 +34,17 @@ Address of object (container id + object id) | ObjectID | [bytes](#bytes) | | ObjectID is an object identifier, valid UUIDv4 represented in bytes | | CID | [bytes](#bytes) | | CID is container identifier | + + + +### Message ObjectID +ObjectID groups information about the NeoFS object identifier. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| Value | [bytes](#bytes) | | Value carries the object identifier in a binary format. | + diff --git a/refs/types.proto b/refs/types.proto index 6b001c0..dd78dc0 100644 --- a/refs/types.proto +++ b/refs/types.proto @@ -17,3 +17,9 @@ message Address { // CID is container identifier bytes CID = 2[(gogoproto.customtype) = "CID", (gogoproto.nullable) = false]; } + +// ObjectID groups information about the NeoFS object identifier. +message ObjectID { + // Value carries the object identifier in a binary format. + bytes Value = 1; +} \ No newline at end of file