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.

v0 source pure

Package admins lets a fixed set of addresses change a realm's gnotif triggers. The realm passes the handle gnotif.Ope...

Overview

Package admins lets a fixed set of addresses change a realm's gnotif triggers. The realm passes the handle gnotif.Open returned straight to New, keeps the *Admins unexported, and on each call gives its gnotif identity, minted in the crossing function the admin called.

Functions 1

func New

1func New(h Handle, addrs ...address) *Admins
source

New returns an Admins over the handle h. It panics with no admin.

Types 2

type Admins

struct
1type Admins struct {
2	h      Handle
3	admins map[address]bool
4}
source

Admins holds a realm's handle and the addresses allowed to use it.

Methods on Admins

func Remove

method on Admins
1func (a *Admins) Remove(_ int, me realm, name string)
source

Remove removes the trigger under name, when the realm's caller is an admin.

func Set

method on Admins
1func (a *Admins) Set(_ int, me realm, name string, t trigger.Trigger) string
source

Set stores t under name and returns its id, when the realm's caller is an admin. me is the realm's gnotif identity, cur.Sub(gnotif.Subpath), and its Previous is the caller.

type Handle

interface
1type Handle interface {
2	Set(cur realm, name string, t trigger.Trigger) string
3	Remove(cur realm, name string)
4}
source

Handle is the method set of the registry's *Handle.

Dependencies

Imports 2

/p/g13rqvks880v0hmlfepcj0kkudq0js38d3pc5k6a/gnotif/admins/v0

Imported by indexer

Source Files 2