docs: add doc comments for meta and verify proto files

This commit is contained in:
Evgeniy Kulikov 2019-11-21 15:14:01 +03:00
parent b8f3641b59
commit e2842ae216
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2
2 changed files with 16 additions and 0 deletions

View file

@ -6,8 +6,14 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.stable_marshaler_all) = true;
// RequestMetaHeader contains information about request meta headers
// (should be embedded into message)
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;
}

View file

@ -6,15 +6,25 @@ import "github.com/gogo/protobuf/gogoproto/gogo.proto";
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 Sign {
// Sign is signature of the request or session key.
bytes Sign = 1;
// Peer is compressed public key used for signature.
bytes Peer = 2;
}
message Signature {
// Sign is a signature and public key of the request.
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;
}
// Signatures is a set of signatures of every passed NeoFS Node
repeated Signature Signatures = 1;
}