   "Returns a list of symbols.  Each symbol has a name matching a
   bucket name, and metadata matching that bucket's S3 metadata."
   []
-  (map make-object-symbol
+  (map make-bucket-symbol
        (.listAllBuckets (get-s3))))
 
 (defn list-objects

(ns org.altlaw.util.s3
  (:import (org.jets3t.service.impl.rest.httpclient RestS3Service)
           (org.jets3t.service.model S3Bucket S3Object)
           (org.jets3t.service.security AWSCredentials)))

(def #^{:private true} get-s3
     (memoize (fn [] (RestS3Service.

     (.listObjects (get-s3) (get-bucket bucket-name)))
  ([bucket-name prefix]
     (.listObjects (get-s3) (get-bucket bucket-name) nil)))

(defn delete-object [bucket-name object-key]
  (.deleteObject (get-s3) bucket-name object-key))

(defn get-object [bucket-name object-key]
  (.getObject (get-s3) (get-bucket bucket-name) object-key))
