about summary refs log tree commit diff
path: root/users/edef/crunch-v2/protos/flatstore.proto
blob: 2f2838fc75c28b9af3d55b9a83fd4a7b20b394a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
syntax = "proto3";

package tvix.flatstore.v1;

message Path {
    bytes nar_hash = 1;

    oneof node {
        DirectoryNode directory = 2;
        FileNode file = 3;
        SymlinkNode symlink = 4;
    }
}

message DirectoryNode {
    bytes name = 1;
    repeated DirectoryNode directories = 2;
    repeated FileNode files = 3;
    repeated SymlinkNode symlinks = 4;
}

message FileNode {
    bytes name = 1;
    bytes hash = 2;
    repeated Chunk chunks = 3;
    bool executable = 4;
}

message Chunk {
    bytes hash = 1;
    uint32 size = 2;
    uint32 size_compressed = 3;
}

message SymlinkNode {
    bytes name = 1;
    bytes target = 2;
}