keechma.toolbox.pipeline.core
->CommitSideffect
(->CommitSideffect value cb)->DoSideffect
(->DoSideffect sideffects)->Error
(->Error type message payload cause)->ExecuteSideffect
(->ExecuteSideffect command payload)->RedirectSideffect
(->RedirectSideffect params)->RunPipelineSideffect
(->RunPipelineSideffect pipeline-key args)->SendCommandSideffect
(->SendCommandSideffect command payload)call-sideffect
(call-sideffect sideffect ctrl app-db-atom)commit!
(commit! value)(commit! value cb)Commit pipeline sideffect.
Accepts value or value and callback as arguments. Value should be a new version of app-db.
(commit! (assoc-in app-db [:kv :user] {:username "retro"}))
If the callback argument is present, this function will be called immediately after the app-db-atom is updated. This is useful if you want to force Reagent to re-render the screen.
CommitSideffect
do!
(do! & sideffects)Runs multiple sideffects sequentially:
(do!
(commit! (assoc-in app-db [:kv :current-user] value))
(redirect! {:page "user" :id (:id user)}))
DoSideffect
Error
execute!
(execute! command payload)Execute pipeline sideffect.
Accepts command and payload arguments. Use this if you want to execute a command on the current controller.
ExecuteSideffect
ISideffect
protocol
members
call!
(call! this controller app-db-atom)map->CommitSideffect
(map->CommitSideffect G__14094)map->DoSideffect
(map->DoSideffect G__14130)map->Error
(map->Error G__14085)map->ExecuteSideffect
(map->ExecuteSideffect G__14112)map->RedirectSideffect
(map->RedirectSideffect G__14121)map->RunPipelineSideffect
(map->RunPipelineSideffect G__14143)map->SendCommandSideffect
(map->SendCommandSideffect G__14103)pipeline!
macro
(pipeline! args & body)pipeline-errors
redirect!
(redirect! params)Redirect pipeline sideffect.
Accepts params argument. Page will be redirected to a new URL which will be generated from the passed in params argument. If you need to access the current route data, it is present in the pipeline app-db argument under the [:route :data] path.
RedirectSideffect
run-pipeline!
(run-pipeline! pipeline-key)(run-pipeline! pipeline-key args)Runs a pipeline in a way that blocks the current pipeline until the current pipeline is done. It behaves same as `execute! but blocks the parent pipeline until it’s done. Return value and errors will be ignored by the parent pipeline.
RunPipelineSideffect
send-command!
(send-command! command payload)Send command pipeline sideffect.
Accepts command and payload arguments. Command should be a vector where first element is the controller topic, and the second element is the command name.