Admin
.uverse.addressAdmin is the initial authority: the only address that may write slots and accept, roll back or freeze a theme. It is a constant so a reviewer can read who controls the page without decoding chain state; TransferAuthority moves it afterwards. The value here is the standard test1 account, so the gnodev walkthrough in the README works unedited. \`make build ADMIN=g1...\` rewrites it for a real deployment.
Value
<gnolang.StringValue>
LayoutSlug
untyped stringValue
"layout"
StylePrefix
untyped stringValue
"style."
maxSlugLen
untyped bigintValue
(64 <untyped> bigint)
Theme
typeTheme is what a renderer realm promises. It is declared here, in the file that can never change, so every theme version agrees on one type identity. Render receives the render path ("" is the profile page) and returns markdown. The operator views (system, slots, edit, manifest) never reach a theme; for any other path it does not draw itself, a theme should return Fallback(path). A panic here aborts the query: there is no recovering a foreign realm's panic, so a broken theme shows an error until Rollback.
Value
home.Theme
Slot
typeSlot is one named fragment of the page.
Value
home.Slot
proxy
*v0.Proxy- OID
- 0f08db…abe6:67
proxy details
selfPath
stringValue
"gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home"
slots
*v0.Tree// slug -> \*Slot
- OID
- 0f08db…abe6:6
slots details
rev
int// total writes accepted; bumps on every mutation
Value
17
lastHeight
int64// height of the most recent write
Value
241605
init.11
func()- OID
- 0f08db…abe6:10
init.11 details
assertAuthority
func()assertAuthority panics unless the caller of the crossing function that owns cur is the current authority. It asks the proxy's Authority directly rather than going through proxy.AssertAuthorized, so content writes keep working after Freeze: freezing ends code upgrades, not editing.
- OID
- 0f08db…abe6:12
assertAuthority details
reservedSlugs
[]stringreservedSlugs are placeholders computed at render time (see render.gno). A slot may not take one of these names, so the page never depends on which of the two would win.
- OID
- 0f08db…abe6:14
reservedSlugs details
validSlug
func(slug string) boolvalidSlug reports whether slug is a legal slot name: 1..maxSlugLen bytes of \[a-z0-9.\_-]. No ':' so a slug can never break out of its own :slug: placeholder, and no uppercase so a slot has exactly one name.
- OID
- 0f08db…abe6:15
validSlug details
assertWritableSlug
func(slug string)- OID
- 0f08db…abe6:16
assertWritableSlug details
Set
func(slug string, body string)Set creates or replaces the slot named slug. This is the ordinary update: one slot, one transaction. An empty body keeps the slot but empties it; use Delete to remove it.
- OID
- 0f08db…abe6:17
Set details
Append
func(slug string, body string)Append adds to the end of a slot, creating it when absent. It exists for a body too large for one transaction: Set the first chunk, Append the rest.
- OID
- 0f08db…abe6:18
Append details
Delete
func(slug string)Delete removes a slot. Deleting the layout slot restores the theme's default layout.
- OID
- 0f08db…abe6:19
Delete details
write
func(slug string, body string)- OID
- 0f08db…abe6:20
write details
bump
func()- OID
- 0f08db…abe6:21
bump details
Get
func(slug string) stringGet returns a slot body, or "" when the slot does not exist.
- OID
- 0f08db…abe6:22
Get details
Has
func(slug string) boolHas reports whether a slot exists, empty or not.
- OID
- 0f08db…abe6:23
Has details
Lookup
func(slug string) (home.Slot, bool)Lookup returns a copy of a slot and whether it exists.
- OID
- 0f08db…abe6:24
Lookup details
Slugs
func() []stringSlugs returns every slot name, sorted.
- OID
- 0f08db…abe6:25
Slugs details
Each
func(fn func(...))Each visits every slot in name order until fn returns true.
- OID
- 0f08db…abe6:26
Each details
Style
func(key string, fallback string) stringStyle returns the style knob named key (the slot "style."+key), or fallback when it is absent or empty.
- OID
- 0f08db…abe6:27
Style details
Layout
func() stringLayout returns the layout slot, or "" when none has been set. Themes substitute their own default in that case.
- OID
- 0f08db…abe6:28
Layout details
Revision
func() intRevision returns the total number of writes this realm has accepted. It changes on every mutation, so a client can cheaply tell "nothing moved".
- OID
- 0f08db…abe6:29
Revision details
LastHeight
func() int64LastHeight returns the block height of the most recent write, or 0.
- OID
- 0f08db…abe6:30
LastHeight details
Manifest
func() stringManifest returns one tab-separated line per slot: <slug>\t<rev>\t<bytes>\t<sha256 of body, hex> It is the diff surface scripts/sync.sh reads: one query tells it exactly which local file is out of date, without downloading any body.
- OID
- 0f08db…abe6:31
Manifest details
Path
func() stringPath returns this realm's package path, e.g. "gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home".
- OID
- 0f08db…abe6:32
Path details
Link
func(sub string) stringLink returns the gnoweb path of a render path on this realm: Link("") is "/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home", Link("slots") is "/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home:slots".
- OID
- 0f08db…abe6:33
Link details
Register
func(t home.Theme)Register records the calling realm's theme as a candidate. The path filed is read off the crossing frame, never taken as an argument, so a candidate cannot claim to live somewhere it does not. Only realms nested under this one are admitted; a direct user call is refused.
- OID
- 0f08db…abe6:34
Register details
Accept
func(pkgPath string)Accept makes the candidate at pkgPath the live theme. Authority only.
- OID
- 0f08db…abe6:35
Accept details
Withdraw
func(pkgPath string)Withdraw drops a candidate. Authority only, except that a theme realm may always drop its own.
- OID
- 0f08db…abe6:36
Withdraw details
Rollback
func()Rollback restores the previous theme and returns the current one to the pending set. Authority only.
- OID
- 0f08db…abe6:37
Rollback details
Forget
func()Forget drops the rollback history and the storage it holds. Authority only.
- OID
- 0f08db…abe6:38
Forget details
Freeze
func()Freeze ends theme upgrades permanently. Slots stay editable. Authority only, and there is no way back.
- OID
- 0f08db…abe6:39
Freeze details
TransferAuthority
func(to .uverse.address)TransferAuthority hands both editing and upgrading to another address.
- OID
- 0f08db…abe6:40
TransferAuthority details
LivePath
func() stringLivePath returns the realm path of the theme currently serving, or "".
- OID
- 0f08db…abe6:41
LivePath details
PendingPaths
func() []stringPendingPaths returns the candidate theme paths awaiting acceptance.
- OID
- 0f08db…abe6:42
PendingPaths details
HistoryPaths
func() []stringHistoryPaths returns the themes this realm has already served, oldest first, excluding the live one.
- OID
- 0f08db…abe6:43
HistoryPaths details
Frozen
func() boolFrozen reports whether theme upgrades have ended.
- OID
- 0f08db…abe6:44
Frozen details
Authority
func() stringAuthority returns a human-readable description of who may write and upgrade.
- OID
- 0f08db…abe6:45
Authority details
liveTheme
func() (home.Theme, bool)liveTheme returns the accepted theme, if any.
- OID
- 0f08db…abe6:46
liveTheme details
Render
func(path string) stringRender is what gnoweb calls. The operator views (system, slots, edit, manifest) are always served here, never through the theme: a panic inside a foreign realm's code aborts the whole call and cannot be recovered from this side, so a theme that panics takes the page down until it is rolled back. These views are what the rollback is done from, and the routing keeps them out of the theme's reach. Every other path, the page itself included, goes to the live theme, or to the built-in renderer when none is accepted.
- OID
- 0f08db…abe6:47
Render details
operatorPaths
[]stringoperatorPaths are the render paths this realm keeps for itself.
- OID
- 0f08db…abe6:50
operatorPaths details
isOperatorPath
func(path string) bool- OID
- 0f08db…abe6:51
isOperatorPath details
cleanPath
func(path string) stringcleanPath drops a query string from a render path.
- OID
- 0f08db…abe6:52
cleanPath details
Fallback
func(path string) stringFallback is the built-in renderer. Render routes the operator views here directly, and themes delegate to it for every other path they do not draw themselves, so these views exist under any theme: "" the assembled page: the layout slot filled from the slots "slots" the slot index: name, size, revision, height of last write "slots/<slug>" one slot's raw markdown, fenced "edit" forms that write slots (they build the gnokey command) "edit/<slug>" the same, prefilled with one slot "system" who may write, which theme is live, pending, history "manifest" Manifest() as plain text, for scripts
- OID
- 0f08db…abe6:53
Fallback details
Filler
typeFiller substitutes :name: placeholders in a layout. It is lazy: a callback runs only when its placeholder occurs in the layout, so an unused slot is never even read. Substitution is single-pass and non-recursive, so a placeholder inside a slot body is left alone and no slot can expand into another. Names never contain ':', so no placeholder is a prefix of another and the result does not depend on registration order. A placeholder that nothing claims survives into the output verbatim: a missing section should be visible, not silently blank.
Value
home.Filler
NewFiller
func() *home.FillerNewFiller returns a Filler with every slot and every computed placeholder registered. A theme adds its own widgets with Add before calling Fill.
- OID
- 0f08db…abe6:54
NewFiller details
updated
func() stringupdated is the :updated: placeholder: when the slots last changed.
- OID
- 0f08db…abe6:55
updated details
defaultLayout
func() stringdefaultLayout renders before a layout slot exists and no theme is live, i.e. right after the very first deploy. It uses only computed placeholders, so it never shows an unresolved :slug: of its own.
- OID
- 0f08db…abe6:56
defaultLayout details
renderPage
func() string- OID
- 0f08db…abe6:57
renderPage details
slotLinks
func() stringslotLinks is the :slots: placeholder: a bullet list of every slot, linking to its raw view.
- OID
- 0f08db…abe6:58
slotLinks details
renderIndex
func() string- OID
- 0f08db…abe6:59
renderIndex details
renderSlot
func(slug string) string- OID
- 0f08db…abe6:60
renderSlot details
fence
func(body string) stringfence returns a code fence longer than any backtick run in body, so the body can never close it early.
- OID
- 0f08db…abe6:61
fence details
renderEdit
func(slug string) stringrenderEdit is the in-browser editor: gnoweb forms that build the gnokey command for Set and Delete. Anyone can see them; only the authority's signature makes the resulting transaction succeed.
- OID
- 0f08db…abe6:62
renderEdit details
attr
func(s string) stringattr escapes s for a double-quoted attribute of a gnoweb form tag, which must sit on one line: newlines and tabs become the \\n and \\t sequences the textarea unfolds.
- OID
- 0f08db…abe6:63
attr details
renderSystem
func() stringrenderSystem shows the upgrade wiring and offers the Accept form.
- OID
- 0f08db…abe6:64
renderSystem details
helpLink
func(fn string) string- OID
- 0f08db…abe6:65
helpLink details
sourceLink
func(pkgPath string) string- OID
- 0f08db…abe6:66