forked from TrueCloudLab/frostfs-api
[#50] Add version fields where it makes sense
Some pieces of data (container, object, etc) may be stored for a long time and there will be a need in the future to understand which obscure format from the past was used to create it. Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
7555e166b2
commit
4e908a17b1
4 changed files with 23 additions and 17 deletions
|
@ -7,21 +7,26 @@ option csharp_namespace = "NeoFS.API.v2.Container";
|
|||
|
||||
import "netmap/types.proto";
|
||||
import "refs/types.proto";
|
||||
import "service/meta.proto";
|
||||
|
||||
// Container is a structure that defines object placement behaviour. Objects
|
||||
// can be stored only within containers. They define placement rule, attributes
|
||||
// and access control information. ID of the container is a 32 byte long
|
||||
// SHA256 hash of stable-marshalled container message.
|
||||
message Container {
|
||||
// Container format version.
|
||||
// Effectively the version of API library used to create container
|
||||
neo.fs.v2.service.Version version = 1;
|
||||
|
||||
// OwnerID carries identifier of the container owner.
|
||||
neo.fs.v2.refs.OwnerID owner_id = 1;
|
||||
neo.fs.v2.refs.OwnerID owner_id = 2;
|
||||
|
||||
// Nonce is a 16 byte UUID, used to avoid collisions of container id.
|
||||
bytes nonce = 2;
|
||||
bytes nonce = 3;
|
||||
|
||||
// BasicACL contains access control rules for owner, system, others groups and
|
||||
// permission bits for bearer token and Extended ACL.
|
||||
uint32 basic_acl = 3;
|
||||
uint32 basic_acl = 4;
|
||||
|
||||
// Attribute is a key-value pair of strings.
|
||||
message Attribute {
|
||||
|
@ -32,8 +37,8 @@ message Container {
|
|||
string value = 2;
|
||||
}
|
||||
// Attributes define any immutable characteristics of container.
|
||||
repeated Attribute attributes = 4;
|
||||
repeated Attribute attributes = 5;
|
||||
|
||||
// Placement policy for the object inside the container.
|
||||
neo.fs.v2.netmap.PlacementPolicy placement_policy = 5;
|
||||
neo.fs.v2.netmap.PlacementPolicy placement_policy = 6;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue