forked from TrueCloudLab/frostfs-api
[#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 <leonard@nspcc.ru>
This commit is contained in:
parent
b46011db45
commit
96924b04dc
2 changed files with 18 additions and 0 deletions
|
@ -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 |
|
||||
|
||||
|
||||
<a name="refs.ObjectID"></a>
|
||||
|
||||
### 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. |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
<!-- end enums -->
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in a new issue