blob: f8b009f03e50537b86ef24667d600133f19326eb [file] [log] [blame]
// Custom option defs must be proto2 syntax.
syntax = "proto2";
option go_package = "go.chromium.org/chromiumos/infra/proto/go/chromite/api";
import "google/protobuf/descriptor.proto";
// Build API custom Service and Method options.
// Config to allow chroot assertions to be made via service/method options.
enum ChrootAssertion {
NO_ASSERTION = 0;
INSIDE = 1;
OUTSIDE = 2;
}
// Custom Service options.
message BuildApiServiceOptions {
// The name of the controller module implementing the service.
required string module = 1;
// Assert any methods in the service are run inside/outside the chroot when
// specified, unless overridden by the method config.
optional ChrootAssertion service_chroot_assert = 2;
}
// Custom Method options.
message BuildApiMethodOptions {
// The name of the function implementing the method if different than the
// method name defined in the .proto.
optional string implementation_name = 1;
// Assert the method is run inside/outside the chroot when specified,
// overriding the service config when set.
optional ChrootAssertion method_chroot_assert = 2;
}
extend google.protobuf.ServiceOptions {
optional BuildApiServiceOptions service_options = 55000;
}
extend google.protobuf.MethodOptions {
optional BuildApiMethodOptions method_options = 55000;
}