Liking cljdoc? Tell your friends :D

wagoe.external.shell.adapters.ftps

FTPS file source implementing IFileSource, on Apache Commons Net.

Explicit TLS (AUTH TLS, then PBSZ 0 and PROT P so the data channel is encrypted too), passive mode, binary transfers. One connection per call. A transient failure is retried with backoff; a 5xx reply is not.

Usage: (def source (create-ftps-source {:host "ftp.example.org" :username "import" :password "secret"})) (ports/list-files! source "/outbox" {:match #".*.csv"})

FTPS file source implementing IFileSource, on Apache Commons Net.

Explicit TLS (AUTH TLS, then PBSZ 0 and PROT P so the data channel is
encrypted too), passive mode, binary transfers. One connection per call. A
transient failure is retried with backoff; a 5xx reply is not.

Usage:
  (def source (create-ftps-source {:host "ftp.example.org"
                                   :username "import"
                                   :password "secret"}))
  (ports/list-files! source "/outbox" {:match #".*\.csv"})
raw docstring

wagoe.external.shell.adapters.imap

IMAP mailbox adapter implementing IImapMailbox.

Uses Jakarta Mail for IMAP access. Connections are opened per-call and closed in a finally block. Selection (unread, since, limit) runs as an IMAP SEARCH on envelopes; content is read only for the selected messages.

Usage: (def mailbox (create-imap-mailbox {:host "imap.gmail.com" :port 993 :username "user@gmail.com" :password "app-password" :ssl? true})) (fetch-unread! mailbox)

IMAP mailbox adapter implementing IImapMailbox.

Uses Jakarta Mail for IMAP access. Connections are opened per-call and closed
in a finally block. Selection (unread, since, limit) runs as an IMAP SEARCH on
envelopes; content is read only for the selected messages.

Usage:
  (def mailbox (create-imap-mailbox
                 {:host "imap.gmail.com"
                  :port 993
                  :username "user@gmail.com"
                  :password "app-password"
                  :ssl? true}))
  (fetch-unread! mailbox)
raw docstring

wagoe.external.shell.adapters.smtp

SMTP transport adapter implementing ISmtpProvider.

Uses Jakarta Mail for SMTP communication. This adapter is positioned as a transport-level provider — independent of the email lib's higher-level abstraction (templating, job queuing, etc.).

Usage: (def provider (create-smtp-provider {:host "smtp.gmail.com" :port 587 :username "user@gmail.com" :password "app-password" :tls? true :from "no-reply@example.com"})) (send-email! provider {:to "recipient@example.com" :subject "Hello" :body "World"})

SMTP transport adapter implementing ISmtpProvider.

Uses Jakarta Mail for SMTP communication. This adapter is positioned as a
transport-level provider — independent of the email lib's higher-level
abstraction (templating, job queuing, etc.).

Usage:
  (def provider (create-smtp-provider
                  {:host "smtp.gmail.com"
                   :port 587
                   :username "user@gmail.com"
                   :password "app-password"
                   :tls? true
                   :from "no-reply@example.com"}))
  (send-email! provider {:to "recipient@example.com"
                         :subject "Hello"
                         :body "World"})
raw docstring

wagoe.external.shell.adapters.soap

SOAP 1.1 client implementing ISoapClient, on java.net.http and the JDK's XML parser, for WCF services.

Operations are described in config rather than read from a WSDL: WCF's defaults (SOAPAction namespace + contract + operation, request element named after the operation) cover most, and :operations sets the rest.

Usage: (def ibabs (create-soap-client {:endpoint "https://ibabs.example/api/v2/List.svc" :contract "IList" :data-namespace "http://schemas.datacontract.org/2004/07/iBabs" :retry-faults ["Unknown fault occured"] :operations {:GetListEntries {:timeout-ms 60000}}})) (ports/call! ibabs :GetLists {:Sitename "town"})

SOAP 1.1 client implementing ISoapClient, on java.net.http and the JDK's
XML parser, for WCF services.

Operations are described in config rather than read from a WSDL: WCF's
defaults (SOAPAction namespace + contract + operation, request element named
after the operation) cover most, and :operations sets the rest.

Usage:
  (def ibabs (create-soap-client
              {:endpoint       "https://ibabs.example/api/v2/List.svc"
               :contract       "IList"
               :data-namespace "http://schemas.datacontract.org/2004/07/iBabs"
               :retry-faults   ["Unknown fault occured"]
               :operations     {:GetListEntries {:timeout-ms 60000}}}))
  (ports/call! ibabs :GetLists {:Sitename "town"})
raw docstring

wagoe.external.shell.adapters.twilio

Twilio messaging adapter implementing ITwilioMessaging.

Uses clj-http with Basic auth (account-sid + auth-token). SMS and WhatsApp share the same Messages endpoint; the only difference is the whatsapp: prefix added by core/twilio.

Usage: (def twilio (create-twilio-adapter {:account-sid "ACxxx" :auth-token "token" :from-number "+15005550006"})) (send-sms! twilio {:to "+31612345678" :body "Hello!"})

Twilio messaging adapter implementing ITwilioMessaging.

Uses clj-http with Basic auth (account-sid + auth-token).
SMS and WhatsApp share the same Messages endpoint; the only difference
is the whatsapp: prefix added by core/twilio.

Usage:
  (def twilio (create-twilio-adapter
                {:account-sid "ACxxx"
                 :auth-token  "token"
                 :from-number "+15005550006"}))
  (send-sms! twilio {:to "+31612345678" :body "Hello!"})
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close