bes-canopy-api 1.0.0

Raw client bindings for the BES Canopy API
Documentation

Rust client for canopy's public API.

The wire types and the per-endpoint methods in [schema] are generated from canopy's OpenAPI document, which lives in the same repository as this crate, so they are the types canopy declares rather than a separate description of them. The document and this crate carry the same version.

Calling canopy

[CanopyClient] has one method per operation, taking and returning the generated types. The method name comes from the path (/backup-credentials becomes backup_credentials), with the verb prefixed where a path is served by more than one verb.

How a request reaches canopy is the consumer's to decide: this crate depends on no HTTP client, and a consumer supplies a [CanopyTransport] which resolves the host, the scheme, and the authentication itself. Any status outside the success range surfaces as [CanopyHttpError], since endpoints give particular statuses a meaning only the caller can read.

What the generated types carry

Timestamp fields are [jiff::Timestamp] rather than text, and credential secrets are wrapped in [Redacted] so they stay out of Debug output and logs; read them through the inner value. Schemas that carry arbitrary further keys alongside their declared fields generate a map field holding the rest, so those keys can be both sent and read.

Generated structs are #[non_exhaustive] and carry a builder, so a schema gaining a field leaves construction working for a consumer that does not set it.