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

home source realm

Package home is a personal home realm. gno.land also shows it as the profile page at /u/\<name>, which always calls R...

Overview

Package home is a personal home realm. gno.land also shows it as the profile page at /u/<name>, which always calls Render("") and reads its links against /u/<name>: every link here is absolute.

Functions 14

func AcceptOwnership

crossing Action
1func AcceptOwnership(cur realm)
source

AcceptOwnership completes a transfer. Only the pending owner may call it, and a realm address can't pass the account guard, so it never can.

func Hide

crossing Action
1func Hide(cur realm, author address)
source

Hide hides an author's guestbook entry for good. The entry stays stored, so the author can't sign again, and nobody's deposit is refunded. Hiding a hidden entry does nothing.

func RemovePage

crossing Action
1func RemovePage(cur realm, tab string)
source

RemovePage removes any tab except home, blog and guestbook.

func RemovePost

crossing Action
1func RemovePost(cur realm, slug string)
source

RemovePost deletes a post for good; its slug can be used again.

func Render

1func Render(path string) string
source

Render shows one tab, or one post at blog/<slug>. An unknown path shows Home and an unknown post shows Blog. The path is only compared against tab names or looked up as a slug, and never written into the page.

func SetBadges

crossing Action
1func SetBadges(cur realm, spec string)
source

SetBadges replaces every badge. One badge per line: "label | value | url"; a blank line starts a new row.

func SetNow

crossing Action
1func SetNow(cur realm, text string)
source

SetNow sets the one-line status shown on Home; empty clears it.

func SetPage

crossing Action
1func SetPage(cur realm, tab, md string)
source

SetPage creates or replaces any tab's markdown, Blog and Guestbook included. A new tab goes just before Guestbook, which stays last.

func SetPost

crossing Action
1func SetPost(cur realm, slug, title, body string)
source

SetPost publishes a post, or edits the post at slug. An edit keeps the post's place in the list and its publish date.

func SetProfile

crossing Action
1func SetProfile(cur realm, name, tagline string)
source

SetProfile sets the name and tagline drawn on the banner.

func Sign

crossing Action
1func Sign(cur realm, msg string)
source

Sign leaves one guestbook entry per address. The message is stored trimmed and sanitized when rendered, and must contain a visible character.

func Tip

crossing Action
1func Tip(cur realm)
source

Tip forwards exactly the ugnot sent with this call to the owner. The account guard is inlined so the audit harness sees it next to OriginSend. It forwards what was sent, never the realm's balance: the OriginSend banker refuses to spend more than was sent.

func TransferOwnership

crossing Action
1func TransferOwnership(cur realm, newOwner address)
source

TransferOwnership records newOwner as pending; nothing changes until that address calls AcceptOwnership. Naming the current owner cancels.

func Wave

crossing Action
1func Wave(cur realm)
source

Wave adds one to the wave count. It's a plain counter: anyone can wave again, and a wave stores nothing but the count.

Imports 13

Source Files 5