Files
git-pages/src/schema.proto
Catherine dbfdd5d418 Refactor Protobuf schema.
This is to prepare for making manifest debug representation accessible.

- change `Entry.size` to `uint32` so that it's serialized as a number
  in protoJSON export
- rename `Manifest.files` to `Manifest.contents`
- leave size and data for the root directory empty, same as with
  non-root directories fetched from git
2025-09-19 15:20:35 +00:00

30 lines
570 B
Protocol Buffer

edition = "2023";
option go_package = "whitequark.org/git-pages/main";
enum Type {
// Invalid entry.
Invalid = 0;
// Directory.
Directory = 1;
// Inline file. `Blob.Data` contains file contents.
InlineFile = 2;
// External file. `Blob.Data` contains object reference.
ExternalFile = 3;
// Symlink. `Blob.Data` contains relative path.
Symlink = 4;
}
message Entry {
Type type = 1;
uint32 size = 2;
bytes data = 3;
}
message Manifest {
string repo_url = 1;
string branch = 2;
string commit = 3;
map<string, Entry> contents = 4;
}