Skip to content Search Apps Documentation Source Content Run Reset Eval Playground 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.

v1 source realm

Package builders is a public directory of people with proven, paid work.

Overview

Package builders is a public directory of people with proven, paid work.

v1 adds full profiles: a display name, a headline, a short bio, skills, links and an "open to work" switch. Each builder edits their own profile and nobody else can. Work stats are never stored here: they are read from the Gild realm every time, so they cannot be edited or faked.

Anyone can list themselves, but only after finishing at least one paid task on Gild. No oracle, no admin, no off-chain list.

Constants 2

const ErrNoProof, ErrName, ErrHeadline, ErrBio, ErrSkills, ErrWebsite, ErrGitHub, ErrX, ErrNotIn

 1const (
 2	ErrNoProof  = "builders: finish a paid task on Gild first"
 3	ErrName     = "builders: name must be 1 to 40 characters"
 4	ErrHeadline = "builders: headline must be 1 to 160 characters"
 5	ErrBio      = "builders: bio must be at most 600 characters"
 6	ErrSkills   = "builders: use up to 6 skills of letters, numbers, spaces, + # . or -"
 7	ErrWebsite  = "builders: website must start with https:// and have no spaces"
 8	ErrGitHub   = "builders: GitHub must be a username, like octocat"
 9	ErrX        = "builders: X must be a handle, like gnoland"
10	ErrNotIn    = "builders: you are not in the directory"
11)
source

Functions 8

func BuildersJSON

Action
1func BuildersJSON(offset, limit int) string
source

BuildersJSON lists builders with their live Gild stats.

func IsListed

Action
1func IsListed(addr address) bool
source

IsListed reports whether addr is in the directory.

func Leave

crossing Action
1func Leave(cur realm)
source

Leave removes the caller from the directory. Their Gild record stays.

func ProfileJSON

Action
1func ProfileJSON(addr address) string
source

ProfileJSON returns one builder with live Gild stats, or null.

func Render

1func Render(path string) string
source

Render shows the directory, or one profile at u/<address>.

func SetOpen

crossing Action
1func SetOpen(cur realm, open bool)
source

SetOpen flips only the "open to work" switch.

func SetProfile

crossing Action
1func SetProfile(cur realm, name, headline, bio, skills, website, github, x string, open bool)
source

SetProfile creates or updates the caller's profile. Skills is a comma-separated list. Empty links are allowed. It fails unless the caller has finished at least MinTasks paid Gild tasks.

Types 1

type Entry

struct
 1type Entry struct {
 2	Addr      address
 3	Name      string
 4	Headline  string
 5	Bio       string
 6	Skills    []string
 7	Website   string
 8	GitHub    string
 9	X         string
10	Open      bool
11	JoinedAt  time.Time
12	UpdatedAt time.Time
13}
source

Entry is one person in the directory. It holds only what the builder wrote about themselves; their Gild stats are read live.

Dependencies

Source Files 2