pub struct AcmeClient { /* private fields */ }Expand description
ACME Client for certificate operations
Implementations§
Source§impl AcmeClient
impl AcmeClient
Sourcepub fn new(config: AutoTlsConfig) -> Self
pub fn new(config: AutoTlsConfig) -> Self
Create a new ACME client
Sourcepub fn with_challenge_handler(
config: AutoTlsConfig,
challenge_handler: Arc<ChallengeHandler>,
) -> Self
pub fn with_challenge_handler( config: AutoTlsConfig, challenge_handler: Arc<ChallengeHandler>, ) -> Self
Create client with existing challenge handler
Sourcepub fn challenge_handler(&self) -> Arc<ChallengeHandler>
pub fn challenge_handler(&self) -> Arc<ChallengeHandler>
Get the challenge handler
Sourcepub async fn initialize(&mut self) -> AutoTlsResult<()>
pub async fn initialize(&mut self) -> AutoTlsResult<()>
Initialize ACME account
Sourcepub async fn request_certificate(&mut self) -> AutoTlsResult<Vec<String>>
pub async fn request_certificate(&mut self) -> AutoTlsResult<Vec<String>>
Request a certificate for configured domains
TODO: Full implementation using instant-acme For now, this returns an error indicating manual certificate setup is needed
Sourcepub async fn needs_renewal(&self) -> AutoTlsResult<bool>
pub async fn needs_renewal(&self) -> AutoTlsResult<bool>
Check if certificate needs renewal
Sourcepub async fn get_certificate(&self) -> AutoTlsResult<Option<StoredCertificate>>
pub async fn get_certificate(&self) -> AutoTlsResult<Option<StoredCertificate>>
Get current certificate if exists
Sourcepub async fn import_certificate(
&self,
certificate: String,
private_key: String,
expires_at: Option<u64>,
) -> AutoTlsResult<()>
pub async fn import_certificate( &self, certificate: String, private_key: String, expires_at: Option<u64>, ) -> AutoTlsResult<()>
Import existing certificate (from certbot or other source)
Auto Trait Implementations§
impl Freeze for AcmeClient
impl !RefUnwindSafe for AcmeClient
impl Send for AcmeClient
impl Sync for AcmeClient
impl Unpin for AcmeClient
impl UnsafeUnpin for AcmeClient
impl !UnwindSafe for AcmeClient
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