Liking cljdoc? Tell your friends :D


Don't play in the jungle.


Leiningen coordinates:

[biiwide/sandboxica "0.4.1"]

Require some namespaces:

(require '[biiwide.sandboxica.alpha :as sandbox]
         '[ :as ec2]
         '[ :as sqs])

Intercept all Amazonica / AWS operations, and throw an exception:

(sandbox/with sandbox/always-fail
  (ec2/describe-instances {}))

Intercept all Amazonica / AWS operations, and return "nothing":

(sandbox/with sandbox/always-nothing
  (ec2/describe-instances {}))

A "nothing" value is usually nil, but can be false, 0, or NaN for functions with primitive return types.

Use always-nothing by default, and just implement

(sandbox/with (comp (sandbox/just
                      (ec2/describe-instances [req]
                        {:reservations [{:reservation-id "1"}
                                        {:reservation-id "2"}]}))
  (ec2/describe-instances {:filters []}))


Copyright © 2019 Theodore Cushman

Distributed under the Eclipse Public License 2.0.

See the LICENSE file for details.

Can you improve this documentation? These fine people already did:
Biiwide & Ted Cushman
Edit on GitHub

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

× close