Render
func(path string) stringRender routes gnoweb paths: / the directory /?tag=identity the directory, filtered to one tag /<slug> one tool
- OID
- 0d3a66…fd4e:3
Render details
renderIndex
func(tag string) string- OID
- 0d3a66…fd4e:5
renderIndex details
tagLinks
func(c *v0.Catalog, base string) stringtagLinks renders the tag filter row, or "" when nothing is tagged. QueryEscape, not plain concatenation: a tag is an arbitrary string on Tool, and "a&b" would otherwise become a second query parameter while "a#b" would become a fragment, in both cases linking to a filter nobody asked for.
- OID
- 0d3a66…fd4e:6
tagLinks details
renderTool
func(t v0.Tool) string- OID
- 0d3a66…fd4e:7
renderTool details
renderUnknown
func(slug string) string- OID
- 0d3a66…fd4e:8
renderUnknown details
hubPath
untyped stringhubPath 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 stringhubURL 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.Tooltools 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.
- OID
- 0d3a66…fd4e:10
tools details
catalog
*v0.Catalogcatalog is the directory, sorted and checked once at deploy.
- OID
- 0d3a66…fd4e:14
catalog details
buildCatalog
func() *v0.Catalog- OID
- 0d3a66…fd4e:27
buildCatalog details
Count
func() intCount is how many tools the directory holds.
- OID
- 0d3a66…fd4e:29
Count details
Slugs
func() []stringSlugs lists every tool's slug, in directory order. gnokey query vm/qeval -data 'gno.land/r/moul/toolbox.Slugs()'
- OID
- 0d3a66…fd4e:30
Slugs details
PathOf
func(slug string) stringPathOf 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")'
- OID
- 0d3a66…fd4e:31
PathOf details
TitleOf
func(slug string) stringTitleOf returns the human name of one tool, or "".
- OID
- 0d3a66…fd4e:32
TitleOf details
DescOf
func(slug string) stringDescOf returns the one-line description of one tool, or "".
- OID
- 0d3a66…fd4e:33
DescOf details
Has
func(slug string) boolHas reports whether a tool with that slug is listed.
- OID
- 0d3a66…fd4e:34
Has details
Tags
func() []stringTags lists every tag any tool carries, each once.
- OID
- 0d3a66…fd4e:35