From a76f634e475df2d0b55293e2e2a4285ad888321b Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 4 Aug 2020 12:53:33 +0300 Subject: [PATCH] [#26] object: Rename UserHeader to Attribute The name of object.UserHeader message implies its use by the user. However, the attributes of an object can also be set internally by the system. To generalize the intended purpose of the message, this commit renames it to an Attribute (like container.Attribute). Signed-off-by: Leonard Lyubich --- object/types.proto | 14 ++++++++------ proto-docs/object.md | 28 ++++++++++++++-------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/object/types.proto b/object/types.proto index 9680554..fe14a57 100644 --- a/object/types.proto +++ b/object/types.proto @@ -7,10 +7,12 @@ import "refs/types.proto"; import "service/verify.proto"; import "storagegroup/types.proto"; -message UserHeader { - // Key of the user's header - string Key = 1; - // Value of the user's header +// Attribute groups the parameters of the object attributes. +message Attribute { + // Key carries the string key to the object attribute. + string Key = 1; + + // Value carries the string value of the object attribute. string Value = 2; } @@ -20,8 +22,8 @@ message Header { Link Link = 1; // Redirect not used yet refs.Address Redirect = 2; - // UserHeader is a set of KV headers defined by user - UserHeader UserHeader = 3; + // Attribute is a set of K-V object attributes + Attribute Attribute = 3; // Transform defines transform operation (e.g. payload split) Transform Transform = 4; // Tombstone header that set up in deleted objects diff --git a/proto-docs/object.md b/proto-docs/object.md index 02eb026..2f0c482 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -29,6 +29,7 @@ - [object/types.proto](#object/types.proto) - Messages + - [Attribute](#object.Attribute) - [CreationPoint](#object.CreationPoint) - [Header](#object.Header) - [IntegrityHeader](#object.IntegrityHeader) @@ -38,7 +39,6 @@ - [SystemHeader](#object.SystemHeader) - [Tombstone](#object.Tombstone) - [Transform](#object.Transform) - - [UserHeader](#object.UserHeader) - [Scalar Value Types](#scalar-value-types) @@ -361,6 +361,18 @@ in distributed system. + + +### Message Attribute +Attribute groups the parameters of the object attributes. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| Key | [string](#string) | | Key carries the string key to the object attribute. | +| Value | [string](#string) | | Value carries the string value of the object attribute. | + + ### Message CreationPoint @@ -383,7 +395,7 @@ in distributed system. | ----- | ---- | ----- | ----------- | | Link | [Link](#object.Link) | | Link to other objects | | Redirect | [refs.Address](#refs.Address) | | Redirect not used yet | -| UserHeader | [UserHeader](#object.UserHeader) | | UserHeader is a set of KV headers defined by user | +| Attribute | [Attribute](#object.Attribute) | | Attribute is a set of K-V object attributes | | Transform | [Transform](#object.Transform) | | Transform defines transform operation (e.g. payload split) | | Tombstone | [Tombstone](#object.Tombstone) | | Tombstone header that set up in deleted objects | | Token | [service.Token](#service.Token) | | Token header contains token of the session within which the object was created | @@ -475,18 +487,6 @@ in distributed system. | ----- | ---- | ----- | ----------- | | type | [Transform.Type](#object.Transform.Type) | | Type of object transformation | - - - -### Message UserHeader - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| Key | [string](#string) | | Key of the user's header | -| Value | [string](#string) | | Value of the user's header | -