Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 state

Back to all declarations

item

type

item is one entry on the board. \`address\` is the uverse bech32 type — it is persistable (unlike a \`realm\` value), so it is safe to store across txs.

Value

v0.item

nextID

int

Value

0

Add

func(text string) int

Add appends a new item authored by the caller and returns its id. Crossing function: takes \`cur realm\` first (gno 0.9 interrealm convention), authenticates with cur.IsCurrent() before trusting cur.Previous().

Open
OID
0c209b…03e8:6
Add details

Inspect func

Toggle

func(id int)

Toggle flips the done state of the item with the given id.

Open
OID
0c209b…03e8:8
Toggle details

Inspect func

Remove

func(id int)

Remove deletes the item with the given id.

Open
OID
0c209b…03e8:9
Remove details

Inspect func

idKey

func(id int) string

idKey renders an id as a fixed-width, zero-padded key so avl.Tree's byte-lexicographic ordering matches numeric id ordering.

Open
OID
0c209b…03e8:10
idKey details

Inspect func

shortAddr

func(a .uverse.address) string

shortAddr renders an address as "g1abc…" (first 6 chars + ellipsis).

Open
OID
0c209b…03e8:11
shortAddr details

Inspect func

counts

func() (open int, done int)

counts returns the number of open and done items.

Open
OID
0c209b…03e8:12
counts details

Inspect func

Render

func(path string) string

Render returns the board as Markdown. Newest item (highest id) first. Render is NOT a crossing function (no \`cur realm\` param) — it is read-only and invoked by gnoweb, not via MsgCall.

Open
OID
0c209b…03e8:13
Render details

Inspect func
item : type =v0.item
items : v0.Tree Inspect
nextID : int =0
Add : func(text string) int Inspect
Toggle : func(id int) Inspect
Remove : func(id int) Inspect
idKey : func(id int) string Inspect
shortAddr : func(a .uverse.address) string Inspect
counts : func() (open int, done int) Inspect
Render : func(path string) string Inspect