forked from TrueCloudLab/frostfs-api
service: Tidy up the format
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
23f571f76f
commit
0ca83fcef6
4 changed files with 37 additions and 70 deletions
|
@ -10,7 +10,6 @@ import "service/verify.proto";
|
|||
|
||||
// Object service provides API for manipulating with the object.
|
||||
service Service {
|
||||
|
||||
// Get the object from container. Response uses gRPC stream. First response
|
||||
// message carry object of requested address. Chunk messages are parts of
|
||||
// the object's payload if it is needed. All messages except first carry
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
- [service/meta.proto](#service/meta.proto)
|
||||
|
||||
- Messages
|
||||
- [RequestExtendedHeader](#service.RequestExtendedHeader)
|
||||
- [RequestExtendedHeader.KV](#service.RequestExtendedHeader.KV)
|
||||
- [RequestMetaHeader](#service.RequestMetaHeader)
|
||||
- [RequestMetaHeader.XHeader](#service.RequestMetaHeader.XHeader)
|
||||
|
||||
|
||||
- [service/verify.proto](#service/verify.proto)
|
||||
|
@ -36,42 +35,28 @@
|
|||
<!-- end services -->
|
||||
|
||||
|
||||
<a name="service.RequestExtendedHeader"></a>
|
||||
|
||||
### Message RequestExtendedHeader
|
||||
RequestExtendedHeader contains extended headers of request
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| Headers | [RequestExtendedHeader.KV](#service.RequestExtendedHeader.KV) | repeated | Headers carries list of key-value headers |
|
||||
|
||||
|
||||
<a name="service.RequestExtendedHeader.KV"></a>
|
||||
|
||||
### Message RequestExtendedHeader.KV
|
||||
KV contains string key-value pair
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| K | [string](#string) | | K carries extended header key |
|
||||
| V | [string](#string) | | V carries extended header value |
|
||||
|
||||
|
||||
<a name="service.RequestMetaHeader"></a>
|
||||
|
||||
### Message RequestMetaHeader
|
||||
RequestMetaHeader contains information about request meta headers
|
||||
(should be embedded into message)
|
||||
RequestMetaHeader contains information about request meta headers.
|
||||
|
||||
|
||||
| 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 |
|
||||
| ExtendedHeader | [RequestExtendedHeader](#service.RequestExtendedHeader) | | ExtendedHeader carries extended headers of the request |
|
||||
| TTL | [uint32](#uint32) | | Carries maximum number of nodes in the request route. |
|
||||
| XHeaders | [RequestMetaHeader.XHeader](#service.RequestMetaHeader.XHeader) | repeated | Carries request X-Headers. |
|
||||
|
||||
|
||||
<a name="service.RequestMetaHeader.XHeader"></a>
|
||||
|
||||
### Message RequestMetaHeader.XHeader
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| Key | [string](#string) | | Carries key to the X-Header. |
|
||||
| Value | [string](#string) | | Carries value of the X-Header. |
|
||||
|
||||
<!-- end messages -->
|
||||
|
||||
|
@ -117,8 +102,7 @@ BearerTokenMsg carries information about request ACL rules with limited lifetime
|
|||
<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).
|
||||
RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request.
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
|
@ -136,8 +120,8 @@ RequestVerificationHeader is a set of signatures of every NeoFS Node that proces
|
|||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| Key | [bytes](#bytes) | | Key is compressed public key used for signature. |
|
||||
| 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.Token"></a>
|
||||
|
|
|
@ -1,33 +1,23 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package service;
|
||||
|
||||
option go_package = "github.com/nspcc-dev/neofs-api-go/service";
|
||||
option csharp_namespace = "NeoFS.API.Service";
|
||||
|
||||
// RequestMetaHeader contains information about request meta headers
|
||||
// (should be embedded into message)
|
||||
// RequestMetaHeader contains information about request meta headers.
|
||||
message RequestMetaHeader {
|
||||
// TTL must be larger than zero, it decreased in every NeoFS Node
|
||||
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;
|
||||
// ExtendedHeader carries extended headers of the request
|
||||
RequestExtendedHeader ExtendedHeader = 5;
|
||||
}
|
||||
// Carries maximum number of nodes in the request route.
|
||||
uint32 TTL = 1;
|
||||
|
||||
// RequestExtendedHeader contains extended headers of request
|
||||
message RequestExtendedHeader {
|
||||
// KV contains string key-value pair
|
||||
message KV {
|
||||
// K carries extended header key
|
||||
string K = 1;
|
||||
message XHeader {
|
||||
// Carries key to the X-Header.
|
||||
string Key = 1;
|
||||
|
||||
// V carries extended header value
|
||||
string V = 2;
|
||||
// Carries value of the X-Header.
|
||||
string Value = 2;
|
||||
}
|
||||
|
||||
// Headers carries list of key-value headers
|
||||
repeated KV Headers = 1;
|
||||
// Carries request X-Headers.
|
||||
repeated XHeader XHeaders = 2;
|
||||
}
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package service;
|
||||
|
||||
option go_package = "github.com/nspcc-dev/neofs-api-go/service";
|
||||
option csharp_namespace = "NeoFS.API.Service";
|
||||
|
||||
import "refs/types.proto";
|
||||
|
||||
// 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.
|
||||
message RequestVerificationHeader {
|
||||
message Signature {
|
||||
// Key is compressed public key used for signature.
|
||||
bytes Key = 1;
|
||||
|
||||
// Sign is signature of the request or session key.
|
||||
bytes Sign = 1;
|
||||
// Peer is compressed public key used for signature.
|
||||
bytes Peer = 2;
|
||||
bytes Sign = 2;
|
||||
}
|
||||
|
||||
// Signatures is a set of signatures of every passed NeoFS Node
|
||||
|
@ -84,14 +86,6 @@ message TokenLifetime {
|
|||
uint64 ValidUntil = 2;
|
||||
}
|
||||
|
||||
// TODO: for variable token types and version redefine message
|
||||
// Example:
|
||||
// message Token {
|
||||
// TokenType TokenType = 1;
|
||||
// uint32 Version = 2;
|
||||
// bytes Data = 3;
|
||||
// }
|
||||
|
||||
// BearerTokenMsg carries information about request ACL rules with limited lifetime
|
||||
message BearerTokenMsg {
|
||||
message Info {
|
||||
|
|
Loading…
Reference in a new issue