From 2f5f6f8fde8991d07e6193fb13aef975ec753b26 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 5 Aug 2020 17:39:57 +0300 Subject: [PATCH] [#31] refs: Define ContainerID message Define ContainerID message in refs package. In the future, this structure can be ported into messages in place of the container 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 | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/proto-docs/refs.md b/proto-docs/refs.md index 5947f70..06470a2 100644 --- a/proto-docs/refs.md +++ b/proto-docs/refs.md @@ -7,6 +7,7 @@ - Messages - [Address](#refs.Address) + - [ContainerID](#refs.ContainerID) - [ObjectID](#refs.ObjectID) @@ -35,6 +36,17 @@ Address of object (container id + object id) | CID | [bytes](#bytes) | | CID is container identifier | + + +### Message ContainerID +ContainerID groups information about the NeoFS container identifier. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| Value | [bytes](#bytes) | | Value carries the container identifier in a binary format. | + + ### Message ObjectID diff --git a/refs/types.proto b/refs/types.proto index 45e28a5..3f5c11a 100644 --- a/refs/types.proto +++ b/refs/types.proto @@ -22,4 +22,10 @@ message Address { message ObjectID { // Value carries the object identifier in a binary format. bytes Value = 1; -} \ No newline at end of file +} + +// ContainerID groups information about the NeoFS container identifier. +message ContainerID { + // Value carries the container identifier in a binary format. + bytes Value = 1; +}