frostfs-api/container/types.proto

35 lines
1.4 KiB
Protocol Buffer
Raw Normal View History

2020-01-30 11:41:24 +00:00
syntax = "proto3";
package container;
2020-03-31 06:58:22 +00:00
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
2020-02-05 12:14:39 +00:00
option csharp_namespace = "NeoFS.API.Container";
2020-01-30 11:41:24 +00:00
import "github.com/nspcc-dev/netmap/selector.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
// 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 {
// OwnerID is a 25 byte NEO3.0 wallet address.
bytes OwnerID = 1;
// 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;
// Attributes define any immutable characteristics of container.
repeated Attribute Attributes = 4;
// Rules define storage policy for the object inside the container.
netmap.PlacementRule Rules = 5;
2020-01-30 11:41:24 +00:00
}
// 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;
}