Skip to main content

CatalogResource

Trait CatalogResource 

Source
pub trait CatalogResource: Hostable {
    type Config: CatalogService + Send + Sync;

    const PROVIDER_PREFIX: &'static str;
    const OUTPUT_FIELDS: &'static [(&'static str, &'static str, bool)];

    // Required method
    fn build_config(
        ctx: &ProvisionContext<'_>,
    ) -> Result<Self::Config, IntegrationError>;
}
Expand description

A catalog resource: a typed config + the credential fields it exposes. The ProviderOps lifecycle is derived (blanket impl below), so a new resource is just this trait + a Hostable + one registry row.

Required Associated Constants§

Source

const PROVIDER_PREFIX: &'static str

The env-var prefix the provider uses for the unambiguous form, e.g. "CLOUDFLARE" (vars come back as {RESOURCE}_{SUFFIX} or {PROVIDER}_{SUFFIX}).

Source

const OUTPUT_FIELDS: &'static [(&'static str, &'static str, bool)]

(env-var suffix, output name, required). Discover the real suffixes with xtask discover <reference>; pinned by the live smoke.

Required Associated Types§

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§