Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v1 state

Back to all declarations

Subpath

untyped string

Subpath is the subpath of a realm's gnotif identity: me := cur.Sub(gnotif.Subpath).

Value

"gnotif"

Trigger

type

Trigger is an alias, so a dapp imports only the registry.

Value

v0.Trigger

Handle

type

Handle changes the triggers of the realm that opened it. Each method also needs that realm's gnotif identity as its caller, so the pointer alone is useless to any other realm.

Value

v1.Handle

triggers

v0.BPTree

// id → record.encode()

Open
OID
0a0c35…50b5:4
triggers details

Inspect ref

byTarget

v0.BPTree

// target → \[]string of its active ids, oldest first

Open
OID
0a0c35…50b5:6
byTarget details

Inspect ref

handles

v0.BPTree

// target → its live \*Handle

Open
OID
0a0c35…50b5:8
handles details

Inspect ref

lastID

v0.ID

Value

<zero>

idPrefix

string

idPrefix is the last element of the registry's path and a dash, such as "v1-": gnotifd takes an id only from the registry version it names.

Value

"v1-"

Open

func() *v1.Handle

Open returns the handle that changes the triggers of the realm whose gnotif identity calls it. It panics while the realm holds a handle its namespace owner has not revoked. It also panics outside the owner's deploy of the realm and outside a call the owner signed and sent straight to the realm. r/sys/names says who the owner is.

Open
OID
0a0c35…50b5:11
Open details

Inspect func

Drop

func(target string, ids string)

Drop removes target's listed active triggers, ids separated by commas. Spaces around an id are ignored. Only target's namespace owner may call it, directly, with their own key. r/sys/names says who the owner is, and while it is not enabled nobody is. A call that lists an id more than once, or one that is not an active trigger of target, removes nothing. Drop leaves the realm's handle live: Revoke stops the realm from setting them again.

Open
OID
0a0c35…50b5:13
Drop details

Inspect func

Revoke

func(target string)

Revoke ends target's handle: its methods panic from then on, and target's triggers stay. The realm can Open a new handle. Only target's namespace owner may call it, directly, with their own key. r/sys/names says who the owner is, and while it is not enabled nobody is.

Open
OID
0a0c35…50b5:14
Revoke details

Inspect func

Active

func(target string) string

Active lists target's active trigger ids, comma-separated, oldest first.

Open
OID
0a0c35…50b5:15
Active details

Inspect func

activeOf

func(target string) []string
Open
OID
0a0c35…50b5:16
activeOf details

Inspect func

find

func(ids []string, name string) (string, v1.record, bool)

ceiling: decodes up to maxPerTarget records per lookup; index target and name to id before raising maxPerTarget.

Open
OID
0a0c35…50b5:17
find details

Inspect func

targetOf

func(int, me .uverse.realm) string

targetOf returns the realm whose gnotif identity me is, and panics for any other caller.

Open
OID
0a0c35…50b5:18
targetOf details

Inspect func

mustOwnerEntered

func(int, me .uverse.realm, target string)

mustOwnerEntered panics unless target's namespace owner signed the transaction with its own key and called target's realm directly.

Open
OID
0a0c35…50b5:19
mustOwnerEntered details

Inspect func

mustOwn

func(target string)

mustOwn panics unless target's namespace owner called straight into the registry with its own key.

Open
OID
0a0c35…50b5:20
mustOwn details

Inspect func

store

func(id string, r v1.record, approver string)

store writes r under id and emits TriggerDeclared.

Open
OID
0a0c35…50b5:21
store details

Inspect func

removeIDs

func(target string, ids []string)

removeIDs removes the listed active ids of target and emits TriggerRemoved for each.

Open
OID
0a0c35…50b5:22
removeIDs details

Inspect func

recordFields

untyped bigint

Value

(8 <untyped> bigint)

record

type

record is a trigger, its target and its name as the registry stores them: one string per trigger, because a tree holds a string inline and a struct is one more stored object.

Value

v1.record

decodeRecord

func(v interface{...}) v1.record

decodeRecord reads a string made by encode and panics on any other.

Open
OID
0a0c35…50b5:23
decodeRecord details

Inspect func

packFields

func(fields []string) string

packFields writes each field as its byte length, a colon and the field, so a field may hold colons and digits.

Open
OID
0a0c35…50b5:25
packFields details

Inspect func

unpackFields

func(s string, n int) []string

unpackFields reads exactly n fields made by packFields and panics on any other string.

Open
OID
0a0c35…50b5:26
unpackFields details

Inspect func

cutField

func(s string) (field string, rest string, ok bool)
Open
OID
0a0c35…50b5:27
cutField details

Inspect func

pageSize

untyped bigint

Value

(50 <untyped> bigint)

Render

func(path string) string

