use crate::{defaults, ops::forc_index_remove};
use anyhow::Result;
use clap::Parser;
use std::path::PathBuf;
#[derive(Debug, Parser)]
pub struct Command {
#[clap(long, default_value = defaults::INDEXER_SERVICE_HOST, help = "URL at which indexer is deployed.")]
pub url: String,
#[clap(
short,
long,
help = "Path to the manifest of the indexer project being removed."
)]
pub manifest: Option<String>,
#[clap(short, long, help = "Path to the indexer project.")]
pub path: Option<PathBuf>,
#[clap(long, help = "Authentication header value.")]
pub auth: Option<String>,
#[clap(short, long, help = "Enable verbose output.")]
pub verbose: bool,
}
pub async fn exec(command: Command) -> Result<()> {
forc_index_remove::init(command).await?;
Ok(())
}