diff --git a/object/service.proto b/object/service.proto index bf369fa..541d861 100644 --- a/object/service.proto +++ b/object/service.proto @@ -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 diff --git a/proto-docs/service.md b/proto-docs/service.md index 8cad084..fc0eb48 100644 --- a/proto-docs/service.md +++ b/proto-docs/service.md @@ -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 @@ - - -### 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 | - - - - -### 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 | - - ### 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. | + + + + +### 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. | @@ -117,8 +102,7 @@ BearerTokenMsg carries information about request ACL rules with limited lifetime ### 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. | diff --git a/service/meta.proto b/service/meta.proto index 41e3776..c2cb168 100644 --- a/service/meta.proto +++ b/service/meta.proto @@ -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; } diff --git a/service/verify.proto b/service/verify.proto index 9a91ced..76fd15e 100644 --- a/service/verify.proto +++ b/service/verify.proto @@ -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 {