[#23] Reorganize container message fields

Capacity field is obsolete and removed. Salt field renamed to
Nonce so it shows better the purpose of the field.

Remaining fields are reorded to have fixed size fields on top.
It affects stable-marshaller implementation.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-07-31 17:43:55 +03:00 committed by Stanislav Bogatyrev
parent ebf96fea9e
commit 21f51c8c8b

View file

@ -10,19 +10,17 @@ option (gogoproto.stable_marshaler_all) = true;
// The Container service definition. // The Container service definition.
message Container { message Container {
// OwnerID is a wallet address. // OwnerID is a 25 byte NEO3.0 wallet address.
bytes OwnerID = 1 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; bytes OwnerID = 1;
// Salt is a nonce for unique container id calculation. // Nonce is a 16 byte UUID, used to avoid collisions of container id.
bytes Salt = 2 [(gogoproto.customtype) = "UUID", (gogoproto.nullable) = false]; bytes Nonce = 2;
// Capacity defines amount of data that can be stored in the container (doesn't used for now). // BasicACL contains access control rules for owner, system, others groups and
uint64 Capacity = 3; // permission bits for bearer token and Extended ACL.
// Rules define storage policy for the object inside the container. uint32 BasicACL = 3;
netmap.PlacementRule Rules = 4 [(gogoproto.nullable) = false]; // Attributes define any immutable characteristics of container.
// BasicACL with access control rules for owner, system, others and repeated Attribute Attributes = 4;
// permission bits for bearer token and extended ACL. // Rules define storage policy for the object inside the container.
uint32 BasicACL = 5; netmap.PlacementRule Rules = 5;
// Attributes define any immutable characteristics of container.
repeated Attribute Attributes = 6;
} }
// Attribute is a key-value pair of strings. // Attribute is a key-value pair of strings.