diff options
author | Florian Klink <flokli@flokli.de> | 2023-12-09T13·22+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-12-11T10·24+0000 |
commit | 459d9e106f68ea2761ee2dcaaa28e67756d6bdc3 (patch) | |
tree | 46aa68022f1b41aa2e66977073c5cf41d585894a /tvix/castore/protos/castore.proto | |
parent | db3ef5255fd6f6c4c4ac0e9077803a9eb70e63d9 (diff) |
chore(tvix/castore/protof): buf format r/7149
Change-Id: Idf11de78b0d6eca69fda34a89f2c57a00ed89ad5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10237 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Adam Joseph <adam@westernsemico.com>
Diffstat (limited to 'tvix/castore/protos/castore.proto')
-rw-r--r-- | tvix/castore/protos/castore.proto | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/tvix/castore/protos/castore.proto b/tvix/castore/protos/castore.proto index e05c43ee2f22..1ef404404504 100644 --- a/tvix/castore/protos/castore.proto +++ b/tvix/castore/protos/castore.proto @@ -8,8 +8,8 @@ package tvix.castore.v1; option go_package = "code.tvl.fyi/tvix/castore-go;castorev1"; // A Directory can contain Directory, File or Symlink nodes. -// Each of these nodes have a name attribute, which is the basename in that directory -// and node type specific attributes. +// Each of these nodes have a name attribute, which is the basename in that +// directory and node type specific attributes. // The name attribute: // - MUST not contain slashes or null bytes // - MUST not be '.' or '..' @@ -17,56 +17,55 @@ option go_package = "code.tvl.fyi/tvix/castore-go;castorev1"; // Elements in each list need to be lexicographically ordered by the name // attribute. message Directory { - repeated DirectoryNode directories = 1; - repeated FileNode files = 2; - repeated SymlinkNode symlinks = 3; + repeated DirectoryNode directories = 1; + repeated FileNode files = 2; + repeated SymlinkNode symlinks = 3; } // A DirectoryNode represents a directory in a Directory. message DirectoryNode { - // The (base)name of the directory - bytes name = 1; - // The blake3 hash of a Directory message, serialized in protobuf canonical form. - bytes digest = 2; - // Number of child elements in the Directory referred to by `digest`. - // Calculated by summing up the numbers of `directories`, `files` and - // `symlinks`, and for each directory, its size field. Used for inode - // number calculation. - // This field is precisely as verifiable as any other Merkle tree edge. - // Resolve `digest`, and you can compute it incrementally. Resolve the - // entire tree, and you can fully compute it from scratch. - // A credulous implementation won't reject an excessive size, but this is - // harmless: you'll have some ordinals without nodes. Undersizing is - // obvious and easy to reject: you won't have an ordinal for some nodes. - uint64 size = 3; + // The (base)name of the directory + bytes name = 1; + // The blake3 hash of a Directory message, serialized in protobuf canonical form. + bytes digest = 2; + // Number of child elements in the Directory referred to by `digest`. + // Calculated by summing up the numbers of `directories`, `files` and + // `symlinks`, and for each directory, its size field. Used for inode number + // calculation. + // This field is precisely as verifiable as any other Merkle tree edge. + // Resolve `digest`, and you can compute it incrementally. Resolve the entire + // tree, and you can fully compute it from scratch. + // A credulous implementation won't reject an excessive size, but this is + // harmless: you'll have some ordinals without nodes. Undersizing is obvious + // and easy to reject: you won't have an ordinal for some nodes. + uint64 size = 3; } // A FileNode represents a regular or executable file in a Directory. message FileNode { - // The (base)name of the file - bytes name = 1; - // The blake3 digest of the file contents - bytes digest = 2; - // The file content size - uint64 size = 3; - // Whether the file is executable - bool executable = 4; + // The (base)name of the file + bytes name = 1; + // The blake3 digest of the file contents + bytes digest = 2; + // The file content size + uint64 size = 3; + // Whether the file is executable + bool executable = 4; } // A SymlinkNode represents a symbolic link in a Directory. message SymlinkNode { - // The (base)name of the symlink - bytes name = 1; - // The target of the symlink. - bytes target = 2; + // The (base)name of the symlink + bytes name = 1; + // The target of the symlink. + bytes target = 2; } // A Node is either a DirectoryNode, FileNode or SymlinkNode. message Node { - oneof node { - DirectoryNode directory = 1; - FileNode file = 2; - SymlinkNode symlink = 3; - } + oneof node { + DirectoryNode directory = 1; + FileNode file = 2; + SymlinkNode symlink = 3; + } } - |