Refactored for testability.
Factored out storage into a separate package, and added tests.
This commit is contained in:
+35
-5
@@ -12,18 +12,48 @@
|
||||
#:backplane-connect
|
||||
#:make-error
|
||||
#:make-success
|
||||
#:start-listening
|
||||
#:with-backplane)
|
||||
(:import-from #:backplane-dns-store
|
||||
#:invalid-sshfp
|
||||
#:missing-domain
|
||||
#:invalid-ip
|
||||
#:domain-name-missing
|
||||
#:error-msg)
|
||||
|
||||
(:export #:start-listener-with-env
|
||||
#:backplane-dns-listen
|
||||
#:parse-message
|
||||
#:handle-message
|
||||
#:unknown-dns-request
|
||||
#:request-change-ipv4
|
||||
#:request-change-ipv6
|
||||
#:request-change-sshfp
|
||||
#:*dns-store*))
|
||||
|
||||
(defpackage #:backplane-dns-store
|
||||
(:use #:cl)
|
||||
|
||||
(:import-from #:arrows #:->)
|
||||
(:import-from #:alexandria #:if-let)
|
||||
(:import-from #:ip-utils
|
||||
#:ipv4-p
|
||||
#:ipv6-p)
|
||||
(:import-from #:postmodern
|
||||
#:get-dao
|
||||
#:select-dao
|
||||
#:update-dao
|
||||
#:insert-dao
|
||||
#:delete-dao
|
||||
#:with-transaction)
|
||||
|
||||
(:export #:start-listener-with-env
|
||||
#:backplane-dns-listen
|
||||
#:parse-message))
|
||||
|
||||
(:export #:set-ipv4
|
||||
#:set-ipv6
|
||||
#:set-sshfp
|
||||
#:postgres-dns-store
|
||||
#:invalid-ip
|
||||
#:invalid-sshfp
|
||||
#:domain-name-missing
|
||||
#:missing-domain
|
||||
#:dns-store
|
||||
#:sshfp-p
|
||||
#:error-msg))
|
||||
|
||||
Reference in New Issue
Block a user