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 source realm

Package gnotif is a registry of notification triggers. Each trigger names a realm and an event type to watch, and the...

Overview

Package gnotif is a registry of notification triggers. Each trigger names a realm and an event type to watch, and the text of the notification that gnotif servers send when a matching event lands on chain.

Functions 3

func Declare

crossing Action
1func Declare(cur realm, target, event, filter, param, title, body, link string) string
source

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

func Remove

crossing Action
1func Remove(cur realm, id string)
source

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

func Render

1func Render(path string) string
source

Render lists the triggers in declaration order.

Types 1

type Trigger

struct
1type Trigger struct {
2	ID, Target, Event, Filter, Param, Title, Body, Link string
3	Declarer                                            address
4	Verified                                            bool
5}
source

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.

Dependencies

Source Files 3

Directories 1