[#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 <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-04 12:53:33 +03:00 committed by Stanislav Bogatyrev
parent c2b5b6b6ae
commit a76f634e47
2 changed files with 22 additions and 20 deletions

View file

@ -7,10 +7,12 @@ import "refs/types.proto";
import "service/verify.proto"; import "service/verify.proto";
import "storagegroup/types.proto"; import "storagegroup/types.proto";
message UserHeader { // Attribute groups the parameters of the object attributes.
// Key of the user's header message Attribute {
// Key carries the string key to the object attribute.
string Key = 1; string Key = 1;
// Value of the user's header
// Value carries the string value of the object attribute.
string Value = 2; string Value = 2;
} }
@ -20,8 +22,8 @@ message Header {
Link Link = 1; Link Link = 1;
// Redirect not used yet // Redirect not used yet
refs.Address Redirect = 2; refs.Address Redirect = 2;
// UserHeader is a set of KV headers defined by user // Attribute is a set of K-V object attributes
UserHeader UserHeader = 3; Attribute Attribute = 3;
// Transform defines transform operation (e.g. payload split) // Transform defines transform operation (e.g. payload split)
Transform Transform = 4; Transform Transform = 4;
// Tombstone header that set up in deleted objects // Tombstone header that set up in deleted objects

View file

@ -29,6 +29,7 @@
- [object/types.proto](#object/types.proto) - [object/types.proto](#object/types.proto)
- Messages - Messages
- [Attribute](#object.Attribute)
- [CreationPoint](#object.CreationPoint) - [CreationPoint](#object.CreationPoint)
- [Header](#object.Header) - [Header](#object.Header)
- [IntegrityHeader](#object.IntegrityHeader) - [IntegrityHeader](#object.IntegrityHeader)
@ -38,7 +39,6 @@
- [SystemHeader](#object.SystemHeader) - [SystemHeader](#object.SystemHeader)
- [Tombstone](#object.Tombstone) - [Tombstone](#object.Tombstone)
- [Transform](#object.Transform) - [Transform](#object.Transform)
- [UserHeader](#object.UserHeader)
- [Scalar Value Types](#scalar-value-types) - [Scalar Value Types](#scalar-value-types)
@ -361,6 +361,18 @@ in distributed system.
<!-- end services --> <!-- end services -->
<a name="object.Attribute"></a>
### 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. |
<a name="object.CreationPoint"></a> <a name="object.CreationPoint"></a>
### Message CreationPoint ### Message CreationPoint
@ -383,7 +395,7 @@ in distributed system.
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| Link | [Link](#object.Link) | | Link to other objects | | Link | [Link](#object.Link) | | Link to other objects |
| Redirect | [refs.Address](#refs.Address) | | Redirect not used yet | | 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) | | Transform | [Transform](#object.Transform) | | Transform defines transform operation (e.g. payload split) |
| Tombstone | [Tombstone](#object.Tombstone) | | Tombstone header that set up in deleted objects | | 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 | | 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 | | type | [Transform.Type](#object.Transform.Type) | | Type of object transformation |
<a name="object.UserHeader"></a>
### Message UserHeader
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| Key | [string](#string) | | Key of the user's header |
| Value | [string](#string) | | Value of the user's header |
<!-- end messages --> <!-- end messages -->