ErrUserCallOnly
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: post must be a direct user call"
ErrReward
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: send exactly one coin of ugnot"
ErrRewardRange
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: reward is outside the allowed range"
ErrTitle
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: title must be 3 to 120 characters"
ErrDetails
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: details are too long"
ErrDone
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: done text is too long"
ErrCategory
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: unknown category"
ErrDeadline
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: deadline must be 1 hour to 90 days from now"
ErrNotFound
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: task not found"
ErrNotOpen
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: task is not open"
ErrOwnTask
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: you cannot take your own task"
ErrPastDeadline
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: deadline has passed"
ErrNotDoer
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: only the doer can do this"
ErrNotPoster
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: only the poster can do this"
ErrNotTaken
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: task is not taken"
ErrNotInReview
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: task is not in review"
ErrURL
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: work link must start with https:// and have no spaces"
ErrChangesUsed
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: changes were already asked once"
ErrNote
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: note must be 1 to 1000 characters"
ErrTooEarly
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: the review window has not ended"
ErrDoerHasTime
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: the doer still has time before the deadline"
ErrCannotCancel
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: this task can no longer be cancelled"
ErrMinDone
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: required experience must be 0 to 100 paid tasks"
ErrInvite
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: invite must be a valid address"
ErrInviteSelf
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: you cannot offer a task to yourself"
ErrInviteOnly
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: this task was offered to someone else"
ErrNeedRecord
untyped stringError messages. Each failure has its own message so callers, tests and the web app can tell them apart.
Value
"gild: this task needs more paid Gild work on your record"
Denom
untyped stringRules. They are constants so anyone can read them in the source.
Value
"ugnot"
MinReward
int64// 1 GNOT
Value
1000000
MaxReward
int64// 1 billion GNOT, a sanity cap
Value
1000000000000000
ReviewWindow
time.Duration// poster's time to answer sent work
Value
<zero>
ChangesExtension
time.Duration// minimum time a doer gets after changes are asked
Value
<zero>
MinDeadline
time.DurationRules. They are constants so anyone can read them in the source.
Value
<zero>
MaxDeadline
time.DurationRules. They are constants so anyone can read them in the source.
Value
<zero>
MinTitle
untyped bigintRules. They are constants so anyone can read them in the source.
Value
(3 <untyped> bigint)
MaxTitle
untyped bigintRules. They are constants so anyone can read them in the source.
Value
(120 <untyped> bigint)
MaxDetails
untyped bigintRules. They are constants so anyone can read them in the source.
Value
(4000 <untyped> bigint)
MaxDone
untyped bigintRules. They are constants so anyone can read them in the source.
Value
(1000 <untyped> bigint)
MaxURL
untyped bigintRules. They are constants so anyone can read them in the source.
Value
(300 <untyped> bigint)
MaxNote
untyped bigintRules. They are constants so anyone can read them in the source.
Value
(1000 <untyped> bigint)
MaxPage
untyped bigintRules. They are constants so anyone can read them in the source.
Value
(50 <untyped> bigint)
MaxMinDone
untyped bigint// the highest experience a task can require
Value
(100 <untyped> bigint)
Status
typeStatus is where a task is in its life.
Value
v1.Status
StatusOpen
v1.Status// reward locked, waiting for a doer
Value
<zero>
StatusTaken
v1.Status// a doer is working on it
Value
<zero>
StatusInReview
v1.Status// work sent, waiting for the poster
Value
<zero>
StatusPaid
v1.Status// reward paid to the doer
Value
<zero>
StatusRefunded
v1.Status// reward returned to the poster
Value
<zero>
categories
[]stringCategories a task can have.
- OID
- 0e2ecc…abb2:4
categories details
Task
typeTask is one posted piece of work.
Value
v1.Task
tasks
v0.Tree// id key -> \*Task, every task
- OID
- 0e2ecc…abb2:6
tasks details
openTasks
v0.Tree// id key -> \*Task, only open tasks
- OID
- 0e2ecc…abb2:8
openTasks details
byPoster
v0.Tree// address -> \*avl.Tree of id key -> \*Task
- OID
- 0e2ecc…abb2:10
byPoster details
byDoer
v0.Tree// address -> \*avl.Tree of id key -> \*Task
- OID
- 0e2ecc…abb2:12
byDoer details
byInvite
v0.Tree// address -> \*avl.Tree of id key -> \*Task, direct offers
- OID
- 0e2ecc…abb2:14
byInvite details
nextID
v0.IDValue
<zero>
book
*v0.Book- OID
- 0e2ecc…abb2:17
book details
lockedTotal
int64// rewards currently held by this realm
Value
0
paidTotal
int64// rewards paid to doers
Value
0
webPath
string// this realm's gnoweb path, e.g. "/r/thesithunyein/gild/v1"
Value
"/r/g1jw2yrfqnd4fp90qadw88pnjgpden4vgagjvpe6/gild/v1"
init.60
func()- OID
- 0e2ecc…abb2:23
init.60 details
Post
func(title string, details string, done string, category string, deadline int64, minDone int, invite string) int64Post creates a task and locks the coins sent with the call as its reward. It must be called directly by a user (maketx call) with exactly one coin of Denom attached. deadline is a Unix time in seconds. minDone is how many paid Gild tasks a doer must already have (0 = anyone). invite is an address the task is offered to, or "" for an open task.
- OID
- 0e2ecc…abb2:25
Post details
Take
func(id int64)Take assigns an open task to the caller. The poster cannot take their own task, and nobody can take a task after its deadline. A direct offer can only be taken by the invited address, and a gated task only by someone whose record meets its MinDone.
- OID
- 0e2ecc…abb2:26
Take details
Release
func(id int64)Release gives a taken task back so someone else can take it. Only the doer can call it, and only before work is sent. Any change request is cleared, so the next doer starts fresh.
- OID
- 0e2ecc…abb2:27
Release details
Submit
func(id int64, workURL string)Submit sends a link to the finished work. Only the doer can call it, and only while the task is taken.
- OID
- 0e2ecc…abb2:28
Submit details
Approve
func(id int64)Approve pays the doer. Only the poster can call it, and only after work was sent.
- OID
- 0e2ecc…abb2:29
Approve details
RequestChanges
func(id int64, note string)RequestChanges sends the task back to the doer once. The doer gets at least ChangesExtension from now before the poster can take the reward back.
- OID
- 0e2ecc…abb2:30
RequestChanges details
ClaimAfterSilence
func(id int64)ClaimAfterSilence pays the doer when the poster has not answered within ReviewWindow of the work being sent.
- OID
- 0e2ecc…abb2:31
ClaimAfterSilence details
Cancel
func(id int64)Cancel returns the reward to the poster. It works while the task is open, or when a doer took it but sent no work before the deadline. It never works once work has been sent, so a poster cannot cancel to avoid paying.
- OID
- 0e2ecc…abb2:32
Cancel details
Completed
func(addr .uverse.address) intCompleted returns how many tasks addr finished and was paid for on Gild, across both boards (v0 and v1). Other realms can call it to gate features by proven work.
- OID
- 0e2ecc…abb2:33
Completed details
Earned
func(addr .uverse.address) int64Earned returns the total paid to addr on Gild across both boards, in Denom.
- OID
- 0e2ecc…abb2:34
Earned details
HasCompleted
func(addr .uverse.address, n int) boolHasCompleted reports whether addr finished at least n tasks on Gild.
- OID
- 0e2ecc…abb2:35
HasCompleted details
pay
func(t *v1.Task, rlm .uverse.realm, by string)pay marks the task paid, records it, then sends the reward. State changes come before the transfer.
- OID
- 0e2ecc…abb2:36
pay details
send
func(to .uverse.address, amount int64, rlm .uverse.realm)send pays amount from this realm to addr. rlm must be the live realm handle.
- OID
- 0e2ecc…abb2:37
send details
rewardFrom
func(sent chain.Coins) int64- OID
- 0e2ecc…abb2:38
rewardFrom details
idStr
func(id v0.ID) stringidStr is the public form of a task id, e.g. "12".
- OID
- 0e2ecc…abb2:39
idStr details
mustGet
func(id int64) *v1.Task- OID
- 0e2ecc…abb2:40
mustGet details
index
func(tree *v0.Tree, addr .uverse.address, key string, t *v1.Task)- OID
- 0e2ecc…abb2:41
index details
unindex
func(tree *v0.Tree, addr .uverse.address, key string)- OID
- 0e2ecc…abb2:42
unindex details
isCategory
func(c string) bool- OID
- 0e2ecc…abb2:43
isCategory details
TaskJSON
func(id int64) stringTaskJSON returns one task as JSON, or "null" if it does not exist.
- OID
- 0e2ecc…abb2:44
TaskJSON details
TasksJSON
func(filter string, offset int, limit int) stringTasksJSON lists tasks newest first. filter is "open" or "all".
- OID
- 0e2ecc…abb2:46
TasksJSON details
PosterTasksJSON
func(addr .uverse.address, offset int, limit int) stringPosterTasksJSON lists tasks posted by addr, newest first.
- OID
- 0e2ecc…abb2:47
PosterTasksJSON details
DoerTasksJSON
func(addr .uverse.address, offset int, limit int) stringDoerTasksJSON lists tasks taken by addr, newest first.
- OID
- 0e2ecc…abb2:48
DoerTasksJSON details
InvitesJSON
func(addr .uverse.address, offset int, limit int) stringInvitesJSON lists tasks offered directly to addr, newest first. It keeps every offer, so check each task's status.
- OID
- 0e2ecc…abb2:49
InvitesJSON details
StatsJSON
func() stringStatsJSON returns totals for this board (v1). Add gild/v0 StatsJSON for all-time numbers.
- OID
- 0e2ecc…abb2:50
StatsJSON details
ProfileJSON
func(addr .uverse.address) stringProfileJSON returns the work record of addr. completed and earned count both boards; posted, spent and recent cover this board only.
- OID
- 0e2ecc…abb2:51
ProfileJSON details
sub
func(tree *v0.Tree, addr .uverse.address) *v0.Tree- OID
- 0e2ecc…abb2:52
sub details
clampPage
func(offset int, limit int) (int, int)- OID
- 0e2ecc…abb2:53
clampPage details
pageJSON
func(tree *v0.Tree, offset int, limit int) string- OID
- 0e2ecc…abb2:54
pageJSON details
taskJSON
func(t *v1.Task) string- OID
- 0e2ecc…abb2:55
taskJSON details
unix
func(t time.Time) string- OID
- 0e2ecc…abb2:56
unix details
jsonStr
func(s string) stringjsonStr returns s as a JSON string literal. It also escapes \<, > and & so the output is safe to place inside HTML.
- OID
- 0e2ecc…abb2:57
jsonStr details
mdText
func(s string) stringmdText escapes characters that would turn user text into markdown links, images, headings or HTML.
- OID
- 0e2ecc…abb2:58
mdText details
gnot
func(u int64) stringgnot formats an amount in ugnot as GNOT, e.g. 1500000 -> "1.5 GNOT".
- OID
- 0e2ecc…abb2:59
gnot details
AppURL
untyped stringAppURL is the web app. Every gnoweb page links to it, but nothing here depends on it: the realm works the same from gnokey or gnoweb.
Value
"https://gild.sithunyein.com/app"
Render
func(path string) stringRender serves the gnoweb pages: "" the board: totals, open tasks, rules "task/<id>" one task "u/<address>" someone's work record
- OID
- 0e2ecc…abb2:60
Render details
notFound
func() string- OID
- 0e2ecc…abb2:62
notFound details
renderHome
func() string- OID
- 0e2ecc…abb2:63
renderHome details
renderTask
func(t *v1.Task) string- OID
- 0e2ecc…abb2:64
renderTask details
nextStep
func(t *v1.Task) stringnextStep tells a gnoweb reader which function moves the task forward.
- OID
- 0e2ecc…abb2:65
nextStep details
renderProfile
func(addr .uverse.address) string- OID
- 0e2ecc…abb2:66
renderProfile details
whoCanTake
func(t *v1.Task) string- OID
- 0e2ecc…abb2:67
whoCanTake details
statusText
func(s v1.Status) string- OID
- 0e2ecc…abb2:68
statusText details
who
func(a .uverse.address) stringwho links an address to its work record, shortened to fit a table.
- OID
- 0e2ecc…abb2:69
who details
cell
func(s string) stringcell is mdText for a table cell: one line, no pipes.
- OID
- 0e2ecc…abb2:70
cell details
siblingPath
func(rel string) stringsiblingPath returns another realm in this namespace, e.g. "builders/v2".
- OID
- 0e2ecc…abb2:71
siblingPath details
trimSpace
func(s string) string- OID
- 0e2ecc…abb2:72
trimSpace details
checkText
func(s string, min int, max int, msg string)checkText panics with msg unless s has between min and max characters and contains no control characters other than newline and tab.
- OID
- 0e2ecc…abb2:74
checkText details
isWorkURL
func(s string) boolisWorkURL accepts https links with no spaces or control characters.
- OID
- 0e2ecc…abb2:75