chore(tvix/store/protos): move (Root)Node into separate message

This is gonna get used in another place in a second.

Co-Authored-By: edef <edef@unfathomable.blue>
Change-Id: I347c11c8d24379628b7ed09d2c90670c576e686a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7617
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Florian Klink 2022-12-23 18:53:57 +01:00 committed by flokli
parent 5c748780b5
commit 27bfc8cfcd
2 changed files with 198 additions and 131 deletions

View file

@ -12,19 +12,23 @@ option go_package = "code.tvl.fyi/tvix/store/protos;storev1";
// That's a single element inside /nix/store.
message PathInfo {
// The path can be a directory, file or symlink.
Node node = 1;
// List of references (output path hashes)
// This really is the raw *bytes*, after decoding nixbase32, and not a
// base32-encoded string.
repeated bytes references = 2;
// see below.
NARInfo narinfo = 3;
}
message Node {
oneof node {
DirectoryNode directory = 1;
FileNode file = 2;
SymlinkNode symlink = 3;
}
// List of references (output path hashes)
// This really is the raw *bytes*, after decoding nixbase32, and not a
// base32-encoded string.
repeated bytes references = 4;
// see below.
NARInfo narinfo = 5;
}
// Nix C++ uses NAR (Nix Archive) as a format to transfer store paths,