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

toolbox state

Back to all declarations

Render

func(path string) string

Render routes gnoweb paths: / the directory /?tag=identity the directory, filtered to one tag /<slug> one tool

Open
OID
0b4700…896c:3
Render details

Inspect func

renderIndex

func(tag string) string
Open
OID
0b4700…896c:5
renderIndex details

Inspect func

renderTool

func(t v0.Tool) string
Open
OID
0b4700…896c:7
renderTool details

Inspect func

renderUnknown

func(slug string) string
Open
OID
0b4700…896c:8
renderUnknown details

Inspect func

hubPath

untyped string

hubPath is this realm's own path. A realm can ask the chain for it, but a constant is what [p/moul/toolbox.SlugOf](/p/moul/toolbox#SlugOf) is checked against in tests, where there is no chain frame to ask.

Value

"gno.land/r/moul/toolbox"

hubURL

untyped string

hubURL is the gnoweb path of this realm, which every tool page links back to. A tool cannot import this realm to read it, so each one repeats it; this is the copy that is authoritative.

Value

"/r/moul/toolbox"

tools

[]v0.Tool (len=1)

tools is the directory. Adding one here and redeploying is how the toolbox grows; see the package doc for why it is not a registration call. Every entry must be a realm under this one: \[buildCatalog] refuses an entry whose slug does not match its path, so a copy-paste that keeps the wrong path fails the deploy rather than publishing a dead link.

Open
OID
0b4700…896c:10
tools details (len=1)

+1 more Inspect slice

catalog

*v0.Catalog

catalog is the directory, sorted and checked once at deploy.

Open
OID
0b4700…896c:14
catalog details

Inspect pointer

buildCatalog

func() *v0.Catalog
Open
OID
0b4700…896c:27
buildCatalog details

Inspect func

Count

func() int

Count is how many tools the directory holds.

Open
OID
0b4700…896c:29
Count details

Inspect func

Slugs

func() []string

Slugs lists every tool's slug, in directory order. gnokey query vm/qeval -data 'gno.land/r/moul/toolbox.Slugs()'

Open
OID
0b4700…896c:30
Slugs details

Inspect func

PathOf

func(slug string) string

PathOf returns the package path of one tool, or "" when there is no such tool. Flat strings rather than the struct: a nested value inside a persisted object prints as an opaque \`ref(...)\` over \`vm/qeval\`, so a read API that is meant to be queried returns scalars. gnokey query vm/qeval -data 'gno.land/r/moul/toolbox.PathOf("usernames")'

Open
OID
0b4700…896c:31
PathOf details

Inspect func

TitleOf

func(slug string) string

TitleOf returns the human name of one tool, or "".

Open
OID
0b4700…896c:32
TitleOf details

Inspect func

DescOf

func(slug string) string

DescOf returns the one-line description of one tool, or "".

Open
OID
0b4700…896c:33
DescOf details

Inspect func

Has

func(slug string) bool

Has reports whether a tool with that slug is listed.

Open
OID
0b4700…896c:34
Has details

Inspect func

Tags

func() []string

Tags lists every tag any tool carries, each once.

Open
OID
0b4700…896c:35
Tags details

Inspect func
Render : func(path string) string Inspect
renderIndex : func(tag string) string Inspect
renderTool : func(t v0.Tool) string Inspect
renderUnknown : func(slug string) string Inspect
hubPath : untyped string ="gno.land/r/moul/toolbox"
hubURL : untyped string ="/r/moul/toolbox"
tools : []v0.Tool (len=1) Inspect
catalog : *v0.Catalog Inspect
buildCatalog : func() *v0.Catalog Inspect
Count : func() int Inspect
Slugs : func() []string Inspect
PathOf : func(slug string) string Inspect
TitleOf : func(slug string) string Inspect
DescOf : func(slug string) string Inspect
Has : func(slug string) bool Inspect
Tags : func() []string Inspect