proto update

This commit is contained in:
ycc 2022-09-05 14:09:39 +02:00
parent 6d183d2b59
commit 0becc091a1
2 changed files with 45 additions and 16 deletions

14
doc/messages.puml Normal file
View File

@ -0,0 +1,14 @@
@startwbs
* Messages
** To server packed (protobuf)
*** Encrypted server message and signature (binary data)
**** ToServerMessage (protobuf)
***** Encrypted user message and signature
****** UserMessage (protobuf)
** From server packed (protobuf)
*** Encrypted server message and signature (binary data)
**** FromServerMessage (protobuf)
***** Encrypted user message and signature
****** UserMessage (protobuf)
@endwbs

View File

@ -17,30 +17,46 @@ message PackedUserMessage {
bytes Signature=4;
}
// structure defining a message to be forwarded encrypted, then sent in a "packedmessage"
message ServerMessage {
string Type = 1;
string ServerPubKey = 2 ;
bytes Payload = 3 ;
// structure defining a message encrypted, then sent in a "packedmessage" payload
message ToServerMessage {
string Type = 1; // Type
string ServerPubKey = 2 ; // My pub key for the server to send me an encrypter answer
bytes Payload = 3 ; // optional payload for server
message ConversationRequest { // Structure for requestion incoming messages
string lookupKey = 1; // lookup key for a conversation
string LastServerUuidOK = 2; // Last Server message UUID received (send me all after that one)
bool PublishOnline = 3; // ?? Publish my online status for that contact ?
string lookupSignature = 4; // prove that I own the private key by signing that block
}
repeated ConversationRequest PullRequest = 7;
message PostedMessage{
string lookupKey= 1;
repeated PackedUserMessage Messages = 2;
}
repeated PostedMessage Messages = 9;
string NextServerKey = 10;
string Url = 11;
}
// structure defining a from serve receiver message decrypted from a "packedmessage" payload
message FromServerMessage {
string Type = 1; // Type
string ServerPubKey = 2 ; // My pub key for the server to send me an encrypter answer
bytes Payload = 3 ; //
uint64 ServerReceived = 4 ;
string ServerUuid = 5 ;
message ConversationRequest {
string ccid = 1;
string LastUuidOK = 2;
bool PublishOnline = 3;
}
message ConversationResponse {
repeated string MessageUuids = 1;
string SourceIpAddress = 2;
}
repeated ConversationRequest PollRequest = 7;
map<string,ConversationResponse> PollResponse = 8;
map<string,ConversationResponse> PullResponse = 8;
message PostedMessage{
string ccid= 1;
string lookupKey= 1;
repeated PackedUserMessage Messages = 2;
}
repeated PostedMessage Messages = 9;
@ -62,7 +78,6 @@ message MinimalContact {
repeated Server TrustedServers = 3;
}
message UserMessage {
string Destination = 1;