 
 (mnt/defstate store
   :start (init))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

        (s3/create-bucket credentials bucket-name)))
    (atom {:credentials credentials})))



(defn store-import [bucket-name store-object]
  "Stores the object in the object store and returns the generated key. Object can either be an InputStream, a string or a file."
  (let [key (.toString (java.util.UUID/randomUUID))
        e-tag (.getETag (s3/put-object (:credentials @store) bucket-name key store-object))]
    (log/infof "Uploaded object with key %s and etag %s." key e-tag)
    key))

;; TODO error handling
(defn with-object-stream [bucket-name object-key f]

            [mount.core :as mnt]
            [aws.sdk.s3 :as s3]
            [clojure.tools.logging :as log]))

;; TODO add support for multiple stores

