| 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"; |
| |
| |
| // Depgraph messages and service. |
| |
| // Message contains data about the portage dependency graph and the packages' |
| // dependency source paths. |
| message DepGraph { |
| // The board whose dependency graph is being created for. |
| chromiumos.BuildTarget build_target = 1; |
| // List of packages in the dependency graph and their infos, which include |
| // dependency packages and the source paths. |
| repeated PackageDepInfo package_deps = 2; |
| } |
| |
| // Message describing a package and its dependencies. |
| message PackageDepInfo { |
| // The package itself. |
| chromiumos.PackageInfo package_info = 1; |
| |
| // List of packages this package depends on. |
| repeated chromiumos.PackageInfo dependency_packages = 2; |
| |
| // List of source paths the package depends on. |
| repeated SourcePath dependency_source_paths = 3; |
| } |
| |
| // Message describes a source path. |
| message SourcePath { |
| string path = 1; |
| } |
| |
| |
| // Message for creating dependency graph json map. |
| // Example Json: |
| // {"build_target":{"name":"board"},"output_file":"/tmp/depgraph.json"} |
| message GetBuildDependencyGraphRequest { |
| // Required. |
| // The board whose dependency graph is being created. |
| chromiumos.BuildTarget build_target = 1; |
| // The chroot to use to execute the endpoint. |
| chromiumos.Chroot chroot = 2; |
| // List of packages for which to create the dependency graph. If none are |
| // specified the standard list of packages is used. |
| repeated chromiumos.PackageInfo packages = 3; |
| } |
| |
| // Response from creating dependency graph json map. |
| message GetBuildDependencyGraphResponse { |
| DepGraph dep_graph = 1; |
| DepGraph sdk_dep_graph = 2; |
| } |
| |
| message GetToolchainPathsRequest { |
| // The chroot to use to execute the endpoint. |
| chromiumos.Chroot chroot = 1; |
| } |
| |
| message GetToolchainPathsResponse { |
| // List of paths considered relevant to toolchain packages. |
| repeated SourcePath paths = 1; |
| } |
| |
| // Service to create a variety of package dependency graphs. |
| service DependencyService { |
| // The module implementing the service. |
| option (service_options) = { |
| module: "dependency", |
| service_chroot_assert: INSIDE, |
| }; |
| |
| // Get the build dependency graph. |
| rpc GetBuildDependencyGraph(GetBuildDependencyGraphRequest) |
| returns (GetBuildDependencyGraphResponse); |
| |
| // Get the list of source paths that are relevant to the toolchain |
| rpc GetToolchainPaths(GetToolchainPathsRequest) |
| returns (GetToolchainPathsResponse); |
| } |