2020-01-30 14:41:24 +03:00
|
|
|
syntax = "proto3";
|
2020-08-06 01:20:53 +03:00
|
|
|
|
2020-01-30 14:41:24 +03:00
|
|
|
package container;
|
2020-08-06 01:20:53 +03:00
|
|
|
|
2020-03-31 09:58:22 +03:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
|
2020-02-05 15:14:39 +03:00
|
|
|
option csharp_namespace = "NeoFS.API.Container";
|
2020-01-30 14:41:24 +03:00
|
|
|
|
2020-08-05 19:49:16 +03:00
|
|
|
import "refs/types.proto";
|
2020-08-06 01:15:57 +03:00
|
|
|
import "netmap/types.proto";
|
2020-01-30 14:41:24 +03:00
|
|
|
|
2020-07-31 17:47:57 +03: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 14:41:24 +03:00
|
|
|
message Container {
|
2020-08-06 01:20:53 +03:00
|
|
|
// OwnerID carries identifier of the container owner.
|
2020-08-05 19:49:16 +03:00
|
|
|
refs.OwnerID OwnerID = 1;
|
2020-08-06 01:20:53 +03:00
|
|
|
|
|
|
|
// Nonce is a 16 byte UUID, used to avoid collisions of container id.
|
|
|
|
bytes Nonce = 2;
|
|
|
|
|
|
|
|
// BasicACL contains access control rules for owner, system, others groups and
|
|
|
|
// permission bits for bearer token and Extended ACL.
|
|
|
|
uint32 BasicACL = 3;
|
|
|
|
|
|
|
|
// Attribute is a key-value pair of strings.
|
|
|
|
message Attribute {
|
|
|
|
// Key of immutable container attribute.
|
|
|
|
string Key = 1;
|
|
|
|
|
|
|
|
// Value of immutable container attribute.
|
|
|
|
string Value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Attributes define any immutable characteristics of container.
|
2020-07-31 17:43:55 +03:00
|
|
|
repeated Attribute Attributes = 4;
|
2020-07-31 16:14:22 +03:00
|
|
|
|
2020-08-06 01:20:53 +03:00
|
|
|
// Rules define storage policy for the object inside the container.
|
|
|
|
netmap.PlacementRule Rules = 5;
|
|
|
|
}
|