session: Tidy up the format
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0ca83fcef6
commit
ad5126f53f
2 changed files with 25 additions and 20 deletions
|
@ -36,7 +36,7 @@ rpc Create(CreateRequest) returns (CreateResponse);
|
||||||
|
|
||||||
#### Method Create
|
#### Method Create
|
||||||
|
|
||||||
Create opens new session between the client and the server
|
Create opens new session between the client and the server.
|
||||||
|
|
||||||
| Name | Input | Output |
|
| Name | Input | Output |
|
||||||
| ---- | ----- | ------ |
|
| ---- | ----- | ------ |
|
||||||
|
@ -47,27 +47,27 @@ Create opens new session between the client and the server
|
||||||
<a name="session.CreateRequest"></a>
|
<a name="session.CreateRequest"></a>
|
||||||
|
|
||||||
### Message CreateRequest
|
### Message CreateRequest
|
||||||
CreateRequest carries an information necessary for opening a session
|
CreateRequest carries an information necessary for opening a session.
|
||||||
|
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| OwnerID | [refs.OwnerID](#refs.OwnerID) | | OwnerID carries an identifier of a session initiator. |
|
| OwnerID | [refs.OwnerID](#refs.OwnerID) | | Carries an identifier of a session initiator. |
|
||||||
| Lifetime | [service.TokenLifetime](#service.TokenLifetime) | | Lifetime carries a lifetime of the session |
|
| Lifetime | [service.TokenLifetime](#service.TokenLifetime) | | Carries a lifetime of the session. |
|
||||||
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
|
| MetaHeader | [service.RequestMetaHeader](#service.RequestMetaHeader) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
|
||||||
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
|
| VerifyHeader | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
|
||||||
|
|
||||||
|
|
||||||
<a name="session.CreateResponse"></a>
|
<a name="session.CreateResponse"></a>
|
||||||
|
|
||||||
### Message CreateResponse
|
### Message CreateResponse
|
||||||
CreateResponse carries an information about the opened session
|
CreateResponse carries an information about the opened session.
|
||||||
|
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ID | [bytes](#bytes) | | ID carries an identifier of session token |
|
| ID | [bytes](#bytes) | | ID carries an identifier of session token. |
|
||||||
| SessionKey | [bytes](#bytes) | | SessionKey carries a session public key |
|
| SessionKey | [bytes](#bytes) | | SessionKey carries a session public key. |
|
||||||
|
|
||||||
<!-- end messages -->
|
<!-- end messages -->
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package session;
|
package session;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/session";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/session";
|
||||||
option csharp_namespace = "NeoFS.API.Session";
|
option csharp_namespace = "NeoFS.API.Session";
|
||||||
|
|
||||||
|
@ -8,29 +10,32 @@ import "service/verify.proto";
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
|
|
||||||
service Session {
|
service Session {
|
||||||
// Create opens new session between the client and the server
|
// Create opens new session between the client and the server.
|
||||||
rpc Create (CreateRequest) returns (CreateResponse);
|
rpc Create (CreateRequest) returns (CreateResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateRequest carries an information necessary for opening a session
|
// CreateRequest carries an information necessary for opening a session.
|
||||||
message CreateRequest {
|
message CreateRequest {
|
||||||
// OwnerID carries an identifier of a session initiator.
|
// Carries an identifier of a session initiator.
|
||||||
refs.OwnerID OwnerID = 1;
|
refs.OwnerID OwnerID = 1;
|
||||||
|
|
||||||
// Lifetime carries a lifetime of the session
|
// Carries a lifetime of the session.
|
||||||
service.TokenLifetime Lifetime = 2;
|
service.TokenLifetime Lifetime = 2;
|
||||||
|
|
||||||
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
// Carries request meta information. Header data is used only to regulate message
|
||||||
service.RequestMetaHeader Meta = 98;
|
// transport and does not affect request execution.
|
||||||
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
service.RequestMetaHeader MetaHeader = 98;
|
||||||
service.RequestVerificationHeader Verify = 99;
|
|
||||||
|
// Carries request verification information. This header is used to authenticate
|
||||||
|
// the nodes of the message route and check the correctness of transmission.
|
||||||
|
service.RequestVerificationHeader VerifyHeader = 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateResponse carries an information about the opened session
|
// CreateResponse carries an information about the opened session.
|
||||||
message CreateResponse {
|
message CreateResponse {
|
||||||
// ID carries an identifier of session token
|
// ID carries an identifier of session token.
|
||||||
bytes ID = 1;
|
bytes ID = 1;
|
||||||
|
|
||||||
// SessionKey carries a session public key
|
// SessionKey carries a session public key.
|
||||||
bytes SessionKey = 2;
|
bytes SessionKey = 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue