daemon/rows.bend relies on unsafe/foreign
raw source on the hub · import cswap-bend-cli@0.1.0.0/daemon/rows.bend as Rows
5 imports
import Base import ../json.bend as Json import ../clock.bend as Clock import ../policy/types.bend as T import ./config.bend as Cfg
Definitions
def nat_opt source · line 10 · raw
@+m:Maybe<&2, U32> -> Maybe<&2, Nat>
def epoch_text source · line 18 · raw
@+t:String -> Maybe<&2, U32>
"1792740000.1" -> 1792740000, "7" -> 7; None for anything else.
def num_text source · line 21 · raw
@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> Maybe<&2, String>
def str_text source · line 28 · raw
@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> Maybe<&2, String>
def bind_s source · line 35 · raw
@+m:Maybe<&2, String> -> @f:(@_:String -> Maybe<&2, U32>) -> Maybe<&2, U32>
def epoch_of source · line 42 · raw
@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+key:String -> Maybe<&2, Nat>
def pct_of source · line 45 · raw
@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, Nat>
def iso_of source · line 48 · raw
@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, Nat>
def or_null source · line 51 · raw
@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json.Json> -> 0x0717344745a30ebad1f19045228e8f18/json.Json
def win source · line 58 · raw
@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+key:String -> 0x0717344745a30ebad1f19045228e8f18/json.Json
def scoped2 source · line 63 · raw
@+name:Maybe<&2, String> -> @+pct:Maybe<&2, Nat> -> @+reset:Maybe<&2, Nat> -> Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/policy/types.Scoped>
def scoped_one source · line 70 · raw
@+s:0x0717344745a30ebad1f19045228e8f18/json.Json -> Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/policy/types.Scoped>
def scoped_push source · line 73 · raw
@+m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/policy/types.Scoped> -> @+rest:List<&2, 0x0717344745a30ebad1f19045228e8f18/policy/types.Scoped> -> List<&2, 0x0717344745a30ebad1f19045228e8f18/policy/types.Scoped>
def scoped_chain source · line 80 · raw
@+items:0x0717344745a30ebad1f19045228e8f18/json.Json -> List<&2, 0x0717344745a30ebad1f19045228e8f18/policy/types.Scoped>
def unwrap_arr source · line 87 · raw
@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> 0x0717344745a30ebad1f19045228e8f18/json.Json
def scoped_of source · line 94 · raw
@+good:0x0717344745a30ebad1f19045228e8f18/json.Json -> List<&2, 0x0717344745a30ebad1f19045228e8f18/policy/types.Scoped>
def err2 source · line 99 · raw
@+is429:Bool -> 0x0717344745a30ebad1f19045228e8f18/policy/types.ErrKind
def err_kind source · line 106 · raw
@+m:Maybe<&2, String> -> 0x0717344745a30ebad1f19045228e8f18/policy/types.ErrKind
def zero_or source · line 113 · raw
@+m:Maybe<&2, Nat> -> Nat
def u32_field source · line 120 · raw
@+j:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+key:String -> Nat
def usage2 source · line 123 · raw
@+slot:Nat -> @+row:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+good:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+sentinel:0x0717344745a30ebad1f19045228e8f18/policy/types.Sentinel -> 0x0717344745a30ebad1f19045228e8f18/policy/types.Usage
def usage_of source · line 131 · raw
@+slot:Nat -> @+row:0x0717344745a30ebad1f19045228e8f18/json.Json -> @+sentinel:0x0717344745a30ebad1f19045228e8f18/policy/types.Sentinel -> 0x0717344745a30ebad1f19045228e8f18/policy/types.Usage
A row, as the policy reads it. row is JNull when the slot has none (or it
belongs to another identity): never fetched. sentinel is the overlay the
caller computed from the credential.
def empty_usage source · line 134 · raw
@+slot:Nat -> @+sentinel:0x0717344745a30ebad1f19045228e8f18/policy/types.Sentinel -> 0x0717344745a30ebad1f19045228e8f18/policy/types.Usage