Skip to content Search Apps Documentation Source Content Run Reset Eval Playground 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.

v4 state

Back to all declarations

bucketSize

untyped bigint

Value

(16 <untyped> bigint)

MaxPerAuthor

untyped bigint

Value

(32 <untyped> bigint)

buckets

*v0.Tree

// bucket number -> records joined by "\\n"

Open
OID
0acb0e…ad42:4
buckets details

Inspect pointer

count

int

Value

0

record

func(id int) string

record returns "author recipe" for an id, or "".

Open
OID
0acb0e…ad42:12
record details

Inspect func

split

func(rec string) (string, string)
Open
OID
0acb0e…ad42:13
split details

Inspect func

mustRecord

func(id int) (string, string)
Open
OID
0acb0e…ad42:14
mustRecord details

Inspect func

authorCount

func(addr string) int

authorCount is how many moves an author has published.

Open
OID
0acb0e…ad42:15
authorCount details

Inspect func

authorIDs

func(addr string) []int
Open
OID
0acb0e…ad42:16
authorIDs details

Inspect func

Publish

func(recipe string) int

Publish checks a recipe and stores it under the caller's address. It returns the move's id. An author can publish MaxPerAuthor moves.

Open
OID
0acb0e…ad42:17
Publish details

Inspect func

Count

func() int

Count is how many moves have been published.

Open
OID
0acb0e…ad42:18
Count details

Inspect func

Recipe

func(id int) string

Recipe returns a move's recipe string.

Open
OID
0acb0e…ad42:19
Recipe details

Inspect func

Author

func(id int) string

Author returns who published a move.

Open
OID
0acb0e…ad42:20
Author details

Inspect func

Check

func(recipe string) string

Check reports whether a recipe is valid and what cooldown it needs, without storing anything: "ok \<cost>" or the reason it is refused.

Open
OID
0acb0e…ad42:21
Check details

Inspect func

MoveJSON

func(id int) string

MoveJSON describes one move as JSON.

Open
OID
0acb0e…ad42:23
MoveJSON details

Inspect func

List

func(skip int, n int) string

List returns up to n moves as a JSON array, newest first, skipping the newest skip.

Open
OID
0acb0e…ad42:24
List details

Inspect func

ByAuthor

func(addr string) string

ByAuthor returns an author's moves as a JSON array, oldest first.

Open
OID
0acb0e…ad42:25
ByAuthor details

Inspect func

header

untyped string

Value

"| # | Move | Recharge | What it does | Author |\n|---|---|---|---|---|\n"

Render

func(path string) string

Render shows the newest moves, one move at "move/\<id>", or an author's moves at "by/\<address>".

Open
OID
0acb0e…ad42:30
Render details

Inspect func
bucketSize : untyped bigint =(16 <untyped> bigint)
MaxPerAuthor : untyped bigint =(32 <untyped> bigint)
buckets : *v0.Tree Inspect
byAuthor : *v0.Tree Inspect
count : int =0
bucketKey : func(id int) string Inspect
record : func(id int) string Inspect
split : func(rec string) (string, string) Inspect
mustRecord : func(id int) (string, string) Inspect
authorCount : func(addr string) int Inspect
authorIDs : func(addr string) []int Inspect
Publish : func(recipe string) int Inspect
Count : func() int Inspect
Recipe : func(id int) string Inspect
Author : func(id int) string Inspect
Check : func(recipe string) string Inspect
moveJSON : func(id int) string Inspect
MoveJSON : func(id int) string Inspect
List : func(skip int, n int) string Inspect
ByAuthor : func(addr string) string Inspect
short : func(addr string) string Inspect
secs : func(ticks int) string Inspect
row : func(b *strings.Builder, id int) Inspect
header : untyped string ="| # | Move | Recharge | What it does | Author |\n|---|---|---|---|---|\n"
Render : func(path string) string Inspect