Render serves "" (the first page), "page/N", "trigger/\<id>" and "target/\<path>".

Open
OID
0a0c35…50b5:28
Render details

Inspect func

renderPage

func(n int) string

renderPage lists the triggers newest first, pageSize to a page.

Open
OID
0a0c35…50b5:30
renderPage details

Inspect func

renderTarget

func(target string, ids []string) string

renderTarget lists a realm's triggers, newest first. The cap on them keeps the page to one screen, so it is not paged.

Open
OID
0a0c35…50b5:31
renderTarget details

Inspect func

writeLine

func(b *strings.Builder, id string, r v1.record)
Open
OID
0a0c35…50b5:32
writeLine details

Inspect func

renderTrigger

func(id string, r v1.record) string
Open
OID
0a0c35…50b5:33
renderTrigger details

Inspect func

selfPath

string

selfPath is this realm's path on gnoweb, read at package init: Render is not crossing, so reading it there would give the caller's path.

Value

"/r/nym-gfanton001/gnotif/v1"

targetPrefix

untyped string

Value

"gno.land/r/"

maxTarget

untyped bigint

Value

(249 <untyped> bigint)

maxName

untyped bigint

Value

(64 <untyped> bigint)

maxFilterPairs

untyped bigint

Value

(8 <untyped> bigint)

maxBody

untyped bigint

Value

(255 <untyped> bigint)

maxPerTarget

untyped bigint

Value

(64 <untyped> bigint)

namespaceOf

func(target string) string

namespaceOf returns the namespace a valid target lives in, and panics on a target that is not a valid realm path.

Open
OID
0a0c35…50b5:37
namespaceOf details

Inspect func

sized

func(s string, lo int, hi int) bool
Open
OID
0a0c35…50b5:38
sized details

Inspect func

validTarget

func(target string) bool

validTarget accepts a realm path whose segments each match the chain's Re\_name, so a target names a path where a realm can exist.

Open
OID
0a0c35…50b5:39
validTarget details

Inspect func

isLowerAlnum

func(c uint8) bool
Open
OID
0a0c35…50b5:40
isLowerAlnum details

Inspect func

validName

func(s string, lo int, hi int) bool

validName accepts identifier bytes only, so a name cannot carry spaces or symbols that imitate the verified mark in rendered output.

Open
OID
0a0c35…50b5:41
validName details

Inspect func

validFilter

func(filter string) bool
Open
OID
0a0c35…50b5:42
validFilter details

Inspect func
Subpath : untyped string ="gnotif"
Trigger : type =v0.Trigger
Handle : type =v1.Handle
triggers : v0.BPTree Inspect
byTarget : v0.BPTree Inspect
handles : v0.BPTree Inspect
lastID : v0.ID =<zero>
idPrefix : string ="v1-"
Open : func() *v1.Handle Inspect
Drop : func(target string, ids string) Inspect
Revoke : func(target string) Inspect
Active : func(target string) string Inspect
activeOf : func(target string) []string Inspect
find : func(ids []string, name string) (string, v1.record, bool) Inspect
targetOf : func(int, me .uverse.realm) string Inspect
mustOwnerEntered : func(int, me .uverse.realm, target string) Inspect
mustOwn : func(target string) Inspect
store : func(id string, r v1.record, approver string) Inspect
removeIDs : func(target string, ids []string) Inspect
recordFields : untyped bigint =(8 <untyped> bigint)
record : type =v1.record
decodeRecord : func(v interface{...}) v1.record Inspect
packFields : func(fields []string) string Inspect
unpackFields : func(s string, n int) []string Inspect
cutField : func(s string) (field string, rest string, ok bool) Inspect
pageSize : untyped bigint =(50 <untyped> bigint)
Render : func(path string) string Inspect
renderPage : func(n int) string Inspect
renderTarget : func(target string, ids []string) string Inspect
writeLine : func(b *strings.Builder, id string, r v1.record) Inspect
renderTrigger : func(id string, r v1.record) string Inspect
selfPath : string ="/r/nym-gfanton001/gnotif/v1"
targetPrefix : untyped string ="gno.land/r/"
maxTarget : untyped bigint =(249 <untyped> bigint)
maxName : untyped bigint =(64 <untyped> bigint)
maxFilterPairs : untyped bigint =(8 <untyped> bigint)
maxBody : untyped bigint =(255 <untyped> bigint)
maxPerTarget : untyped bigint =(64 <untyped> bigint)
validate : func(t v0.Trigger) Inspect
namespaceOf : func(target string) string Inspect
sized : func(s string, lo int, hi int) bool Inspect
validTarget : func(target string) bool Inspect
isLowerAlnum : func(c uint8) bool Inspect
validName : func(s string, lo int, hi int) bool Inspect
validFilter : func(filter string) bool Inspect