frostfs-api-go-pogpp/docs/container.md
2020-06-18 15:01:25 +03:00

12 KiB

Protocol Documentation

Table of Contents

Top

container/service.proto

Service "container.Service"

Container service provides API for manipulating with the container.

rpc Put(PutRequest) returns (PutResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Get(GetRequest) returns (GetResponse);
rpc List(ListRequest) returns (ListResponse);
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);

Method Put

Put request proposes container to the inner ring nodes. They will accept new container if user has enough deposit. All containers are accepted by the consensus, therefore it is asynchronous process.

Name Input Output
Put PutRequest PutResponse

Method Delete

Delete container removes it from the inner ring container storage. It also asynchronous process done by consensus.

Name Input Output
Delete DeleteRequest DeleteResponse

Method Get

Get container returns container instance

Name Input Output
Get GetRequest GetResponse

Method List

List returns all user's containers

Name Input Output
List ListRequest ListResponse

Method SetExtendedACL

SetExtendedACL changes extended ACL rules of the container

Name Input Output
SetExtendedACL SetExtendedACLRequest SetExtendedACLResponse

Method GetExtendedACL

GetExtendedACL returns extended ACL rules of the container

Name Input Output
GetExtendedACL GetExtendedACLRequest GetExtendedACLResponse

Message DeleteRequest

Field Type Label Description
CID bytes CID (container id) is a SHA256 hash of the container structure
Meta service.RequestMetaHeader RequestMetaHeader contains information about request meta headers (should be embedded into message)
Verify service.RequestVerificationHeader RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)

Message DeleteResponse

DeleteResponse is empty because delete operation is asynchronous and done via consensus in inner ring nodes

Message ExtendedACLKey

Field Type Label Description
ID bytes ID (container id) is a SHA256 hash of the container structure

Message ExtendedACLValue

Field Type Label Description
EACL bytes EACL carries binary representation of the table of extended ACL rules
Signature bytes Signature carries EACL field signature

Message GetExtendedACLRequest

Field Type Label Description
Key ExtendedACLKey Key carries key to extended ACL information
Meta service.RequestMetaHeader RequestMetaHeader contains information about request meta headers (should be embedded into message)
Verify service.RequestVerificationHeader RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)

Message GetExtendedACLResponse

Field Type Label Description
ACL ExtendedACLValue ACL carries extended ACL information

Message GetRequest

Field Type Label Description
CID bytes CID (container id) is a SHA256 hash of the container structure
Meta service.RequestMetaHeader RequestMetaHeader contains information about request meta headers (should be embedded into message)
Verify service.RequestVerificationHeader RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)

Message GetResponse

Field Type Label Description
Container Container Container is a structure that contains placement rules and owner id

Message ListRequest

Field Type Label Description
OwnerID bytes OwnerID is a wallet address
Meta service.RequestMetaHeader RequestMetaHeader contains information about request meta headers (should be embedded into message)
Verify service.RequestVerificationHeader RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)

Message ListResponse

Field Type Label Description
CID bytes repeated CID (container id) is list of SHA256 hashes of the container structures

Message PutRequest

Field Type Label Description
MessageID bytes MessageID is a nonce for uniq container id calculation
Capacity uint64 Capacity defines amount of data that can be stored in the container (doesn't used for now).
OwnerID bytes OwnerID is a wallet address
rules netmap.PlacementRule Rules define storage policy for the object inside the container.
BasicACL uint32 BasicACL of the container.
Meta service.RequestMetaHeader RequestMetaHeader contains information about request meta headers (should be embedded into message)
Verify service.RequestVerificationHeader RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)

Message PutResponse

Field Type Label Description
CID bytes CID (container id) is a SHA256 hash of the container structure

Message SetExtendedACLRequest

Field Type Label Description
Key ExtendedACLKey Key carries key to extended ACL information
Value ExtendedACLValue Value carries extended ACL information
Meta service.RequestMetaHeader RequestMetaHeader contains information about request meta headers (should be embedded into message)
Verify service.RequestVerificationHeader RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)

Message SetExtendedACLResponse

Top

container/types.proto

Message Container

The Container service definition.

Field Type Label Description
OwnerID bytes OwnerID is a wallet address.
Salt bytes Salt is a nonce for unique container id calculation.
Capacity uint64 Capacity defines amount of data that can be stored in the container (doesn't used for now).
Rules netmap.PlacementRule Rules define storage policy for the object inside the container.
BasicACL uint32 BasicACL with access control rules for owner, system, others and permission bits for bearer token and extended ACL.

Scalar Value Types

.proto Type Notes C++ Type Java Type Python Type
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str