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
|
|
|
|
2023-03-07 08:50:02 +00:00
|
|
|
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc;container";
|
2021-03-10 10:54:06 +00:00
|
|
|
option csharp_namespace = "Neo.FileStorage.API.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-10-14 16:57:36 +00:00
|
|
|
// Container is a structure that defines object placement behaviour. Objects can
|
|
|
|
// be stored only within containers. They define placement rule, attributes and
|
2022-04-13 06:21:33 +00:00
|
|
|
// access control information. An ID of a container is a 32 byte long SHA256 hash
|
2020-10-14 16:57:36 +00:00
|
|
|
// of stable-marshalled container message.
|
2020-01-30 11:41:24 +00:00
|
|
|
message Container {
|
2022-04-13 06:21:33 +00:00
|
|
|
// Container format version. Effectively, the version of API library used to
|
|
|
|
// create the container.
|
2020-10-19 08:04:18 +00:00
|
|
|
neo.fs.v2.refs.Version version = 1 [json_name = "version"];
|
2020-08-14 19:44:32 +00:00
|
|
|
|
2020-10-14 16:57:36 +00:00
|
|
|
// Identifier of the container owner
|
2020-10-19 08:04:18 +00:00
|
|
|
neo.fs.v2.refs.OwnerID owner_id = 2 [json_name = "ownerID"];
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-12-08 15:08:32 +00:00
|
|
|
// Nonce is a 16 byte UUIDv4, used to avoid collisions of `ContainerID`s
|
2020-10-19 08:04:18 +00:00
|
|
|
bytes nonce = 3 [json_name = "nonce"];
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2022-04-13 06:21:33 +00:00
|
|
|
// `BasicACL` contains access control rules for the owner, system and others groups,
|
|
|
|
// as well as permission bits for `BearerToken` and `Extended ACL`
|
2020-10-19 08:04:18 +00:00
|
|
|
uint32 basic_acl = 4 [json_name = "basicACL"];
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-10-13 17:07:53 +00:00
|
|
|
// `Attribute` is a user-defined Key-Value metadata pair attached to the
|
2022-04-13 06:21:33 +00:00
|
|
|
// container. Container attributes are immutable. They are set at the moment of
|
|
|
|
// container creation and can never be added or updated.
|
2020-12-08 10:48:51 +00:00
|
|
|
//
|
2020-12-11 06:46:00 +00:00
|
|
|
// Key name must be a container-unique valid UTF-8 string. Value can't be
|
|
|
|
// empty. Containers with duplicated attribute names or attributes with empty
|
|
|
|
// values will be considered invalid.
|
2020-10-13 17:07:53 +00:00
|
|
|
//
|
|
|
|
// There are some "well-known" attributes affecting system behaviour:
|
|
|
|
//
|
2023-03-14 07:24:35 +00:00
|
|
|
// * [ __SYSTEM__NAME ] \
|
|
|
|
// (`__NEOFS__NAME` is deprecated) \
|
2022-04-13 06:21:33 +00:00
|
|
|
// String of a human-friendly container name registered as a domain in
|
2021-10-07 14:38:30 +00:00
|
|
|
// NNS contract.
|
2023-03-14 07:24:35 +00:00
|
|
|
// * [ __SYSTEM__ZONE ] \
|
|
|
|
// (`__NEOFS__ZONE` is deprecated) \
|
|
|
|
// String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). Used as a TLD of a domain name in NNS
|
2022-04-13 06:21:33 +00:00
|
|
|
// contract. If no zone is specified, use default zone: `container`.
|
2023-03-14 07:24:35 +00:00
|
|
|
// * [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \
|
|
|
|
// (`__NEOFS__DISABLE_HOMOMORPHIC_HASHING` is deprecated) \
|
2022-05-27 11:45:24 +00:00
|
|
|
// Disables homomorphic hashing for the container if the value equals "true" string.
|
|
|
|
// Any other values are interpreted as missing attribute. Container could be
|
|
|
|
// accepted in a NeoFS network only if the global network hashing configuration
|
|
|
|
// value corresponds with that attribute's value. After container inclusion, network
|
|
|
|
// setting is ignored.
|
2020-10-20 20:09:51 +00:00
|
|
|
//
|
|
|
|
// And some well-known attributes used by applications only:
|
|
|
|
//
|
|
|
|
// * Name \
|
|
|
|
// Human-friendly name
|
|
|
|
// * Timestamp \
|
|
|
|
// User-defined local time of container creation in Unix Timestamp format
|
2020-08-11 09:03:50 +00:00
|
|
|
message Attribute {
|
2020-10-14 16:57:36 +00:00
|
|
|
// Attribute name key
|
2020-10-19 08:04:18 +00:00
|
|
|
string key = 1 [json_name = "key"];
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-10-14 16:57:36 +00:00
|
|
|
// Attribute value
|
2020-10-19 08:04:18 +00:00
|
|
|
string value = 2 [json_name = "value"];
|
2020-08-11 09:03:50 +00:00
|
|
|
}
|
2020-10-14 16:57:36 +00:00
|
|
|
// Attributes represent immutable container's meta data
|
2020-10-19 08:04:18 +00:00
|
|
|
repeated Attribute attributes = 5 [json_name = "attributes"];
|
2020-07-31 13:14:22 +00:00
|
|
|
|
2020-10-14 16:57:36 +00:00
|
|
|
// Placement policy for the object inside the container
|
2020-10-19 08:04:18 +00:00
|
|
|
neo.fs.v2.netmap.PlacementPolicy placement_policy = 6 [json_name = "placementPolicy"];
|
2020-08-05 22:20:53 +00:00
|
|
|
}
|