Commit44e91533Recorded30 Mar 2026Repositorysigil-ses

Rename library namespace from (ses) to (amazon ses)

Message

Makes the Amazon provenance explicit and sets up the (amazon ...) namespace for potential future AWS service libraries.

Changed
 README.md                       |  4 ++--
 examples/integration-test.sgl   |  2 +-
 examples/suppression-test.sgl   | 39 +++++++++++++++++++++++++++++++++++++++
 src/{ => amazon}/ses.sgl        |  6 +++---
 src/{ => amazon}/ses/auth.sgl   |  4 ++--
 src/{ => amazon}/ses/notify.sgl |  4 ++--
 test/ses-test.sgl               |  6 +++---
 7 files changed, 52 insertions(+), 13 deletions(-)
Diff
README.mdmodified
@@ -15,7 +15,7 @@ A Sigil library for the [Amazon SES v2](https://docs.aws.amazon.com/ses/latest/A
15
## Usage
16
17
```scheme
18
(import (ses))
+18
(import (amazon ses))
19
20
;; Create a client (defaults to us-east-2 region)
21
(define client (ses-client access-key-id: "AKIA..."
@@ -60,7 +60,7 @@ A Sigil library for the [Amazon SES v2](https://docs.aws.amazon.com/ses/latest/A
60
Parse SNS notifications from SES:
61
62
```scheme
63
(import (ses notify))
+63
(import (amazon ses notify))
64
65
;; In your webhook handler, parse the SNS JSON body:
66
(let ((notif (parse-ses-notification json-body)))
examples/integration-test.sglmodified
@@ -4,7 +4,7 @@
4
5
(import (sigil core)
6
(only (sigil process) getenv)
7
(ses))
+7
(amazon ses))
8
9
(define client
10
(ses-client access-key-id: (getenv "AWS_ACCESS_KEY_ID")
examples/suppression-test.sgladded
@@ -0,0 +1,39 @@
+1
;;; Test suppression list operations against live SES
+2
;;; Run: source ~/Ops/.env-ses && SIGIL_REDIRECTS=dev-redirects.sgl sigil eval -f examples/suppression-test.sgl
+3
+4
(import (sigil core)
+5
(only (sigil process) getenv)
+6
(amazon ses))
+7
+8
(define client
+9
(ses-client access-key-id: (getenv "AWS_ACCESS_KEY_ID")
+10
secret-access-key: (getenv "AWS_SECRET_ACCESS_KEY")
+11
region: (or (getenv "AWS_REGION") "us-east-2")))
+12
+13
;; Test 1: List suppressed addresses
+14
(display "=== List Suppressed ===\n")
+15
(let ((addrs (ses-list-suppressed client)))
+16
(display "Count: ") (display (length addrs)) (newline)
+17
(for-each (lambda (a)
+18
(display " ") (display (ses-suppressed-address-email a))
+19
(display " (") (display (ses-suppressed-address-reason a))
+20
(display ")\n"))
+21
addrs))
+22
+23
;; Test 2: Add to suppression list
+24
(display "\n=== Add to Suppression ===\n")
+25
(ses-put-suppressed client "[email protected]" "BOUNCE")
+26
(display "Added [email protected]\n")
+27
+28
;; Test 3: Get specific suppressed address
+29
(display "\n=== Get Suppressed ===\n")
+30
(let ((addr (ses-get-suppressed client "[email protected]")))
+31
(display "Email: ") (display (ses-suppressed-address-email addr)) (newline)
+32
(display "Reason: ") (display (ses-suppressed-address-reason addr)) (newline))
+33
+34
;; Test 4: Delete from suppression list
+35
(display "\n=== Delete from Suppression ===\n")
+36
(ses-delete-suppressed client "[email protected]")
+37
(display "Deleted [email protected]\n")
+38
+39
(display "\nDone!\n")
src/ses.sgl → src/amazon/ses.sglrenamed
@@ -1,10 +1,10 @@
1
;;; (ses) - Amazon SES v2 API client library.
+1
;;; (amazon ses) - Amazon SES v2 API client library.
2
;;;
3
;;; Provides functions for sending email, managing suppression lists,
4
;;; checking account quotas, and verifying domain identities via the
5
;;; Amazon SES v2 REST API.
6
7
(define-library (ses)
+7
(define-library (amazon ses)
8
(import (sigil core)
9
(sigil dict)
10
(sigil string)
@@ -13,7 +13,7 @@
13
(only (sigil array) array-map)
14
(only (sigil http) url-encode-value)
15
(sigil http client)
16
(ses auth))
+16
(amazon ses auth))
17
18
(export ;; Client
19
ses-client
src/ses/auth.sgl → src/amazon/ses/auth.sglrenamed
@@ -1,10 +1,10 @@
1
;;; (ses auth) - AWS Signature Version 4 signing for SES requests.
+1
;;; (amazon ses auth) - AWS Signature Version 4 signing for SES requests.
2
;;;
3
;;; Implements the SigV4 signing algorithm used to authenticate all
4
;;; AWS API requests. Reference:
5
;;; https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv4-signer.html
6
7
(define-library (ses auth)
+7
(define-library (amazon ses auth)
8
(import (sigil core)
9
(sigil string)
10
(sigil dict)
src/ses/notify.sgl → src/amazon/ses/notify.sglrenamed
@@ -1,10 +1,10 @@
1
;;; (ses notify) - SNS notification parsing for SES bounce/complaint events.
+1
;;; (amazon ses notify) - SNS notification parsing for SES bounce/complaint events.
2
;;;
3
;;; SES sends bounce and complaint notifications via SNS as JSON POST
4
;;; requests to a webhook URL. This module provides stateless parsers
5
;;; that extract notification type, affected email addresses, and metadata.
6
7
(define-library (ses notify)
+7
(define-library (amazon ses notify)
8
(import (sigil core)
9
(sigil dict)
10
(sigil string)
test/ses-test.sglmodified
@@ -7,9 +7,9 @@
7
(sigil json)
8
(sigil test)
9
(sigil crypto)
10
(ses)
11
(ses auth)
12
(ses notify))
+10
(amazon ses)
+11
(amazon ses auth)
+12
(amazon ses notify))
13
14
;; ---------------------------------------------------------------
15
;; SigV4 signing tests