Liking cljdoc? Tell your friends :D

cavia.core


clean!cljmultimethod

Removes the specified resource or the download directory.

Removes the specified resource or the download directory.
sourceraw docstring

defprofilecljmacro

(defprofile name profile)

Defines a cavia profile.

e.g.:

(defprofile prof
  {:resources [{:id :resource1
                :url "http://example.com/resource1"
                :sha256 "0123456789abcdef01234567890abcdef01234567890abcdef01234567890abc"}
               {:id :resource2
                :url "http://example.com/resource2"
                :sha1 "123456789abcdef01234567890abcdef01234567"
                :auth {:type :basic, :user "user", :password "password"}}
               {:id :resource3
                :url "ftp://example.com/resource3"
                :sha256 "23456789abcdef01234567890abcdef01234567890abcdef01234567890abcde"
                :auth {:user "user", :password "password"}}
               {:id :resource4
                :url "https://bucket-name.s3.region.amazonaws.com/resource4"
                :sha1 "3456789abcdef01234567890abcdef0123456789"
                :protocol :s3
                :auth {:access-key-id "accesskey", :secret-access-key "secretkey"}}
               {:id :resource5
                :url "http://example.com/resource5.gz"
                :sha1 "456789abcdef01234567890abcdef0123456789a"
                :packed :gzip}]
  :download-to ".cavia"})
Defines a cavia profile.

e.g.:

    (defprofile prof
      {:resources [{:id :resource1
                    :url "http://example.com/resource1"
                    :sha256 "0123456789abcdef01234567890abcdef01234567890abcdef01234567890abc"}
                   {:id :resource2
                    :url "http://example.com/resource2"
                    :sha1 "123456789abcdef01234567890abcdef01234567"
                    :auth {:type :basic, :user "user", :password "password"}}
                   {:id :resource3
                    :url "ftp://example.com/resource3"
                    :sha256 "23456789abcdef01234567890abcdef01234567890abcdef01234567890abcde"
                    :auth {:user "user", :password "password"}}
                   {:id :resource4
                    :url "https://bucket-name.s3.region.amazonaws.com/resource4"
                    :sha1 "3456789abcdef01234567890abcdef0123456789"
                    :protocol :s3
                    :auth {:access-key-id "accesskey", :secret-access-key "secretkey"}}
                   {:id :resource5
                    :url "http://example.com/resource5.gz"
                    :sha1 "456789abcdef01234567890abcdef0123456789a"
                    :packed :gzip}]
      :download-to ".cavia"})
sourceraw docstring

exist?cljmultimethod

Returns true if the specified resource exists on local.

Returns true if the specified resource exists on local.
sourceraw docstring

get!cljmultimethod

Downloads missing resources to the local directory.

Downloads missing resources to the local directory.
sourceraw docstring

resourcecljmultimethod

Returns the local path of the specified resource. Returns nil if the resource is not defined in your profile. Note that this function will return the path even if the resource has not been downloaded yet.

Returns the local path of the specified resource. Returns nil if the resource
is not defined in your profile. Note that this function will return the path
even if the resource has not been downloaded yet.
sourceraw docstring

resource-infocljmultimethod

source

skeleton-profileclj

source

valid?cljmultimethod

Returns true if the resource's real hash is same as the defined hash.

Returns true if the resource's real hash is same as the defined hash.
sourceraw docstring

verifycljmultimethod

Checks existence and hash of the downloaded resource, printing alert message when the resource does not exist or the hash is invalid.

Checks existence and hash of the downloaded resource, printing alert message
when the resource does not exist or the hash is invalid.
sourceraw docstring

with-profilecljmacro

(with-profile profile & body)

The specified profile will be used in cavia processes when each profile will not be provided.

e.g.:

(with-profile prof
  (cavia/clean!)
  (cavia/get!))
The specified profile will be used in cavia processes when each profile will
not be provided.

e.g.:

    (with-profile prof
      (cavia/clean!)
      (cavia/get!))
sourceraw docstring

without-printcljmacro

(without-print & body)

Restrains printing log, progress, and other messages. Take care that it does not restrain error and warning messages.

Restrains printing log, progress, and other messages. Take care that it does
not restrain error and warning messages.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close