2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
package neo.fs.v2.container;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-14 18:27:31 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container/grpc;container";
|
2020-08-12 21:43:51 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.v2.Container";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-08-05 22:15:57 +00:00
|
|
|
import "netmap/types.proto";
|
2020-08-11 10:54:58 +00:00
|
|
|
import "refs/types.proto";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-07-31 14:47:57 +00:00
|
|
|
// 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.
|
2020-01-30 11:41:24 +00:00
|
|
|
message Container {
|
2020-08-14 19:44:32 +00:00
|
|
|
// Container format version.
|
|
|
|
// Effectively the version of API library used to create container
|
2020-08-18 13:14:25 +00:00
|
|
|
neo.fs.v2.refs.Version version = 1;
|
2020-08-14 19:44:32 +00:00
|
|
|
|
2020-08-11 09:03:50 +00:00
|
|
|
// OwnerID carries identifier of the container owner.
|
2020-08-14 19:44:32 +00:00
|
|
|
neo.fs.v2.refs.OwnerID owner_id = 2;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-11 09:03:50 +00:00
|
|
|
// Nonce is a 16 byte UUID, used to avoid collisions of container id.
|
2020-08-14 19:44:32 +00:00
|
|
|
bytes nonce = 3;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-11 09:03:50 +00:00
|
|
|
// BasicACL contains access control rules for owner, system, others groups and
|
|
|
|
// permission bits for bearer token and Extended ACL.
|
2020-08-14 19:44:32 +00:00
|
|
|
uint32 basic_acl = 4;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-11 09:03:50 +00:00
|
|
|
// Attribute is a key-value pair of strings.
|
|
|
|
message Attribute {
|
|
|
|
// Key of immutable container attribute.
|
|
|
|
string key = 1;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-11 09:03:50 +00:00
|
|
|
// Value of immutable container attribute.
|
|
|
|
string value = 2;
|
|
|
|
}
|
|
|
|
// Attributes define any immutable characteristics of container.
|
2020-08-14 19:44:32 +00:00
|
|
|
repeated Attribute attributes = 5;
|
2020-07-31 13:14:22 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Placement policy for the object inside the container.
|
2020-08-14 19:44:32 +00:00
|
|
|
neo.fs.v2.netmap.PlacementPolicy placement_policy = 6;
|
2020-08-05 22:20:53 +00:00
|
|
|
}
|