Subpath
untyped stringSubpath is the subpath of a realm's gnotif identity: me := cur.Sub(gnotif.Subpath).
Value
"gnotif"
Trigger
typeTrigger is an alias, so a dapp imports only the registry.
Value
v0.Trigger
Handle
typeHandle 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()
- OID
- 02abf2…09d9:4
triggers details
byTarget
v0.BPTree// target → \[]string of its active ids, oldest first
- OID
- 02abf2…09d9:6
byTarget details
handles
v0.BPTree// target → its live \*Handle
- OID
- 02abf2…09d9:8
handles details
lastID
v0.IDValue
<zero>
Open
func() *v1.HandleOpen 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, and unless that owner signed the transaction and sent it straight to the realm.
- OID
- 02abf2…09d9:10
Open details
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. 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.
- OID
- 02abf2…09d9:12
Drop details
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.
- OID
- 02abf2…09d9:13
Revoke details
Active
func(target string) stringActive lists target's active trigger ids, comma-separated, oldest first.
- OID
- 02abf2…09d9:14
Active details
activeOf
func(target string) []string- OID
- 02abf2…09d9:15
activeOf details
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.
- OID
- 02abf2…09d9:16
find details
targetOf
func(int, me .uverse.realm) stringtargetOf returns the realm whose gnotif identity me is, and panics for any other caller.
- OID
- 02abf2…09d9:17
targetOf details
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.
- OID
- 02abf2…09d9:18
mustOwnerEntered details
mustOwn
func(target string)mustOwn panics unless target's namespace owner called straight into the registry with its own key.
- OID
- 02abf2…09d9:19
mustOwn details
store
func(id string, r v1.record, approver string)store writes r under id and emits TriggerDeclared.
- OID
- 02abf2…09d9:20
store details
removeIDs
func(target string, ids []string)removeIDs removes the listed active ids of target and emits TriggerRemoved for each.
- OID
- 02abf2…09d9:21
removeIDs details
recordFields
untyped bigintValue
(8 <untyped> bigint)
record
typerecord 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.recorddecodeRecord reads a string made by encode and panics on any other.
- OID
- 02abf2…09d9:22
decodeRecord details
packFields
func(fields []string) stringpackFields writes each field as its byte length, a colon and the field, so a field may hold colons and digits.
- OID
- 02abf2…09d9:24
packFields details
unpackFields
func(s string, n int) []stringunpackFields reads exactly n fields made by packFields and panics on any other string.
- OID
- 02abf2…09d9:25
unpackFields details
cutField
func(s string) (field string, rest string, ok bool)- OID
- 02abf2…09d9:26
cutField details
pageSize
untyped bigintValue
(50 <untyped> bigint)
Render
func(path string) stringRender serves "" (the first page), "page/N", "trigger/\<id>" and "target/\<path>".
- OID
- 02abf2…09d9:27
Render details
renderPage
func(n int) stringrenderPage lists the triggers newest first, pageSize to a page.
- OID
- 02abf2…09d9:29
renderPage details
renderTarget
func(target string, ids []string) stringrenderTarget lists a realm's triggers, newest first. The cap on them keeps the page to one screen, so it is not paged.
- OID
- 02abf2…09d9:30
renderTarget details
writeLine
func(b *strings.Builder, id string, r v1.record)- OID
- 02abf2…09d9:31
writeLine details
renderTrigger
func(id string, r v1.record) string- OID
- 02abf2…09d9:32
renderTrigger details
selfPath
stringselfPath 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/g13rqvks880v0hmlfepcj0kkudq0js38d3pc5k6a/gnotif/v1"
targetPrefix
untyped stringValue
"gno.land/r/"
maxTarget
untyped bigintValue
(256 <untyped> bigint)
maxName
untyped bigintValue
(64 <untyped> bigint)
maxFilterPairs
untyped bigintValue
(8 <untyped> bigint)
maxBody
untyped bigintValue
(255 <untyped> bigint)
maxLink
untyped bigintValue
(256 <untyped> bigint)
maxPerTarget
untyped bigintValue
(64 <untyped> bigint)
validate
func(t v0.Trigger)- OID
- 02abf2…09d9:34
validate details
namespaceOf
func(target string) stringnamespaceOf returns the namespace a valid target lives in, and panics on a target that is not a valid realm path.
- OID
- 02abf2…09d9:36
namespaceOf details
sized
func(s string, lo int, hi int) bool- OID
- 02abf2…09d9:37
sized details
validTarget
func(target string) boolvalidTarget accepts a realm path whose segments each match the chain's Re\_name, so a target names a path where a realm can exist.
- OID
- 02abf2…09d9:38
validTarget details
isLowerAlnum
func(c uint8) bool- OID
- 02abf2…09d9:39
isLowerAlnum details
validName
func(s string, lo int, hi int) boolvalidName accepts identifier bytes only, so a name cannot carry spaces or symbols that imitate the verified mark in rendered output.
- OID
- 02abf2…09d9:40
validName details
validFilter
func(filter string) bool- OID
- 02abf2…09d9:41
validFilter details
validLink
func(link string) boolvalidLink accepts only a path, so a click always stays on the dapp's origin. "//host" starts with a slash yet resolves to another host. A URL parser drops tab, LF and CR and reads a backslash as a slash, so "/\\t/host" and "/\\host" would do the same; control bytes and backslashes are refused.
- OID
- 02abf2…09d9:42