basePath
untyped stringbasePath is this realm's render path. It is a constant rather than a lookup so link building stays a pure string operation, and it is asserted against the real path by TestBasePathMatchesTheRealm.
Value
"/r/moul/x/wiki/v0"
steward
.uverse.addressValue
<gnolang.StringValue>
site
*v0.Wiki- OID
- 04be2b…265b:40
site details
Ownable
*v0.Ownable- OID
- 04be2b…265b:38
Ownable details
editors
v1.Set- OID
- 04be2b…265b:6
editors details
banned
v1.Set- OID
- 04be2b…265b:9
banned details
cooldown
int64Value
0
lastEdit
v0.Tree// address -> the height of that address's last edit
- OID
- 04be2b…265b:13
lastEdit details
editCount
intValue
0
init.9
func()- OID
- 04be2b…265b:15
init.9 details
Edit
func(title string, body string, summary string) intEdit creates or updates a page and returns the new revision id.
- OID
- 04be2b…265b:17
Edit details
Revert
func(title string, rev int, summary string) intRevert restores an earlier revision of a page as a new revision.
- OID
- 04be2b…265b:18
Revert details
Comment
func(title string, body string, replyTo int) intComment appends a message to a page's discussion and returns its id. Pass replyTo = 0 for a new thread, or the id of a top-level message to reply to. Commenting deliberately ignores the page's protection level: locking an article is how a steward stops an edit war, and the discussion is where that war is supposed to move. A banned address still cannot comment, and the cooldown still applies.
- OID
- 04be2b…265b:19
Comment details
HideComment
func(title string, id int) intHideComment clears one message's body and returns the bytes released. The message stays in the thread, marked as removed.
- OID
- 04be2b…265b:20
HideComment details
Protect
func(title string, level string)Protect sets a page's edit gate: "open", "semi" or "locked".
- OID
- 04be2b…265b:21
Protect details
Move
func(from string, to string, reason string)Move renames a page, keeping its history and leaving a redirect behind.
- OID
- 04be2b…265b:22
Move details
Blank
func(title string, reason string)Blank replaces a page's content with a tombstone revision. The history stays.
- OID
- 04be2b…265b:23
Blank details
Purge
func(title string) intPurge drops every body this realm still holds for a page and returns the number of bytes released. Use it for content that must stop being served from realm state; it cannot remove the transactions that wrote it.
- OID
- 04be2b…265b:24
Purge details
AddEditor
func(addr .uverse.address)AddEditor lets an address write to semi-protected pages.
- OID
- 04be2b…265b:25
AddEditor details
RemoveEditor
func(addr .uverse.address)RemoveEditor revokes semi-protected write access.
- OID
- 04be2b…265b:26
RemoveEditor details
Ban
func(addr .uverse.address)Ban stops an address from editing anything.
- OID
- 04be2b…265b:27
Ban details
Unban
func(addr .uverse.address)Unban lifts a ban.
- OID
- 04be2b…265b:28
Unban details
SetCooldown
func(blocks int)SetCooldown sets the minimum number of blocks between two edits by the same address; 0 disables it.
- OID
- 04be2b…265b:29
SetCooldown details
assertNotBanned
func(caller .uverse.address)assertNotBanned is the floor every write shares: the ban list and the per-address cooldown.
- OID
- 04be2b…265b:30
assertNotBanned details
assertMayEdit
func(caller .uverse.address, title string)assertMayEdit is the whole authority model of this wiki, in one function.
- OID
- 04be2b…265b:31
assertMayEdit details
noteEdit
func(caller .uverse.address)- OID
- 04be2b…265b:32
noteEdit details
ctx
func() v0.Ctxctx is the render context handed to the library on every read.
- OID
- 04be2b…265b:33
ctx details
Render
func(path string) stringRender is the whole read surface of the wiki. Routes: the front page Title an article Title/history[?offset=] its revisions, newest first Title/raw the current source, with its hash Title/rev/<id> one stored revision Title/diff?from=&to= a line diff between two revisions Title/talk[?offset=] the page's discussion Category:Name a category page and its members Special:AllPages[?ns=] the page index for a namespace Special:Categories every category with at least one member Special:RecentChanges the change feed Special:Backlinks?page= what links to a page Special:Stats size and storage cost
- OID
- 04be2b…265b:34
Render details
renderSpecial
func(c v0.Ctx, name string, req *v0.Request) string- OID
- 04be2b…265b:35
renderSpecial details
intParam
func(s string, def int) intintParam parses a decimal parameter, falling back to def. It never panics: Render is reached from a URL, and a malformed query must render a page, not abort the query.
- OID
- 04be2b…265b:36
intParam details
seed
func()seed writes the pages the wiki starts with, so a fresh deploy renders something a reader can follow instead of an empty index.
- OID
- 04be2b…265b:37