    (find-doc {:name  name
               :owner owner} "v2")))
 
-(defn registry-v2-exist?
-  [registry]
-  (some? (find-doc {:name  {"$eq" (:name registry)}
-                    :owner {"$eq" (:owner registry)}} "v2")))
-
 (defn create-v2-registry
   [registry]
   (-> (assoc registry :type "v2")

   (find-doc {:username username
              :owner    owner} "dockerhub")))

(defn dockerhub-exist?
  [docker-user]
  (some? (find-doc {:username {"$eq" (:username docker-user)}
                    :owner    {"$eq" (:owner docker-user)}} "dockerhub")))

(defn create-dockerhub
  [docker-user]
  (-> (assoc docker-user :type "dockerhub")

   (find-doc {:user  user
              :owner owner} "ecr")))

(defn create-ecr-registry
  [ecr]
  (-> (assoc ecr :type "ecr")
