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

topic

type

topic holds the tallies and the set of callers who already reacted.

Value

v0.topic

topics

*v0.Tree

topics maps topic name -> \*topic, kept in an avl.Tree for deterministic order.

Open
OID
0bcd49…687a:4
topics details

Inspect pointer

getOrPanic

func(name string) *v0.topic
Open
OID
0bcd49…687a:6
getOrPanic details

Inspect func

newTopic

func(name string) *v0.topic
Open
OID
0bcd49…687a:8
newTopic details

Inspect func

CreateTopic

func(name string)

CreateTopic registers a new empty topic. It is optional: React auto-creates a topic if it does not exist yet. Panics if the topic already exists or the name is empty.

Open
OID
0bcd49…687a:9
CreateTopic details

Inspect func

React

func(name string, emoji string)

React adds the caller's reaction (an emoji) to a topic. Each caller may react at most once per topic. The topic is created on demand if missing. Panics on empty input or when the caller has already reacted to this topic.

Open
OID
0bcd49…687a:10
React details

Inspect func

TopicCount

func() int

TopicCount returns the number of topics on the board.

Open
OID
0bcd49…687a:11
TopicCount details

Inspect func

emojiTally

type

emojiTally is used to sort a topic's tallies deterministically.

Value

v0.emojiTally

byCountDesc

type

byCountDesc sorts tallies by count descending, then emoji ascending.

Value

v0.byCountDesc

Render

func(path string) string

Render returns a Markdown view of the board. If path is a non-empty topic name, only that topic is shown; otherwise all topics are listed.

Open
OID
0bcd49…687a:12
Render details

Inspect func
topic : type =v0.topic
topics : *v0.Tree Inspect
getOrPanic : func(name string) *v0.topic Inspect
newTopic : func(name string) *v0.topic Inspect
CreateTopic : func(name string) Inspect
React : func(name string, emoji string) Inspect
TopicCount : func() int Inspect
emojiTally : type =v0.emojiTally
byCountDesc : type =v0.byCountDesc
Render : func(path string) string Inspect