docs: capture protocol and implementation gaps
This commit is contained in:
11
packages/protocol/README.md
Normal file
11
packages/protocol/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Protocol Package
|
||||
|
||||
This directory exists because the milestone plan expects a shared protocol package.
|
||||
|
||||
For now:
|
||||
|
||||
- `simplesync.proto` captures an eventual strongly typed schema
|
||||
- `docs/specs/simplesync-protocol.md` remains the more complete behavioral reference
|
||||
|
||||
The current docs still need a final decision on whether wire messages are JSON, protobuf-over-WebSocket, or JSON generated from protobuf definitions.
|
||||
|
||||
28
packages/protocol/simplesync.proto
Normal file
28
packages/protocol/simplesync.proto
Normal file
@@ -0,0 +1,28 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package mdhub.protocol.v1;
|
||||
|
||||
option go_package = "github.com/tim/md-hub-secure/packages/protocol/gen/go/mdhub/protocol/v1;protocolv1";
|
||||
|
||||
message SyncRequest {
|
||||
string client_id = 1;
|
||||
string root_hash = 2;
|
||||
map<string, string> files = 3;
|
||||
}
|
||||
|
||||
message SyncResponse {
|
||||
string server_root_hash = 1;
|
||||
repeated string missing_from_client = 2;
|
||||
repeated string missing_from_server = 3;
|
||||
repeated string conflicts = 4;
|
||||
}
|
||||
|
||||
message ContentRequest {
|
||||
string hash = 1;
|
||||
}
|
||||
|
||||
message ContentResponse {
|
||||
string hash = 1;
|
||||
bytes content = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user