Basic proto file start.

This commit is contained in:
2023-10-24 22:01:15 -07:00
parent d9f779f071
commit 79f30684de
16 changed files with 224 additions and 43 deletions

View File

@@ -4,8 +4,9 @@ package sgardpb;
import "google/protobuf/timestamp.proto";
// Header defines common metadata for messages in sgard.
message Header {
uint32 version = 1;
message Header
{
uint32 version = 1;
google.protobuf.Timestamp created = 2;
google.protobuf.Timestamp updated = 3;
}

View File

@@ -4,7 +4,8 @@ package sgardpb;
import 'header.proto';
import 'path.proto';
message HomeDir {
message HomeDir
{
Header header = 1;
map<string, Source> files = 5;

View File

@@ -6,26 +6,28 @@ import "google/protobuf/timestamp.proto";
enum PathType {
PATHTYPE_UNSPECIFIED = 0;
PATHTYPE_FILE = 1;
PATHTYPE_DIRECTORY = 2;
PATHTYPE_LINK = 3;
PATHTYPE_FILE = 1;
PATHTYPE_DIRECTORY = 2;
PATHTYPE_LINK = 3;
};
message FilePath {
message FilePath
{
Header header = 1;
string source_path = 2;
string dest_path = 3;
string dest_path = 3;
// todo: add mode, action (e.g. copy vs link)
};
message Source {
Header header = 1;
message Source
{
Header header = 1;
PathType path_type = 2;
oneof path {
oneof path
{
FilePath file = 5;
};
};