2017-06-06 18:01:18 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package pb;
|
|
|
|
|
2017-06-21 21:48:21 +00:00
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
|
2017-06-06 18:01:18 +00:00
|
|
|
message Op {
|
2017-06-09 01:16:19 +00:00
|
|
|
repeated Input inputs = 1;
|
2017-06-06 18:01:18 +00:00
|
|
|
oneof op {
|
|
|
|
ExecOp exec = 2;
|
|
|
|
SourceOp source = 3;
|
|
|
|
CopyOp copy = 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-09 01:16:19 +00:00
|
|
|
message Input {
|
2017-06-21 21:48:21 +00:00
|
|
|
string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
|
2017-07-21 17:58:24 +00:00
|
|
|
int64 index = 2 [(gogoproto.customtype) = "OutputIndex", (gogoproto.nullable) = false];
|
2017-06-09 01:16:19 +00:00
|
|
|
}
|
|
|
|
|
2017-06-06 18:01:18 +00:00
|
|
|
message ExecOp {
|
|
|
|
Meta meta = 1;
|
|
|
|
repeated Mount mounts = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Meta {
|
|
|
|
repeated string args = 1;
|
|
|
|
repeated string env = 2;
|
|
|
|
string cwd = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Mount {
|
2017-07-21 17:58:24 +00:00
|
|
|
int64 input = 1 [(gogoproto.customtype) = "InputIndex", (gogoproto.nullable) = false];
|
2017-06-06 18:01:18 +00:00
|
|
|
string selector = 2;
|
|
|
|
string dest = 3;
|
2017-07-21 17:58:24 +00:00
|
|
|
int64 output = 4 [(gogoproto.customtype) = "OutputIndex", (gogoproto.nullable) = false];
|
2017-07-18 06:08:22 +00:00
|
|
|
bool readonly = 5;
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CopyOp {
|
|
|
|
repeated CopySource src = 1;
|
|
|
|
string dest = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CopySource {
|
2017-07-21 17:58:24 +00:00
|
|
|
int64 input = 1 [(gogoproto.customtype) = "InputIndex", (gogoproto.nullable) = false];
|
2017-06-06 18:01:18 +00:00
|
|
|
string selector = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SourceOp {
|
2017-07-08 23:25:07 +00:00
|
|
|
// source type?
|
2017-06-06 18:01:18 +00:00
|
|
|
string identifier = 1;
|
2017-07-08 23:25:07 +00:00
|
|
|
map<string, string> attrs = 2;
|
2017-06-06 18:01:18 +00:00
|
|
|
}
|