| syntax = "proto3"; |
| |
| package chromite.api; |
| |
| option go_package = "go.chromium.org/chromiumos/infra/proto/go/chromite/api"; |
| |
| import "chromite/api/build_api.proto"; |
| import "chromiumos/common.proto"; |
| |
| |
| // 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 to create. |
| chromiumos.Chroot chroot = 2; |
| } |
| |
| // Create response message. |
| message CreateResponse { |
| // The resulting chroot version. |
| ChrootVersion version = 1; |
| } |
| |
| // Delete request message. |
| message DeleteRequest { |
| // The chroot to delete. |
| chromiumos.Chroot chroot = 2; |
| } |
| |
| // Delete request message. |
| message DeleteResponse { |
| } |
| |
| message UnmountRequest { |
| // The chroot to unmount. |
| chromiumos.Chroot chroot = 1; |
| } |
| |
| message UnmountResponse { |
| } |
| |
| // 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; |
| // Whether a toolchain change has occurred. |
| bool toolchain_changed = 2; |
| } |
| |
| // The flags. |
| Flags flags = 1; |
| // The targets whose toolchains should be updated in the chroot. |
| repeated chromiumos.BuildTarget toolchain_targets = 2; |
| // The chroot to use to execute the endpoint. |
| chromiumos.Chroot chroot = 3; |
| } |
| |
| // Chroot update response message. |
| message UpdateResponse { |
| // The chroot version after update is complete. |
| ChrootVersion version = 1; |
| } |
| |
| message CleanRequest { |
| chromiumos.Chroot chroot = 1; |
| } |
| |
| message CleanResponse {} |
| |
| // 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); |
| |
| // Delete a chroot. |
| rpc Delete(DeleteRequest) returns (DeleteResponse); |
| |
| // Clean up unneeded files from the chroot. |
| rpc Clean(CleanRequest) returns (CleanResponse); |
| |
| // Unmount a chroot. |
| rpc Unmount(UnmountRequest) returns (UnmountResponse); |
| |
| // Update the chroot. |
| rpc Update(UpdateRequest) returns (UpdateResponse) { |
| option (method_options) = { |
| method_chroot_assert: INSIDE, |
| }; |
| } |
| } |