buildkit/solver/pb/ops.proto

55 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

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;
}
}
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;
}