v2 source realm
Package builders is a public directory of people with proven, paid work.
Package builders is a public directory of people with proven, paid work.
v2 reads the work record from gild/v1, which counts paid work on both Gild boards, so people who only worked on the newer board can join too.
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.
3
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)const AppURL
AppURL is the Gild web app, linked from every page.
8
func BuildersJSON
ActionBuildersJSON lists builders with their live Gild stats.
func IsListed
ActionIsListed reports whether addr is in the directory.
func Leave
crossing ActionLeave removes the caller from the directory. Their Gild record stays.
func ProfileJSON
ActionProfileJSON returns one builder with live Gild stats, or null.
func Render
Render shows the directory, or one profile at u/<address>.
func SetOpen
crossing ActionSetOpen flips only the "open to work" switch.
func SetProfile
crossing Action1func SetProfile(cur realm, name, headline, bio, skills, website, github, x string, open bool)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.
func Size
ActionSize returns how many people are listed.
1
type Entry
structEntry is one person in the directory. It holds only what the builder wrote about themselves; their Gild stats are read live.