pub struct GcloudClient<E: GcloudExecutor = RealExecutor> { /* private fields */ }Expand description
GCP operations client, parameterized over the executor for testability.
Implementations§
Source§impl<E: GcloudExecutor> GcloudClient<E>
impl<E: GcloudExecutor> GcloudClient<E>
pub fn with_executor(executor: E) -> Self
pub async fn check_prerequisites( &self, project_id: &str, ) -> Result<PreflightReport, PreflightError>
Sourcepub async fn doctor(&self, project_id: Option<&str>) -> DoctorReport
pub async fn doctor(&self, project_id: Option<&str>) -> DoctorReport
Run all diagnostic checks without early return. Returns a report with pass/fail for each check item.
Sourcepub async fn ensure_artifact_repo(
&self,
project_id: &str,
region: &str,
repo_name: &str,
) -> Result<(), DeployError>
pub async fn ensure_artifact_repo( &self, project_id: &str, region: &str, repo_name: &str, ) -> Result<(), DeployError>
Ensure the Artifact Registry Docker repository exists, creating it if needed.
Sourcepub async fn delete_image(
&self,
image_tag: &str,
project_id: &str,
) -> Result<(), DeployError>
pub async fn delete_image( &self, image_tag: &str, project_id: &str, ) -> Result<(), DeployError>
Delete a container image from Artifact Registry.
pub async fn submit_build( &self, bundle_dir: &Path, project_id: &str, image_tag: &str, ) -> Result<(), CloudBuildError>
pub async fn deploy_to_cloud_run( &self, service_name: &str, image_tag: &str, project_id: &str, region: &str, config: &CloudRunConfig, secrets: &[String], ) -> Result<String, DeployError>
pub async fn describe_service( &self, service_name: &str, project_id: &str, region: &str, ) -> Result<String, DeployError>
pub async fn delete_service( &self, service_name: &str, project_id: &str, region: &str, ) -> Result<(), DeployError>
pub async fn read_logs( &self, service_name: &str, project_id: &str, region: &str, ) -> Result<(), DeployError>
pub async fn set_secret( &self, project_id: &str, secret_name: &str, secret_value: &str, ) -> Result<(), SecretError>
pub async fn get_project_number( &self, project_id: &str, ) -> Result<String, DeployError>
pub async fn grant_secret_access( &self, project_id: &str, secret_name: &str, service_account: &str, ) -> Result<(), SecretError>
pub async fn list_secrets( &self, project_id: &str, ) -> Result<Vec<String>, SecretError>
pub async fn delete_secret( &self, project_id: &str, secret_name: &str, ) -> Result<(), SecretError>
Trait Implementations§
Source§impl Default for GcloudClient<RealExecutor>
impl Default for GcloudClient<RealExecutor>
Auto Trait Implementations§
impl<E> Freeze for GcloudClient<E>where
E: Freeze,
impl<E> RefUnwindSafe for GcloudClient<E>where
E: RefUnwindSafe,
impl<E> Send for GcloudClient<E>
impl<E> Sync for GcloudClient<E>
impl<E> Unpin for GcloudClient<E>where
E: Unpin,
impl<E> UnsafeUnpin for GcloudClient<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for GcloudClient<E>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more