 (ns doctopus.storage
-  "Defines how Doctopus speaks to different places it can store generated HTML")
+  "Defines how Doctopus speaks to different places it can store generated HTML"
+  (:require [doctopus.storage-impls :as storage-impls]))
 
 ;; ## Storage
 ;; Doctopus shouldn't really care _where_ it puts generated HTML; it


;; The actual interface to a backend.
(defrecord Backend
    [default-backend available-backends load-fn save-fn]
  DoctopusBackend
  (load-from-storage [this k]
    (let [{:keys [conf load-fn]} this]
      (load-fn conf k)))
  (save-to-storage [this k v]
    (let [{:keys [conf save-fn]} this]
      (save-fn conf k v))))

;; At time of writing, I'm thinking of loading and saving one Tentacle worth of
;; documents all at once.

;; P. Sure I'm not using this
;; Control atom for Backend functions.
;;(def *backend* (atom "temp-fs"))
;; (defn load-documents [k] (load-from-storage @*backend* k))
;; (defn save-documents [k docs] (save-to-storage @*backend* k docs))

