summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2024-01-08 14:27:24 +0100
committerVivien Kraus <vivien@planete-kraus.eu>2024-01-08 14:27:24 +0100
commitdce156e2f6c6ae1fb142f7b1ebd542763a09cedf (patch)
treeaea22f2830895d6f8cfe36bc6a9acc392361ad2a
parent7fdc8d4ccc1577b179121da9f05099c8f8b4b87c (diff)
Remove leftover files0.0.3
-rw-r--r--guile/email-key-rotation/openstmpd.scm60
1 files changed, 0 insertions, 60 deletions
diff --git a/guile/email-key-rotation/openstmpd.scm b/guile/email-key-rotation/openstmpd.scm
deleted file mode 100644
index 9ca2fab..0000000
--- a/guile/email-key-rotation/openstmpd.scm
+++ /dev/null
@@ -1,60 +0,0 @@
-(define-module (email-key-rotation gandi)
- #:use-module (srfi srfi-26)
- #:use-module (srfi srfi-9 gnu)
- #:use-module (ice-9 optargs)
- #:export (<opensmtpd-configuration>
- make-openstmpd-configuration
- opensmtpd-configuration?
- api-key set-api-key
- domain set-domain
- gandi-livedns-request)
- #:declarative? #t)
-
-(define-immutable-record-type <gandi-configuration>
- (make-gandi-configuration api-key domain)
- gandi-configuration?
- (api-key api-key set-api-key)
- (domain domain set-domain))
-
-(define* (gandi-livedns-request configuration
- path-under-domain
- #:key
- (headers '())
- (body #f)
- (http-request http-request))
- (with-exception-handler
- (lambda (exn)
- (raise-exception
- (make-exception
- (make-exception-with-origin 'gandi-http-request)
- (make-exception-with-irritants (list configuration
- path-under-domain
- headers
- body))
- (make-exception-with-message
- "cannot request Gandi livedns.")
- exn)))
- (lambda ()
- (unless (list? path-under-domain)
- (raise-exception
- (make-error)
- (make-exception-with-irritants (list path-under-domain))
- (make-exception-with-message
- "the PATH-UNDER-DOMAIN argument must be a list of path items.")))
- (let ((uri (build-uri
- 'https
- #:host "api.gandi.net"
- #:path
- (string-append
- "/"
- (encode-and-join-uri-path
- `("v5"
- "livedns"
- "domains"
- ,domain
- ,@path-under-domain)))))
- (headers
- `((Authorization
- . ,(string-append "ApiKey " (api-key configuration)))
- ,@headers)))
- (http-request uri #:headers headers #:body body)))))