pub struct StripeProjects<R: CommandRunner> { /* private fields */ }Implementations§
Source§impl<R: CommandRunner> StripeProjects<R>
impl<R: CommandRunner> StripeProjects<R>
pub fn new(runner: R, dir: impl Into<PathBuf>) -> Self
pub fn dir(&self) -> &Path
Sourcepub fn as_dyn(&self) -> StripeProjects<&dyn CommandRunner>
pub fn as_dyn(&self) -> StripeProjects<&dyn CommandRunner>
Borrow as a StripeProjects<&dyn CommandRunner> so callers holding a
dyn dispatch target can run commands without being generic over R
(impl CommandRunner for &T makes the erased runner a valid runner).
pub async fn json(&self, args: &[&str]) -> Result<StripeResult, ProjectsError>
Sourcepub async fn catalog(&self) -> Result<Catalog, ProjectsError>
pub async fn catalog(&self) -> Result<Catalog, ProjectsError>
Unfiltered catalog (stripe projects catalog --json).
For live drift / full-model tooling only. Provisioning must use
Self::catalog_for_reference.
Sourcepub async fn catalog_envelope_json(&self) -> Result<String, ProjectsError>
pub async fn catalog_envelope_json(&self) -> Result<String, ProjectsError>
Full {ok, data, …} envelope text for catalog --json.
Plugin 0.29.0 (and possibly later) often emits an empty stdout for the
unfiltered catalog when stdout is a pipe. Filtered
catalog <category> --json still works, so we fall back to merging every
known crate::catalog::Category filter when the unfiltered call is
empty or non-JSON. Auth / ok: false envelopes are classified and
returned as faults — they must not trigger the empty-pipe fallback.
Sourcepub async fn catalog_for_reference(
&self,
reference: &str,
) -> Result<Catalog, ProjectsError>
pub async fn catalog_for_reference( &self, reference: &str, ) -> Result<Catalog, ProjectsError>
Provider-scoped catalog for a provider/service reference.
Runs stripe projects catalog <provider> --json once. The CLI filter
accepts a category or provider name; we pass the provider slug from the
reference (everything before the first /).
Sourcepub async fn catalog_for<C: CatalogService>(
&self,
) -> Result<Catalog, ProjectsError>
pub async fn catalog_for<C: CatalogService>( &self, ) -> Result<Catalog, ProjectsError>
Provider-scoped catalog for a crate::catalog::verify::CatalogService.