Complete refactor using protobuff

This commit is contained in:
ycc
2022-01-15 22:19:29 +01:00
parent 60b14db80c
commit c07cdff3de
29 changed files with 1088 additions and 131 deletions

83
doc/class_messages01.puml Normal file
View File

@ -0,0 +1,83 @@
@startuml Messages sturcture and hierarchy
class PackedServerMessage {
From string
Payload string
Signature string
}
class ServerMessage {
Type string
}
class PackedForwardMessage {
NextServerKey string
Url string
Payload string
}
class PackedUserMessage {
DestinationKey
Payload
Signature
}
class UserMessage
{
LocalUuid
Destination
From
Type
Data
Sent
NextKey
}
class InternalMessage {
With
SentByMe
UserMessageData
ServerUuid
Received
Processed
TransferPath
}
class ConversationRequest {
Destination string
LastUuidOK string
PublishIp bool
}
class PollRequest {
Destinations []ConversationRequest
Time time.Time
}
class ConversationResponse {
MessageUuids []string
SourceIpAddress string
}
class PollResponse {
Conversations map[string]ConversationResponse
}
class MessageBodies {
Messages []Message
}
PackedServerMessage *-- ServerMessage
ServerMessage <|--PackedForwardMessage
ServerMessage <|--PollRequest
PollRequest *-- ConversationRequest
PollResponse *--ConversationResponse
ServerMessage <|--PollResponse
ServerMessage <|-- MessageBodies
PackedUserMessage *-- UserMessage
InternalMessage *-- UserMessage
PackedForwardMessage *-- ServerMessage
PackedForwardMessage *-- PackedForwardMessage
MessageBodies *-- PackedUserMessage
@enduml