bookclerk_plugin_destination_r2::plugin
Destination + job-handler surface for the Cloudflare R2 guest.
| Item | Kind | Summary |
|---|---|---|
R2Root |
struct | Root capability for the R2 destination guest. |
Jurisdiction |
enum | The jurisdiction an R2 bucket was created in, which picks its endpoint. |
destination_from |
function | Builds the destination from the instance's CONFIG and SECRETS. |
pub struct R2Root;
Root capability for the R2 destination guest.
Implements: PluginWorker
pub enum Jurisdiction {
Default,
Eu,
Fedramp,
}
The jurisdiction an R2 bucket was created in, which picks its endpoint.
Variants
Default: No jurisdiction:<account>.r2.cloudflarestorage.com.Eu: The European Union:<account>.eu.r2.cloudflarestorage.com.Fedramp: FedRAMP:<account>.fedramp.r2.cloudflarestorage.com.
pub fn endpoint(self, account: &CloudflareAccountId) -> String
The bucket's S3 API endpoint for account.
Implements: Clone, Copy, Debug, Default, Deserialize<'de>, Eq, PartialEq
pub async fn destination_from(
config: &ExtensibleConfig,
secrets: &ExtensibleConfig,
) -> Result<ObjectStoreDestination<S3Backend>, PluginError>
Builds the destination from the instance's CONFIG and SECRETS.
config- the instance settings.secrets- the instance's sealed secrets.
Returns invalid_params for a missing or malformed setting or secret, and internal when the client cannot be constructed.
Generated from crates/bookclerk-plugins/optional/destination-r2 at main · View as Markdown