Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

bolo source realm

Package bolo is Bolo's version registry (API §3.7): it tells clients which version new campaigns start on. Every vers...

Overview

Package bolo is Bolo's version registry (API §3.7): it tells clients which version new campaigns start on. Every version lives at its own path, gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/vN, and keeps its campaigns and their money for good (ADR D14); the registry holds no money and only points.

Constants 1

const ErrNotUserCall, ErrSessionKey, ErrNotAdmin, ErrSetting

1const (
2	ErrNotUserCall Error = "err.use_wallet: not a direct transaction from a wallet"
3	ErrSessionKey  Error = "err.master_key: a session key can't do this"
4	ErrNotAdmin    Error = "err.not_allowed: only the admin can do this"
5	ErrSetting     Error = "err.input: invalid setting"
6)
source

Functions 8

func AcceptAdmin

crossing Action
1func AcceptAdmin(cur realm)
source

AcceptAdmin makes the proposed admin the admin, and ends the proposal.

func AddVersion

crossing Action
1func AddVersion(cur realm, path string)
source

AddVersion registers a version. None is ever removed.

func Current

Action
1func Current() string
source

Current returns the version new campaigns should use: a pkgpath, or "" before the first SetCurrent.

func GetAdmin

Action
1func GetAdmin() (address, address)
source

GetAdmin returns the admin and the proposed admin, "" when there is none.

func ProposeAdmin

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

ProposeAdmin proposes next as the registry's admin, who takes over by accepting. A second proposal replaces the first.

func Render

1func Render(path string) string
source

Render is Bolo's front page on gnoweb, the twin of the web app's Home (UI spec §3, §4.13): the name, the tagline, a link to the current version, then the versions, oldest first, the current one marked. It ignores path: nothing a visitor types reaches the page (API §3.7).

func SetCurrent

crossing Action
1func SetCurrent(cur realm, path string)
source

SetCurrent points new campaigns, and their donors' money, at a version already added.

func Versions

Action
1func Versions() []string
source

Versions returns every version ever added, oldest first, as a copy.

Types 1

type Error

ident
1type Error string
source

Error is the type of every failure the registry reports (API C10, §7). Each one is a constant led by its copy key, the same keys v0 uses (UI spec §8).

Methods on Error

func Error

method on Error
1func (e Error) Error() string
source

Dependencies

Imports 4

/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo

Imported by indexer

Source Files 9

Directories 1