forked from TrueCloudLab/frostfs-api-go
Merge pull request #11 from nspcc-dev/prepare-for-new-release_add-protocol-version_update-doc-comments
Prepare for new release
This commit is contained in:
commit
df861b28a4
18 changed files with 254 additions and 32 deletions
|
@ -87,7 +87,8 @@ Balance returns current balance status of the NeoFS user
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="accounting.BalanceResponse"></a>
|
<a name="accounting.BalanceResponse"></a>
|
||||||
|
@ -362,7 +363,8 @@ Delete allows user to remove unused cheque
|
||||||
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
||||||
| MessageID | [bytes](#bytes) | | MessageID is a nonce for uniq request (UUIDv4) |
|
| MessageID | [bytes](#bytes) | | MessageID is a nonce for uniq request (UUIDv4) |
|
||||||
| Signature | [bytes](#bytes) | | Signature is a signature of the sent request |
|
| Signature | [bytes](#bytes) | | Signature is a signature of the sent request |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="accounting.DeleteResponse"></a>
|
<a name="accounting.DeleteResponse"></a>
|
||||||
|
@ -382,7 +384,8 @@ DeleteResponse is empty
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ID | [bytes](#bytes) | | ID is cheque identifier |
|
| ID | [bytes](#bytes) | | ID is cheque identifier |
|
||||||
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="accounting.GetResponse"></a>
|
<a name="accounting.GetResponse"></a>
|
||||||
|
@ -420,7 +423,8 @@ DeleteResponse is empty
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="accounting.ListResponse"></a>
|
<a name="accounting.ListResponse"></a>
|
||||||
|
@ -447,7 +451,8 @@ DeleteResponse is empty
|
||||||
| Height | [uint64](#uint64) | | Height is the neo blockchain height until the cheque is valid |
|
| Height | [uint64](#uint64) | | Height is the neo blockchain height until the cheque is valid |
|
||||||
| MessageID | [bytes](#bytes) | | MessageID is a nonce for uniq request (UUIDv4) |
|
| MessageID | [bytes](#bytes) | | MessageID is a nonce for uniq request (UUIDv4) |
|
||||||
| Signature | [bytes](#bytes) | | Signature is a signature of the sent request |
|
| Signature | [bytes](#bytes) | | Signature is a signature of the sent request |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="accounting.PutResponse"></a>
|
<a name="accounting.PutResponse"></a>
|
||||||
|
|
|
@ -62,7 +62,8 @@ Process is method that allows to register node in the network and receive actual
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| type | [int32](#int32) | | Type is NodeType, can be InnerRingNode (type=1) or StorageNode (type=2) |
|
| type | [int32](#int32) | | Type is NodeType, can be InnerRingNode (type=1) or StorageNode (type=2) |
|
||||||
| info | [NodeInfo](#bootstrap.NodeInfo) | | Info contains information about node |
|
| info | [NodeInfo](#bootstrap.NodeInfo) | | Info contains information about node |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
<!-- end messages -->
|
<!-- end messages -->
|
||||||
|
|
||||||
|
|
|
@ -92,8 +92,9 @@ List returns all user's containers
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| CID | [bytes](#bytes) | | CID (container id) is a SHA256 hash of the container structure |
|
| CID | [bytes](#bytes) | | CID (container id) is a SHA256 hash of the container structure |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Signature | [bytes](#bytes) | | Signature of the container owner |
|
| Signature | [bytes](#bytes) | | Signature of the container owner |
|
||||||
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="container.DeleteResponse"></a>
|
<a name="container.DeleteResponse"></a>
|
||||||
|
@ -113,7 +114,8 @@ via consensus in inner ring nodes
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| CID | [bytes](#bytes) | | CID (container id) is a SHA256 hash of the container structure |
|
| CID | [bytes](#bytes) | | CID (container id) is a SHA256 hash of the container structure |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="container.GetResponse"></a>
|
<a name="container.GetResponse"></a>
|
||||||
|
@ -136,7 +138,8 @@ via consensus in inner ring nodes
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="container.ListResponse"></a>
|
<a name="container.ListResponse"></a>
|
||||||
|
@ -163,7 +166,8 @@ via consensus in inner ring nodes
|
||||||
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
||||||
| rules | [netmap.PlacementRule](#netmap.PlacementRule) | | Rules define storage policy for the object inside the container. |
|
| rules | [netmap.PlacementRule](#netmap.PlacementRule) | | Rules define storage policy for the object inside the container. |
|
||||||
| Signature | [bytes](#bytes) | | Signature of the user (owner id) |
|
| Signature | [bytes](#bytes) | | Signature of the user (owner id) |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="container.PutResponse"></a>
|
<a name="container.PutResponse"></a>
|
||||||
|
|
|
@ -147,11 +147,11 @@ calculated for XORed data.
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Epoch | [uint64](#uint64) | | Epoch is set by user to 0, node set epoch to the actual value Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
||||||
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
| OwnerID | [bytes](#bytes) | | OwnerID is a wallet address |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Token | [session.Token](#session.Token) | | Token with session public key and user's signature |
|
| Token | [session.Token](#session.Token) | | Token with session public key and user's signature |
|
||||||
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="object.DeleteResponse"></a>
|
<a name="object.DeleteResponse"></a>
|
||||||
|
@ -170,11 +170,11 @@ in distributed system.
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Epoch | [uint64](#uint64) | | Epoch is set by user to 0, node set epoch to the actual value Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
||||||
| Ranges | [Range](#object.Range) | repeated | Ranges of object's payload to calculate homomorphic hash |
|
| Ranges | [Range](#object.Range) | repeated | Ranges of object's payload to calculate homomorphic hash |
|
||||||
| Salt | [bytes](#bytes) | | Salt is used to XOR object's payload ranges before hashing, it can be nil |
|
| Salt | [bytes](#bytes) | | Salt is used to XOR object's payload ranges before hashing, it can be nil |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="object.GetRangeHashResponse"></a>
|
<a name="object.GetRangeHashResponse"></a>
|
||||||
|
@ -196,10 +196,10 @@ in distributed system.
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Epoch | [uint64](#uint64) | | Epoch is set by user to 0, node set epoch to the actual value Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
||||||
| Ranges | [Range](#object.Range) | repeated | Ranges of object's payload to return |
|
| Ranges | [Range](#object.Range) | repeated | Ranges of object's payload to return |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="object.GetRangeResponse"></a>
|
<a name="object.GetRangeResponse"></a>
|
||||||
|
@ -221,9 +221,9 @@ in distributed system.
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Epoch | [uint64](#uint64) | | Epoch is set by user to 0, node set epoch to the actual value Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="object.GetResponse"></a>
|
<a name="object.GetResponse"></a>
|
||||||
|
@ -246,10 +246,10 @@ in distributed system.
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Epoch | [uint64](#uint64) | | Epoch should be empty on user side, node sets epoch to the actual value Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
||||||
| FullHeaders | [bool](#bool) | | FullHeaders can be set true for extended headers in the object |
|
| FullHeaders | [bool](#bool) | | FullHeaders can be set true for extended headers in the object |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="object.HeadResponse"></a>
|
<a name="object.HeadResponse"></a>
|
||||||
|
@ -273,6 +273,8 @@ in distributed system.
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Header | [PutRequest.PutHeader](#object.PutRequest.PutHeader) | | Header should be the first message in the stream |
|
| Header | [PutRequest.PutHeader](#object.PutRequest.PutHeader) | | Header should be the first message in the stream |
|
||||||
| Chunk | [bytes](#bytes) | | Chunk should be a remaining message in stream should be chunks |
|
| Chunk | [bytes](#bytes) | | Chunk should be a remaining message in stream should be chunks |
|
||||||
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="object.PutRequest.PutHeader"></a>
|
<a name="object.PutRequest.PutHeader"></a>
|
||||||
|
@ -283,9 +285,7 @@ in distributed system.
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Epoch | [uint64](#uint64) | | Epoch is set by user to 0, node set epoch to the actual value Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Object | [Object](#object.Object) | | Object with at least container id and owner id fields |
|
| Object | [Object](#object.Object) | | Object with at least container id and owner id fields |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Token | [session.Token](#session.Token) | | Token with session public key and user's signature |
|
| Token | [session.Token](#session.Token) | | Token with session public key and user's signature |
|
||||||
|
|
||||||
|
|
||||||
|
@ -308,11 +308,11 @@ in distributed system.
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Epoch | [uint64](#uint64) | | Epoch is set by user to 0, node set epoch to the actual value Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
|
||||||
| Version | [uint32](#uint32) | | Version of search query format |
|
|
||||||
| ContainerID | [bytes](#bytes) | | ContainerID for searching the object |
|
| ContainerID | [bytes](#bytes) | | ContainerID for searching the object |
|
||||||
| Query | [bytes](#bytes) | | Query in the binary serialized format |
|
| Query | [bytes](#bytes) | | Query in the binary serialized format |
|
||||||
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every neofs-node Deprecated: will be replaced with RequestMetaHeader (see develop branch) |
|
| QueryVersion | [uint32](#uint32) | | QueryVersion is a version of search query format |
|
||||||
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="object.SearchResponse"></a>
|
<a name="object.SearchResponse"></a>
|
||||||
|
|
157
docs/service.md
Normal file
157
docs/service.md
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
# Protocol Documentation
|
||||||
|
<a name="top"></a>
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [service/meta.proto](#service/meta.proto)
|
||||||
|
|
||||||
|
- Messages
|
||||||
|
- [RequestMetaHeader](#service.RequestMetaHeader)
|
||||||
|
|
||||||
|
|
||||||
|
- [service/verify.proto](#service/verify.proto)
|
||||||
|
|
||||||
|
- Messages
|
||||||
|
- [RequestVerificationHeader](#service.RequestVerificationHeader)
|
||||||
|
- [RequestVerificationHeader.Sign](#service.RequestVerificationHeader.Sign)
|
||||||
|
- [RequestVerificationHeader.Signature](#service.RequestVerificationHeader.Signature)
|
||||||
|
|
||||||
|
|
||||||
|
- [service/verify_test.proto](#service/verify_test.proto)
|
||||||
|
|
||||||
|
- Messages
|
||||||
|
- [TestRequest](#service.TestRequest)
|
||||||
|
|
||||||
|
|
||||||
|
- [Scalar Value Types](#scalar-value-types)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service/meta.proto"></a>
|
||||||
|
<p align="right"><a href="#top">Top</a></p>
|
||||||
|
|
||||||
|
## service/meta.proto
|
||||||
|
|
||||||
|
|
||||||
|
<!-- end services -->
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service.RequestMetaHeader"></a>
|
||||||
|
|
||||||
|
### Message RequestMetaHeader
|
||||||
|
RequestMetaHeader contains information about request meta headers
|
||||||
|
(should be embedded into message)
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| TTL | [uint32](#uint32) | | TTL must be larger than zero, it decreased in every NeoFS Node |
|
||||||
|
| Epoch | [uint64](#uint64) | | Epoch for user can be empty, because node sets epoch to the actual value |
|
||||||
|
| Version | [uint32](#uint32) | | Version defines protocol version TODO: not used for now, should be implemented in future |
|
||||||
|
|
||||||
|
<!-- end messages -->
|
||||||
|
|
||||||
|
<!-- end enums -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service/verify.proto"></a>
|
||||||
|
<p align="right"><a href="#top">Top</a></p>
|
||||||
|
|
||||||
|
## service/verify.proto
|
||||||
|
|
||||||
|
|
||||||
|
<!-- end services -->
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service.RequestVerificationHeader"></a>
|
||||||
|
|
||||||
|
### Message RequestVerificationHeader
|
||||||
|
RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request
|
||||||
|
(should be embedded into message).
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| Signatures | [RequestVerificationHeader.Signature](#service.RequestVerificationHeader.Signature) | repeated | Signatures is a set of signatures of every passed NeoFS Node |
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service.RequestVerificationHeader.Sign"></a>
|
||||||
|
|
||||||
|
### Message RequestVerificationHeader.Sign
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| Sign | [bytes](#bytes) | | Sign is signature of the request or session key. |
|
||||||
|
| Peer | [bytes](#bytes) | | Peer is compressed public key used for signature. |
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service.RequestVerificationHeader.Signature"></a>
|
||||||
|
|
||||||
|
### Message RequestVerificationHeader.Signature
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| Sign | [RequestVerificationHeader.Sign](#service.RequestVerificationHeader.Sign) | | Sign is a signature and public key of the request. |
|
||||||
|
| Origin | [RequestVerificationHeader.Sign](#service.RequestVerificationHeader.Sign) | | Origin used for requests, when trusted node changes it and re-sign with session key. If session key used for signature request, then Origin should contain public key of user and signed session key. |
|
||||||
|
|
||||||
|
<!-- end messages -->
|
||||||
|
|
||||||
|
<!-- end enums -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service/verify_test.proto"></a>
|
||||||
|
<p align="right"><a href="#top">Top</a></p>
|
||||||
|
|
||||||
|
## service/verify_test.proto
|
||||||
|
|
||||||
|
|
||||||
|
<!-- end services -->
|
||||||
|
|
||||||
|
|
||||||
|
<a name="service.TestRequest"></a>
|
||||||
|
|
||||||
|
### Message TestRequest
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| IntField | [int32](#int32) | | |
|
||||||
|
| StringField | [string](#string) | | |
|
||||||
|
| BytesField | [bytes](#bytes) | | |
|
||||||
|
| CustomField | [bytes](#bytes) | | |
|
||||||
|
| Meta | [RequestMetaHeader](#service.RequestMetaHeader) | | |
|
||||||
|
| Header | [RequestVerificationHeader](#service.RequestVerificationHeader) | | |
|
||||||
|
|
||||||
|
<!-- end messages -->
|
||||||
|
|
||||||
|
<!-- end enums -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Scalar Value Types
|
||||||
|
|
||||||
|
| .proto Type | Notes | C++ Type | Java Type | Python Type |
|
||||||
|
| ----------- | ----- | -------- | --------- | ----------- |
|
||||||
|
| <a name="double" /> double | | double | double | float |
|
||||||
|
| <a name="float" /> float | | float | float | float |
|
||||||
|
| <a name="int32" /> 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 |
|
||||||
|
| <a name="int64" /> 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 |
|
||||||
|
| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long |
|
||||||
|
| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long |
|
||||||
|
| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int |
|
||||||
|
| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long |
|
||||||
|
| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int |
|
||||||
|
| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long |
|
||||||
|
| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int |
|
||||||
|
| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long |
|
||||||
|
| <a name="bool" /> bool | | bool | boolean | boolean |
|
||||||
|
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode |
|
||||||
|
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |
|
||||||
|
|
|
@ -70,6 +70,8 @@ session key. Session is established during 4-step handshake in one gRPC stream
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Init | [Token](#session.Token) | | Init is a message to initialize session opening. Carry: owner of manipulation object; ID of manipulation object; token lifetime bounds. |
|
| Init | [Token](#session.Token) | | Init is a message to initialize session opening. Carry: owner of manipulation object; ID of manipulation object; token lifetime bounds. |
|
||||||
| Signed | [Token](#session.Token) | | Signed Init message response (Unsigned) from server with user private key |
|
| Signed | [Token](#session.Token) | | Signed Init message response (Unsigned) from server with user private key |
|
||||||
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="session.CreateResponse"></a>
|
<a name="session.CreateResponse"></a>
|
||||||
|
|
|
@ -70,6 +70,11 @@ If node unhealthy field Status would contains detailed info.
|
||||||
HealthRequest message to check current state
|
HealthRequest message to check current state
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="state.HealthResponse"></a>
|
<a name="state.HealthResponse"></a>
|
||||||
|
|
||||||
|
@ -89,6 +94,11 @@ HealthResponse message with current state
|
||||||
MetricsRequest message to request node metrics
|
MetricsRequest message to request node metrics
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
|
|
||||||
<a name="state.MetricsResponse"></a>
|
<a name="state.MetricsResponse"></a>
|
||||||
|
|
||||||
|
@ -109,6 +119,11 @@ from github.com/prometheus/client_model/metrics.proto
|
||||||
NetmapRequest message to request current node netmap
|
NetmapRequest message to request current node netmap
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
||||||
|
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
||||||
|
|
||||||
<!-- end messages -->
|
<!-- end messages -->
|
||||||
|
|
||||||
<!-- end enums -->
|
<!-- end enums -->
|
||||||
|
|
Binary file not shown.
|
@ -129,12 +129,12 @@ message HeadResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
message SearchRequest {
|
message SearchRequest {
|
||||||
// Version of search query format
|
|
||||||
uint32 Version = 1;
|
|
||||||
// ContainerID for searching the object
|
// ContainerID for searching the object
|
||||||
bytes ContainerID = 2 [(gogoproto.nullable) = false, (gogoproto.customtype) = "CID"];
|
bytes ContainerID = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "CID"];
|
||||||
// Query in the binary serialized format
|
// Query in the binary serialized format
|
||||||
bytes Query = 3;
|
bytes Query = 2;
|
||||||
|
// QueryVersion is a version of search query format
|
||||||
|
uint32 QueryVersion = 3;
|
||||||
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
||||||
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
||||||
|
|
|
@ -10,6 +10,7 @@ type (
|
||||||
// MetaHeader contains meta information of request.
|
// MetaHeader contains meta information of request.
|
||||||
// It provides methods to get or set meta information meta header.
|
// It provides methods to get or set meta information meta header.
|
||||||
// Also contains methods to reset and restore meta header.
|
// Also contains methods to reset and restore meta header.
|
||||||
|
// Also contains methods to get or set request protocol version
|
||||||
MetaHeader interface {
|
MetaHeader interface {
|
||||||
ResetMeta() RequestMetaHeader
|
ResetMeta() RequestMetaHeader
|
||||||
RestoreMeta(RequestMetaHeader)
|
RestoreMeta(RequestMetaHeader)
|
||||||
|
@ -20,7 +21,16 @@ type (
|
||||||
|
|
||||||
// EpochRequest gives possibility to get or set epoch in RPC Requests.
|
// EpochRequest gives possibility to get or set epoch in RPC Requests.
|
||||||
GetEpoch() uint64
|
GetEpoch() uint64
|
||||||
SetEpoch(v uint64)
|
SetEpoch(uint64)
|
||||||
|
|
||||||
|
// VersionHeader allows get or set version of protocol request
|
||||||
|
VersionHeader
|
||||||
|
}
|
||||||
|
|
||||||
|
// VersionHeader allows get or set version of protocol request
|
||||||
|
VersionHeader interface {
|
||||||
|
GetVersion() uint32
|
||||||
|
SetVersion(uint32)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TTLCondition is closure, that allows to validate request with ttl.
|
// TTLCondition is closure, that allows to validate request with ttl.
|
||||||
|
@ -46,6 +56,9 @@ const (
|
||||||
ErrIncorrectTTL = internal.Error("incorrect ttl")
|
ErrIncorrectTTL = internal.Error("incorrect ttl")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// SetVersion sets protocol version to RequestMetaHeader.
|
||||||
|
func (m *RequestMetaHeader) SetVersion(v uint32) { m.Version = v }
|
||||||
|
|
||||||
// SetTTL sets TTL to RequestMetaHeader.
|
// SetTTL sets TTL to RequestMetaHeader.
|
||||||
func (m *RequestMetaHeader) SetTTL(v uint32) { m.TTL = v }
|
func (m *RequestMetaHeader) SetTTL(v uint32) { m.TTL = v }
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -6,7 +6,14 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
option (gogoproto.stable_marshaler_all) = true;
|
option (gogoproto.stable_marshaler_all) = true;
|
||||||
|
|
||||||
|
// RequestMetaHeader contains information about request meta headers
|
||||||
|
// (should be embedded into message)
|
||||||
message RequestMetaHeader {
|
message RequestMetaHeader {
|
||||||
uint32 TTL = 1;
|
// TTL must be larger than zero, it decreased in every NeoFS Node
|
||||||
uint64 Epoch = 2;
|
uint32 TTL = 1;
|
||||||
|
// Epoch for user can be empty, because node sets epoch to the actual value
|
||||||
|
uint64 Epoch = 2;
|
||||||
|
// Version defines protocol version
|
||||||
|
// TODO: not used for now, should be implemented in future
|
||||||
|
uint32 Version = 3;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -6,15 +6,25 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
option (gogoproto.stable_marshaler_all) = true;
|
option (gogoproto.stable_marshaler_all) = true;
|
||||||
|
|
||||||
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request
|
||||||
|
// (should be embedded into message).
|
||||||
message RequestVerificationHeader {
|
message RequestVerificationHeader {
|
||||||
message Sign {
|
message Sign {
|
||||||
|
// Sign is signature of the request or session key.
|
||||||
bytes Sign = 1;
|
bytes Sign = 1;
|
||||||
|
// Peer is compressed public key used for signature.
|
||||||
bytes Peer = 2;
|
bytes Peer = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Signature {
|
message Signature {
|
||||||
|
// Sign is a signature and public key of the request.
|
||||||
Sign Sign = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
Sign Sign = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
|
// Origin used for requests, when trusted node changes it and re-sign with session key.
|
||||||
|
// If session key used for signature request, then Origin should contain
|
||||||
|
// public key of user and signed session key.
|
||||||
Sign Origin = 2;
|
Sign Origin = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Signatures is a set of signatures of every passed NeoFS Node
|
||||||
repeated Signature Signatures = 1;
|
repeated Signature Signatures = 1;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -36,7 +36,9 @@ message CreateRequest {
|
||||||
// Signed Init message response (Unsigned) from server with user private key
|
// Signed Init message response (Unsigned) from server with user private key
|
||||||
session.Token Signed = 2;
|
session.Token Signed = 2;
|
||||||
}
|
}
|
||||||
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
||||||
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
||||||
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -22,13 +22,17 @@ service Status {
|
||||||
|
|
||||||
// NetmapRequest message to request current node netmap
|
// NetmapRequest message to request current node netmap
|
||||||
message NetmapRequest {
|
message NetmapRequest {
|
||||||
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
||||||
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
||||||
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
// MetricsRequest message to request node metrics
|
// MetricsRequest message to request node metrics
|
||||||
message MetricsRequest {
|
message MetricsRequest {
|
||||||
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
||||||
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
||||||
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +45,9 @@ message MetricsResponse {
|
||||||
|
|
||||||
// HealthRequest message to check current state
|
// HealthRequest message to check current state
|
||||||
message HealthRequest {
|
message HealthRequest {
|
||||||
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
||||||
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
||||||
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue