Liking cljdoc? Tell your friends :D

monero-store.system

Process composition: read the environment, wire the rails, serve.

The only namespace that knows what a deployment is. Adapters that need a vendor SDK are resolved at runtime — a build without the :stripe alias simply has no Stripe gateway, and says so in the log instead of failing to start.

A host application embeds this store by calling start! with its own fulfilment, identity, and catalog; everything else comes from the environment.

Process composition: read the environment, wire the rails, serve.

The only namespace that knows what a deployment is. Adapters that need a
vendor SDK are resolved at runtime — a build without the `:stripe` alias
simply has no Stripe gateway, and says so in the log instead of failing to
start.

A host application embeds this store by calling `start!` with its own
fulfilment, identity, and catalog; everything else comes from the
environment.
raw docstring

-mainclj

(-main & _)
source

analytics-ofclj

(analytics-of {:keys [backend] :as config} client)

The IAnalytics a deployment asked for.

The IAnalytics a deployment asked for.
sourceraw docstring

card-gatewayclj

(card-gateway {:keys [backend api-key] :as config})

The ICardGateway a deployment asked for, or nil.

The ICardGateway a deployment asked for, or nil.
sourceraw docstring

chain-walletclj

(chain-wallet {:keys [backend moneropay-url wallet-rpc]} client)

The IChainWallet a deployment asked for, or nil when it wants no chain rail.

The IChainWallet a deployment asked for, or nil when it wants no chain rail.
sourceraw docstring

configclj

(config)

The deployment, read from the environment.

The deployment, read from the environment.
sourceraw docstring

endpointsclj

(endpoints {:keys [chain cards store analytics]})

The services this deployment must be able to reach, read off the same config the builders above are wired from.

A rail that is not configured is not probed.

The services this deployment must be able to reach, read off the same
config the builders above are wired from.

A rail that is not configured is not probed.
sourceraw docstring

fulfilment-ofclj

(fulfilment-of kind order-store)

The IFulfilment a deployment asked for.

The IFulfilment a deployment asked for.
sourceraw docstring

identify-fn-ofclj

(identify-fn-of kind)

The identity seam a deployment asked for.

:header trusts a request header outright, so it is only ever a demo or a deployment sitting behind a gateway that has already authenticated the caller. Anything real supplies its own :identify-fn to start!.

The identity seam a deployment asked for.

`:header` trusts a request header outright, so it is only ever a demo or a
deployment sitting behind a gateway that has already authenticated the
caller. Anything real supplies its own `:identify-fn` to `start!`.
sourceraw docstring

load-catalog!clj

(load-catalog! catalog {:keys [catalog-file]})

Register into catalog the items the file :catalog-file names, or the sample.

Register into `catalog` the items the file `:catalog-file` names, or the
sample.
sourceraw docstring

load-experimentsclj

(load-experiments {:keys [tokens-file]})

The experiments declared in the token file, or none.

Read through design-forge, resolved LAZILY: the design pipeline is a BUILD dependency, and a deployment that ships the generated CSS without it still runs — with no experiments, which is what a store with no design pipeline should have. A missing or malformed token file is not fatal either: refusing to boot a payment system over a design artifact would be the wrong trade.

The experiments declared in the token file, or none.

Read through design-forge, resolved LAZILY: the design pipeline is a BUILD
dependency, and a deployment that ships the generated CSS without it still
runs — with no experiments, which is what a store with no design pipeline
should have. A missing or malformed token file is not fatal either: refusing
to boot a payment system over a design artifact would be the wrong trade.
sourceraw docstring

order-storeclj

(order-store {:keys [backend] :as config})

The IOrderStore a deployment asked for.

:jdbc needs the :jdbc alias; without it the store falls back to memory and says so, because a template that refuses to boot teaches nothing.

The IOrderStore a deployment asked for.

`:jdbc` needs the `:jdbc` alias; without it the store falls back to memory
and says so, because a template that refuses to boot teaches nothing.
sourceraw docstring

railsclj

(rails {:keys [chain cards manual?]} {:keys [client]})

The rail registry for config.

A rail that cannot settle is never advertised: a chain rail needs a wallet to watch, and a card rail needs the credentials it opens and re-reads sessions with. A configured Stripe with no webhook secret still registers and still refuses every notice — the signed fast path is off, the polled path carries it.

The rail registry for `config`.

A rail that cannot settle is never advertised: a chain rail needs a wallet to
watch, and a card rail needs the credentials it opens and re-reads sessions
with. A configured Stripe with no webhook secret still registers and still
refuses every notice — the signed fast path is off, the polled path carries
it.
sourceraw docstring

rates-feedclj

(rates-feed {:keys [ttl-ms]} client)

A cached round over the public tickers, as a 0-arity function.

A cached round over the public tickers, as a 0-arity function.
sourceraw docstring

report-reachability!clj

(report-reachability!)

Print what a telnet to each configured service would have told you, and return the summary. Reads the same environment start! does.

Print what a telnet to each configured service would have told you, and
return the summary. Reads the same environment `start!` does.
sourceraw docstring

start!clj

(start!)
(start! overrides)

Boot the store. Returns {:server :deps :stop-reconcile :config}.

overrides is how a host application embeds this store: :fulfilment to hand something over, :identify-fn to say who is asking, :catalog to sell its own things, :rails to register a rail this template has never heard of, :store to persist somewhere it already runs, :rates-fn to price from a feed it already has, :analytics to measure with its own sink, :experiments to run arms declared somewhere other than the token file, :endpoints to name services this store does not configure but the host needs reachable, and :probe to reach them some way other than a TCP connect. Anything else is a config key and overrides the environment.

The catalog is created here, per store. Two stores embedded in one JVM sell different things.

Boot the store. Returns {:server :deps :stop-reconcile :config}.

`overrides` is how a host application embeds this store: `:fulfilment` to
hand something over, `:identify-fn` to say who is asking, `:catalog` to sell
its own things, `:rails` to register a rail this template has never heard of,
`:store` to persist somewhere it already runs, `:rates-fn` to price from a
feed it already has, `:analytics` to measure with its own sink,
`:experiments` to run arms declared somewhere other than the token file,
`:endpoints` to name services this store does not configure but the host
needs reachable, and `:probe` to reach them some way other than a TCP
connect. Anything else is a config key and overrides the environment.

The catalog is created here, per store. Two stores embedded in one JVM sell
different things.
sourceraw docstring

stop!clj

(stop! {:keys [server deps stop-reconcile]})
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close