~/bend-docscommunity

daemon/quarantine.bend relies on unsafe/foreign

raw source on the hub · import cswap-bend-cli@0.1.0.0/daemon/quarantine.bend as Quarantine

7 imports
import Base
import ../json.bend as Json
import ../act.bend as Act
import ../store/io.bend as SIo
import ./events.bend as Ev
import ./state.bend as St
import ./freshen.bend as Fr

Types

type Rel source · line 13 · raw

Data

Definitions

def ActM source · line 16 · raw

@-A:Type -> Type

def ActM.pure source · line 19 · raw

@-A:Type -> @x:A -> 0x0717344745a30ebad1f19045228e8f18/act.of(A)

def ActM.bind source · line 22 · raw

@-A:Type -> @-B:Type -> @m:0x0717344745a30ebad1f19045228e8f18/act.of(A) -> @f:(@_:A -> 0x0717344745a30ebad1f19045228e8f18/act.of(B)) -> 0x0717344745a30ebad1f19045228e8f18/act.of(B)

def fp_opt2 source · line 25 · raw

@+empty:Bool -> @+fp:String -> Maybe<&2, String>

def fp_opt source · line 32 · raw

@+fp:String -> Maybe<&2, String>

def write_q source · line 35 · raw

@+root:String -> @+slot:String -> @+email:String -> @+reason:String -> @+ts:String -> @+fp:String -> 0x0717344745a30ebad1f19045228e8f18/act.of(Unit)

def quarantine source · line 43 · raw

@+root:String -> @+slot:String -> @+email:String -> @+reason:String -> @+ts:String -> 0x0717344745a30ebad1f19045228e8f18/act.of(0x0717344745a30ebad1f19045228e8f18/json.Json)

Put an account in quarantine (stored with the fingerprint of the credential that died) and answer the event.

def keep source · line 52 · raw

@+m:Maybe<&2, Rel> -> @+rest:List<&2, Rel> -> List<&2, Rel>

def replaced source · line 59 · raw

@+slot:String -> @+entry_email:String -> Maybe<&2, Rel>

def changed source · line 62 · raw

@+differs:Bool -> @+slot:String -> @+email:String -> Maybe<&2, Rel>

def opt_eq source · line 69 · raw

@+a:Maybe<&2, String> -> @+b:Maybe<&2, String> -> Bool

def fp_differs source · line 78 · raw

@+entry:Maybe<&2, String> -> @+fp:String -> Bool

def gone source · line 81 · raw

@+email_now:String -> @+entry_email:String -> Bool

def compare_fp source · line 84 · raw

@+root:String -> @+st:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+slot:String -> @+email_now:String -> 0x0717344745a30ebad1f19045228e8f18/act.of(Maybe<&2, Rel>)

def check_slot source · line 90 · raw

@+root:String -> @+seq:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+st:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+slot:String -> 0x0717344745a30ebad1f19045228e8f18/act.of(Maybe<&2, Rel>)

def rels source · line 95 · raw

@+root:String -> @+seq:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+st:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+slots:List<&2, String> -> 0x0717344745a30ebad1f19045228e8f18/act.of(List<&2, Rel>)

def drop_all source · line 105 · raw

@+rs:List<&2, Rel> -> @+st:0x0717344745a30ebad1f19045228e8f18/json.Json -> 0x0717344745a30ebad1f19045228e8f18/json.Json

def events_of source · line 112 · raw

@+ts:String -> @+rs:List<&2, Rel> -> List<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json>

def write_released source · line 119 · raw

@+root:String -> @+rs:List<&2, Rel> -> 0x0717344745a30ebad1f19045228e8f18/act.of(Unit)

def release_events source · line 125 · raw

@+root:String -> @+rs:List<&2, Rel> -> @+ts:String -> 0x0717344745a30ebad1f19045228e8f18/act.of(List<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json>)

def release_recovered source · line 136 · raw

@+root:String -> @+seq:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+ts:String -> 0x0717344745a30ebad1f19045228e8f18/act.of(List<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json>)

Lift the quarantine of an account whose email or credential changed since it was quarantined (the user logged in again); answer the events.