pub struct DoSpacesCdnConfig {
pub endpoint_id: Option<String>,
pub api_token: String,
/* private fields */
}Expand description
Configuration for the DigitalOcean Spaces CDN adapter.
Read from environment via DoSpacesCdnConfig::from_env().
§Token security
api_token is never logged. The Debug implementation prints <redacted> for this field.
Fields§
§endpoint_id: Option<String>DO CDN endpoint id (DO_SPACES_CDN_ID). None → purge() is a logged no-op.
api_token: StringDO API token (DIGITALOCEAN_ACCESS_TOKEN). Never logged.
Implementations§
Source§impl DoSpacesCdnConfig
impl DoSpacesCdnConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Read config from environment.
Reads the provider-agnostic Phase 205 names first, with fallback to the legacy DO-specific names so existing deployments keep working without re-keying their secrets:
CDN_PURGE_ZONE(modern) → falls back toDO_SPACES_CDN_ID(legacy). Optional. When neither is set,purge()is a logged no-op.CDN_PURGE_TOKEN(modern) → falls back toDIGITALOCEAN_ACCESS_TOKEN(legacy). Required when endpoint id is set; otherwise unused.
Trait Implementations§
Source§impl Clone for DoSpacesCdnConfig
impl Clone for DoSpacesCdnConfig
Source§fn clone(&self) -> DoSpacesCdnConfig
fn clone(&self) -> DoSpacesCdnConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DoSpacesCdnConfig
impl RefUnwindSafe for DoSpacesCdnConfig
impl Send for DoSpacesCdnConfig
impl Sync for DoSpacesCdnConfig
impl Unpin for DoSpacesCdnConfig
impl UnsafeUnpin for DoSpacesCdnConfig
impl UnwindSafe for DoSpacesCdnConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more