container: Tidy up the format

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-06 01:20:53 +03:00 committed by Stanislav Bogatyrev
parent f9c865eb53
commit 12dd5e07ba
3 changed files with 49 additions and 35 deletions

View file

@ -1,5 +1,7 @@
syntax = "proto3";
package container;
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
option csharp_namespace = "NeoFS.API.Container";
@ -42,9 +44,11 @@ service Service {
message PutRequest {
// Container to create in NeoFS.
container.Container Container = 1;
// PublicKey of container owner. It can be public key of the owner
// or it can be public key that bound in neofs.id smart-contract.
bytes PublicKey = 2;
// Signature of stable-marshalled container according to RFC-6979.
bytes Signature = 3;
}
@ -57,8 +61,9 @@ message PutResponse {
message DeleteRequest {
// ContainerID carries identifier of the container to delete from NeoFS.
refs.ContainerID ContainerID = 1;
// Signature of container id according to RFC-6979.
bytes Signature = 2;
bytes Signature = 2;
}
// DeleteResponse is empty because delete operation is asynchronous and done
@ -89,8 +94,9 @@ message ListResponse {
message SetExtendedACLRequest {
// EACL to set for the container.
acl.EACLTable EACL = 1;
// Signature of stable-marshalled Extended ACL according to RFC-6979.
bytes Signature = 2;
bytes Signature = 2;
}
message SetExtendedACLResponse {}
@ -103,6 +109,7 @@ message GetExtendedACLRequest {
message GetExtendedACLResponse {
// EACL that has been requested if it was set up.
acl.EACLTable EACL = 1;
// Signature of stable-marshalled Extended ACL according to RFC-6979.
bytes Signature = 2;
bytes Signature = 2;
}

View file

@ -1,5 +1,7 @@
syntax = "proto3";
package container;
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
option csharp_namespace = "NeoFS.API.Container";
@ -11,23 +13,28 @@ import "netmap/types.proto";
// and access control information. ID of the container is a 32 byte long
// SHA256 hash of stable-marshalled container message.
message Container {
// OwnerID carries identifier of the container owner.
// OwnerID carries identifier of the container owner.
refs.OwnerID 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;
}
// 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;
// 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.
repeated Attribute Attributes = 4;
// Rules define storage policy for the object inside the container.
netmap.PlacementRule Rules = 5;
}

View file

@ -25,8 +25,8 @@
- [container/types.proto](#container/types.proto)
- Messages
- [Attribute](#container.Attribute)
- [Container](#container.Container)
- [Container.Attribute](#container.Container.Attribute)
- [Scalar Value Types](#scalar-value-types)
@ -256,18 +256,6 @@ via consensus in inner ring nodes
<!-- end services -->
<a name="container.Attribute"></a>
### Message Attribute
Attribute is a key-value pair of strings.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| Key | [string](#string) | | Key of immutable container attribute. |
| Value | [string](#string) | | Value of immutable container attribute. |
<a name="container.Container"></a>
### Message Container
@ -282,9 +270,21 @@ SHA256 hash of stable-marshalled container message.
| OwnerID | [refs.OwnerID](#refs.OwnerID) | | OwnerID carries identifier of the container owner. |
| Nonce | [bytes](#bytes) | | Nonce is a 16 byte UUID, used to avoid collisions of container id. |
| BasicACL | [uint32](#uint32) | | BasicACL contains access control rules for owner, system, others groups and permission bits for bearer token and Extended ACL. |
| Attributes | [Attribute](#container.Attribute) | repeated | Attributes define any immutable characteristics of container. |
| Attributes | [Container.Attribute](#container.Container.Attribute) | repeated | Attributes define any immutable characteristics of container. |
| Rules | [netmap.PlacementRule](#netmap.PlacementRule) | | Rules define storage policy for the object inside the container. |
<a name="container.Container.Attribute"></a>
### Message Container.Attribute
Attribute is a key-value pair of strings.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| Key | [string](#string) | | Key of immutable container attribute. |
| Value | [string](#string) | | Value of immutable container attribute. |
<!-- end messages -->
<!-- end enums -->