| syntax = "proto3"; |
| |
| package chromite.api; |
| |
| import "chromite/api/build_api.proto"; |
| import "chromiumos/common.proto"; |
| |
| |
| // Contains some common cros_sdk path arguments. |
| message ChrootPaths { |
| // Override for the cache directory. |
| string cache = 1; |
| // Set the chrome root. |
| string chrome = 2; |
| // The absolute chroot path. |
| string chroot = 3; |
| } |
| |
| // The chroot version information. |
| message ChrootVersion { |
| // The version number. |
| uint32 version = 1; |
| } |
| |
| // Create request message. |
| message CreateRequest { |
| // Options that affect how the chroot is created. |
| message Flags { |
| // Whether or not to replace the chroot if it already exists. |
| bool no_replace = 1; |
| // Whether to do a full build of the SDK or use prebuilts. |
| bool bootstrap = 2; |
| // Whether the chroot should be mounted on a loopback image or created |
| // directly inside a directory. Set to true to create in a directory. |
| bool no_use_image = 3; |
| } |
| |
| // The chroot-create flag arguments. |
| Flags flags = 1; |
| // The chroot path arguments. |
| ChrootPaths paths = 2; |
| } |
| |
| // Create response message. |
| message CreateResponse { |
| // The resulting chroot version. |
| ChrootVersion version = 1; |
| } |
| |
| // Chroot update request message. |
| // Example json: |
| // {"toolchain_targets": [{"name": "eve"}]} |
| message UpdateRequest { |
| // Update flag arguments. |
| message Flags { |
| // Whether to build from source or use prebuilt packages. |
| bool build_source = 1; |
| } |
| |
| // The flags. |
| Flags flags = 1; |
| // The targets whose toolchains should be updated in the chroot. |
| repeated chromiumos.BuildTarget toolchain_targets = 2; |
| } |
| |
| // Chroot update response message. |
| message UpdateResponse { |
| // The chroot version after update is complete. |
| ChrootVersion version = 1; |
| } |
| |
| // SDK operations. |
| service SdkService { |
| // The service options (see build_api.proto). |
| option (service_options) = { |
| module: "sdk", |
| service_chroot_assert: OUTSIDE, |
| }; |
| |
| // Create method, supports replacing an existing chroot. |
| rpc Create(CreateRequest) returns (CreateResponse); |
| |
| // Update the chroot. |
| rpc Update(UpdateRequest) returns (UpdateResponse) { |
| option (method_options) = { |
| method_chroot_assert: INSIDE, |
| }; |
| } |
| } |