...
1syntax = "proto3";
2
3package proto;
4option go_package = "github.com/containerd/continuity/proto;proto";
5
6// Manifest specifies the entries in a container bundle, keyed and sorted by
7// path.
8message Manifest {
9 repeated Resource resource = 1;
10}
11
12message Resource {
13 // Path specifies the path from the bundle root. If more than one
14 // path is present, the entry may represent a hardlink, rather than using
15 // a link target. The path format is operating system specific.
16 repeated string path = 1;
17
18 // NOTE(stevvooe): Need to define clear precedence for user/group/uid/gid precedence.
19
20 // Uid specifies the user id for the resource.
21 int64 uid = 2;
22
23 // Gid specifies the group id for the resource.
24 int64 gid = 3;
25
26 // user and group are not currently used but their field numbers have been
27 // reserved for future use. As such, they are marked as deprecated.
28 string user = 4 [deprecated=true]; // "deprecated" stands for "reserved" here
29 string group = 5 [deprecated=true]; // "deprecated" stands for "reserved" here
30
31 // Mode defines the file mode and permissions. We've used the same
32 // bit-packing from Go's os package,
33 // http://golang.org/pkg/os/#FileMode, since they've done the work of
34 // creating a cross-platform layout.
35 uint32 mode = 6;
36
37 // NOTE(stevvooe): Beyond here, we start defining type specific fields.
38
39 // Size specifies the size in bytes of the resource. This is only valid
40 // for regular files.
41 uint64 size = 7;
42
43 // Digest specifies the content digest of the target file. Only valid for
44 // regular files. The strings are formatted in OCI style, i.e. <alg>:<encoded>.
45 // For detailed information about the format, please refer to OCI Image Spec:
46 // https://github.com/opencontainers/image-spec/blob/master/descriptor.md#digests-and-verification
47 // The digests are sorted in lexical order and implementations may choose
48 // which algorithms they prefer.
49 repeated string digest = 8;
50
51 // Target defines the target of a hard or soft link. Absolute links start
52 // with a slash and specify the resource relative to the bundle root.
53 // Relative links do not start with a slash and are relative to the
54 // resource path.
55 string target = 9;
56
57 // Major specifies the major device number for character and block devices.
58 uint64 major = 10;
59
60 // Minor specifies the minor device number for character and block devices.
61 uint64 minor = 11;
62
63 // Xattr provides storage for extended attributes for the target resource.
64 repeated XAttr xattr = 12;
65
66 // Ads stores one or more alternate data streams for the target resource.
67 repeated ADSEntry ads = 13;
68
69}
70
71// XAttr encodes extended attributes for a resource.
72message XAttr {
73 // Name specifies the attribute name.
74 string name = 1;
75
76 // Data specifies the associated data for the attribute.
77 bytes data = 2;
78}
79
80// ADSEntry encodes information for a Windows Alternate Data Stream.
81message ADSEntry {
82 // Name specifices the stream name.
83 string name = 1;
84
85 // Data specifies the stream data.
86 // See also the description about the digest below.
87 bytes data = 2;
88
89 // Digest is a CAS representation of the stream data.
90 //
91 // At least one of data or digest MUST be specified, and either one of them
92 // SHOULD be specified.
93 //
94 // How to access the actual data using the digest is implementation-specific,
95 // and implementations can choose not to implement digest.
96 // So, digest SHOULD be used only when the stream data is large.
97 string digest = 3;
98}
View as plain text