api/rpc/v1/spec.proto

100 lines
1.9 KiB
Protocol Buffer

syntax = "proto3";
package buildr.rpc.v1;
enum Category {
CategoryUnknown = 0;
CategoryTool = 1;
CategoryTask = 2;
CategoryBuild = 3;
CategoryPackage = 4;
}
message ModuleReference {
Category module_category = 1;
string module_type = 2;
}
message ModuleSpec {
enum ValueKind {
ValueKindUnknown = 0;
ValueKindAttribute = 1;
ValueKindLabel = 2;
ValueKindBlock = 4;
}
enum ValueType {
ValueTypeUnknown = 0;
ValueTypeSingle = 1;
ValueTypeObject = 2;
ValueTypeMap = 3;
ValueTypeStringSlice = 4;
ValueTypeIntSlice = 5;
ValueTypeDoubleSlice = 6;
ValueTypeBoolSlice = 7;
}
message Value {
ValueType type = 1;
ValueKind kind = 2;
map<string, Value> complex_value = 10;
oneof single_value {
string string_value = 11;
int64 int_value = 12;
double double_value = 13;
bool bool_value = 14;
}
repeated string string_values = 21;
repeated int64 int_values = 22;
repeated double double_values = 23;
repeated bool bool_values = 24;
}
Category category = 1;
string type = 2;
map<string, Value> values = 3;
}
message ContainerCapabilities {
repeated string add = 1;
repeated string drop = 2;
}
message ContainerBindMount {
string target = 1;
string source = 2;
bool read_only = 3;
}
message ContainerTmpfsMount {
string target = 1;
int64 size = 2;
bool read_only = 3;
}
message ContainerVolumeMount {
string target = 1;
string name = 2;
bool read_only = 3;
bool no_copy = 4;
}
message ContainerSpec {
string image = 1;
string user = 2;
bool privileged = 3;
ContainerCapabilities capabilities = 4;
repeated ContainerVolumeMount volume_mounts = 5;
repeated ContainerTmpfsMount tmpfs_mounts = 6;
repeated ContainerBindMount bind_mounts = 7;
}
message TaskSpec {
string module_name = 1;
ModuleSpec module_spec = 2;
ContainerSpec container = 3;
string output_dir = 4;
}