Switch.cand_of: def of cswap-bend-cli@0.1.0.0
Import: import cswap-bend-cli@0.1.0.0/switch.bend as Switch
Lines 82-86 of cswap-bend-cli@0.1.0.0/switch.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&start_line=82&end_line=86
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/swpick.bend as P
import cswap-bend-cli@0.1.0.0/swlive.bend as L
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase
import cswap-bend-cli@0.1.0.0/store/io.bend as SIo
import cswap-bend-cli@0.1.0.0/store/seq.bend as SSeq
def cand_of(+root: String, +seq: Json.Json, +usage: Json.Json, +models: List<&2, String>, +slot: String) -> Act.of(P.Cand):
do ActM
:
c : String <- SIo.read_cred(root, slot, SIo.slot_email(seq, slot))
cfg : Maybe<&2, String> <- L.read_text_opt(SBase.config_path(root, slot, SIo.slot_email(seq, slot)))
return cand_of2(slot, SSeq.slot_record(seq, slot), c, cfg, usage, models)
Uses (15):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/base.bend&name=config_path
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/io.bend&name=read_cred
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/io.bend&name=slot_email
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/store/seq.bend&name=slot_record
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=ActM
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=ActM.bind
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=ActM.pure
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/switch.bend&name=cand_of2
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swlive.bend&name=read_text_opt
https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/swpick.bend&name=Cand