Trigger
typeTrigger is one declared notification rule. Filter holds comma-separated key=value pairs; Title, Body and Link are templates where {key} stands for the value of the event's attribute key.
Value
gnotif.Trigger
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)
triggers
v0.Tree// id → \*Trigger
- OID
- 019f09…a7f4:4
triggers details
lastID
v0.IDValue
<zero>
Declare
func(target string, event string, filter string, param string, title string, body string, link string) stringDeclare stores a trigger and returns its id. The trigger is verified when its caller is the target realm itself.
- OID
- 019f09…a7f4:6
Declare details
Remove
func(id string)Remove deletes a trigger. Only its declarer may remove it.
- OID
- 019f09…a7f4:8
Remove details
validate
func(target string, event string, filter string, param string, title string, body string, link string)- OID
- 019f09…a7f4:9
validate details
sized
func(s string, lo int, hi int) bool- OID
- 019f09…a7f4:10
sized details
validFilter
func(filter string) bool- OID
- 019f09…a7f4:11
validFilter details
validLink
func(link string) boolvalidLink accepts only a path, so a click always stays on the dapp's origin. "//host" and "/\\host" start with a slash yet resolve to another host.
- OID
- 019f09…a7f4:12
validLink details
Render
func(path string) stringRender lists the triggers in declaration order.
- OID
- 019f09…a7f4:13
Render details
Trigger
:
type
=gnotif.Trigger
targetPrefix
:
untyped string
="gno.land/r/"
maxTarget
:
untyped bigint
=(256 <untyped> bigint)
maxName
:
untyped bigint
=(64 <untyped> bigint)
maxFilterPairs
:
untyped bigint
=(8 <untyped> bigint)
maxBody
:
untyped bigint
=(255 <untyped> bigint)
maxLink
:
untyped bigint
=(256 <untyped> bigint)
triggers : v0.Tree Inspect
lastID
:
v0.ID
=<zero>