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 samcrew's page on gno.land, served at /u/samcrew.

Overview

Package home is samcrew's page on gno.land, served at /u/samcrew.

The page is assembled from SLOTS (named markdown fragments, one Set each); the slot named "layout" is the template and every :slug: in it is filled in a single pass. The crew roster is not a slot: see crew.gno.

The admin starts as the samcrew namespace multisig and moves with a two-step ProposeAdmin / AcceptAdmin, so it can later be handed to the DAO.

Functions 16

func AcceptAdmin

crossing Action
1func AcceptAdmin(cur realm)
source

AcceptAdmin completes a handover started by ProposeAdmin.

func AddMember

crossing Action
1func AddMember(cur realm, id, handle, role, team, url string)
source

AddMember puts someone on the roster, in a team, linked to a public page.

func ClearLine

crossing Action
1func ClearLine(cur realm, id string)
source

ClearLine removes a member's line, for moderation.

func Delete

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

Delete removes a slot. Deleting "layout" falls back to the built-in layout.

func Get

Action
1func Get(slug string) string
source

Get returns a slot body, or "" when the slot does not exist.

func IsMember

Action
1func IsMember(addr address) bool
source

IsMember reports whether addr is linked to a crew profile.

func LinkProfile

crossing Action
1func LinkProfile(cur realm, id string, addr address, home string)
source

LinkProfile ties a member to their gno.land identity. home is their home realm path ("/r/..."), or "" to link to /u/<addr>. From then on the member can write their own line with SetLine.

func ProposeAdmin

crossing Action
1func ProposeAdmin(cur realm, next address)
source

ProposeAdmin starts a handover. Nothing changes until the new address calls AcceptAdmin, so a typo cannot lock the page.

func Render

1func Render(path string) string
source

Render serves:

Example
1""             the team page
2"slots"        the slot index
3"slots/<slug>" one slot's raw markdown

func Set

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

Set creates or replaces one slot.

func SetGallery

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

SetGallery replaces a whole gallery from its line format.

func SetLine

crossing Action
1func SetLine(cur realm, line string)
source

SetLine lets a crew member with a linked profile write their own line. It renders as plain text: markdown in it is escaped.

func UpdateMember

crossing Action
1func UpdateMember(cur realm, id, handle, role, team, url string)
source

UpdateMember changes a member's handle, role, team and public link.

Imports 5

Source Files 7