[pmg-devel] [PATCH pmg-rs 1/2] add support for set_proxy

Stoiko Ivanov s.ivanov at proxmox.com
Tue Nov 9 17:20:05 CET 2021


this commit needs a versioned dependency bump on proxmox-acme-rs

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 src/acme.rs | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/acme.rs b/src/acme.rs
index a1b5278..0429a0d 100644
--- a/src/acme.rs
+++ b/src/acme.rs
@@ -173,6 +173,10 @@ impl Inner {
     pub fn revoke_certificate(&mut self, data: &[u8], reason: Option<u32>) -> Result<(), Error> {
         Ok(self.client.revoke_certificate(data, reason)?)
     }
+
+    pub fn set_proxy(&mut self, proxy: String) {
+        self.client.set_proxy(proxy)
+    }
 }
 
 #[perlmod::package(name = "PMG::RS::Acme", lib = "pmg_rs")]
@@ -416,4 +420,11 @@ pub mod export {
             .revoke_certificate(&data, reason)?;
         Ok(())
     }
+
+    /// Set a proxy
+    #[export]
+    pub fn set_proxy(#[try_from_ref] this: &Acme, proxy: String) {
+        this.inner.lock().unwrap().set_proxy(proxy)
+    }
+
 }
-- 
2.30.2





More information about the pmg-devel mailing list