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.

gnotif state

Back to all declarations

Trigger

type

Trigger 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 string

Value

"gno.land/r/"

maxTarget

untyped bigint

Value

(256 <untyped> bigint)

maxName

untyped bigint

Value

(64 <untyped> bigint)

maxFilterPairs

untyped bigint

Value

(8 <untyped> bigint)

maxBody

untyped bigint

Value

(255 <untyped> bigint)

triggers

v0.Tree

// id → \*Trigger

Open
OID
019f09…a7f4:4
triggers details

Inspect ref

lastID

v0.ID

Value

<zero>

Declare

func(target string, event string, filter string, param string, title string, body string, link string) string

Declare stores a trigger and returns its id. The trigger is verified when its caller is the target realm itself.

Open
OID
019f09…a7f4:6
Declare details

Inspect func

Remove

func(id string)

Remove deletes a trigger. Only its declarer may remove it.

Open
OID
019f09…a7f4:8
Remove details

Inspect func

validate

func(target string, event string, filter string, param string, title string, body string, link string)
Open
OID
019f09…a7f4:9
validate details

Inspect func

sized

func(s string, lo int, hi int) bool
Open
OID
019f09…a7f4:10
sized details

Inspect func

validFilter

func(filter string) bool
Open
OID
019f09…a7f4:11
validFilter details

Inspect func

Render

func(path string) string

Render lists the triggers in declaration order.

Open
OID
019f09…a7f4:13
Render details

Inspect func
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)
triggers : v0.Tree Inspect
lastID : v0.ID =<zero>
Declare : func(target string, event string, filter string, param string, title string, body string, link string) string Inspect
Remove : func(id string) Inspect
validate : func(target string, event string, filter string, param string, title string, body string, link string) Inspect
sized : func(s string, lo int, hi int) bool Inspect
validFilter : func(filter string) bool Inspect
Render : func(path string) string Inspect