-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
ops.proto
67 lines (55 loc) · 1.46 KB
/
ops.proto
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
syntax = "proto3";
package pb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
message Op {
repeated Input inputs = 1;
oneof op {
ExecOp exec = 2;
SourceOp source = 3;
CopyOp copy = 4;
BuildOp build = 5;
}
}
message Input {
string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
int64 index = 2 [(gogoproto.customtype) = "OutputIndex", (gogoproto.nullable) = false];
}
message ExecOp {
Meta meta = 1;
repeated Mount mounts = 2;
}
message Meta {
repeated string args = 1;
repeated string env = 2;
string cwd = 3;
}
message Mount {
int64 input = 1 [(gogoproto.customtype) = "InputIndex", (gogoproto.nullable) = false];
string selector = 2;
string dest = 3;
int64 output = 4 [(gogoproto.customtype) = "OutputIndex", (gogoproto.nullable) = false];
bool readonly = 5;
}
message CopyOp {
repeated CopySource src = 1;
string dest = 2;
}
message CopySource {
int64 input = 1 [(gogoproto.customtype) = "InputIndex", (gogoproto.nullable) = false];
string selector = 2;
}
message SourceOp {
// source type?
string identifier = 1;
map<string, string> attrs = 2;
}
message BuildOp {
int64 builder = 1 [(gogoproto.customtype) = "InputIndex", (gogoproto.nullable) = false];
map<string, BuildInput> inputs = 2;
repeated bytes def = 3;
map<string, string> attrs = 4;
// outputs
}
message BuildInput {
int64 input = 1 [(gogoproto.customtype) = "InputIndex", (gogoproto.nullable) = false];
}