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"
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)
Status
typeStatus is where a task is in its life.
Value
v0.Status
StatusOpen
v0.Status// reward locked, waiting for a doer
Value
<zero>
StatusTaken
v0.Status// a doer is working on it
Value
<zero>
StatusInReview
v0.Status// work sent, waiting for the poster
Value
<zero>
StatusPaid
v0.Status// reward paid to the doer
Value
<zero>
StatusRefunded
v0.Status// reward returned to the poster
Value
<zero>
categories
[]stringCategories a task can have.
- OID
- 015bd3…1fe7:4
categories details
Task
typeTask is one posted piece of work.
Value
v0.Task
tasks
v0.Tree// id key -> \*Task, every task
- OID
- 015bd3…1fe7:6
tasks details
openTasks
v0.Tree// id key -> \*Task, only open tasks
- OID
- 015bd3…1fe7:8
openTasks details
byPoster
v0.Tree// address -> \*avl.Tree of id key -> \*Task
- OID
- 015bd3…1fe7:10
byPoster details
byDoer
v0.Tree// address -> \*avl.Tree of id key -> \*Task
- OID
- 015bd3…1fe7:12
byDoer details
nextID
v0.IDValue
<zero>
book
*v0.Book- OID
- 015bd3…1fe7:15
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/v0"
Value
"/r/g1jw2yrfqnd4fp90qadw88pnjgpden4vgagjvpe6/gild/v0"
init.53
func()- OID
- 015bd3…1fe7:21
init.53 details
Post
func(title string, details string, done string, category string, deadline int64) 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.
- OID
- 015bd3…1fe7:23
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.
- OID
- 015bd3…1fe7:24
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
- 015bd3…1fe7:25
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
- 015bd3…1fe7:26
Submit details
Approve
func(id int64)Approve pays the doer. Only the poster can call it, and only after work was sent.
- OID
- 015bd3…1fe7:27
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
- 015bd3…1fe7:28
RequestChanges details
ClaimAfterSilence
func(id int64)ClaimAfterSilence pays the doer when the poster has not answered within ReviewWindow of the work being sent.
- OID
- 015bd3…1fe7:29
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
- 015bd3…1fe7:30
Cancel details
Completed
func(addr .uverse.address) intCompleted returns how many tasks addr finished and was paid for on Gild. Other realms can call it to gate features by proven work.
- OID
- 015bd3…1fe7:31
Completed details
Earned
func(addr .uverse.address) int64Earned returns the total paid to addr on Gild, in Denom.
- OID
- 015bd3…1fe7:32
Earned details
HasCompleted
func(addr .uverse.address, n int) boolHasCompleted reports whether addr finished at least n tasks on Gild.
- OID
- 015bd3…1fe7:33
HasCompleted details
pay
func(t *v0.Task, rlm .uverse.realm, by string)pay marks the task paid, records it, then sends the reward. State changes come before the transfer.
- OID
- 015bd3…1fe7:34
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
- 015bd3…1fe7:35
send details
rewardFrom
func(sent chain.Coins) int64- OID
- 015bd3…1fe7:36
rewardFrom details
idStr
func(id v0.ID) stringidStr is the public form of a task id, e.g. "12".
- OID
- 015bd3…1fe7:37
idStr details
mustGet
func(id int64) *v0.Task- OID
- 015bd3…1fe7:38
mustGet details
index
func(tree *v0.Tree, addr .uverse.address, key string, t *v0.Task)- OID
- 015bd3…1fe7:39
index details
unindex
func(tree *v0.Tree, addr .uverse.address, key string)- OID
- 015bd3…1fe7:40
unindex details
isCategory
func(c string) bool- OID
- 015bd3…1fe7:41
isCategory details
TaskJSON
func(id int64) stringTaskJSON returns one task as JSON, or "null" if it does not exist.
- OID
- 015bd3…1fe7:42
TaskJSON details
TasksJSON
func(filter string, offset int, limit int) stringTasksJSON lists tasks newest first. filter is "open" or "all".
- OID
- 015bd3…1fe7:44
TasksJSON details
PosterTasksJSON
func(addr .uverse.address, offset int, limit int) stringPosterTasksJSON lists tasks posted by addr, newest first.
- OID
- 015bd3…1fe7:45
PosterTasksJSON details
DoerTasksJSON
func(addr .uverse.address, offset int, limit int) stringDoerTasksJSON lists tasks taken by addr, newest first.
- OID
- 015bd3…1fe7:46
DoerTasksJSON details
StatsJSON
func() stringStatsJSON returns board totals.
- OID
- 015bd3…1fe7:47
StatsJSON details
ProfileJSON
func(addr .uverse.address) stringProfileJSON returns the work record of addr.
- OID
- 015bd3…1fe7:48
ProfileJSON details
sub
func(tree *v0.Tree, addr .uverse.address) *v0.Tree- OID
- 015bd3…1fe7:49
sub details
clampPage
func(offset int, limit int) (int, int)- OID
- 015bd3…1fe7:50
clampPage details
pageJSON
func(tree *v0.Tree, offset int, limit int) string- OID
- 015bd3…1fe7:51
pageJSON details
taskJSON
func(t *v0.Task) string- OID
- 015bd3…1fe7:52
taskJSON details
unix
func(t time.Time) string- OID
- 015bd3…1fe7:53
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
- 015bd3…1fe7:54
jsonStr details
Render
func(path string) stringRender serves "" (open tasks), "task/\<id>" and "u/\<address>".
- OID
- 015bd3…1fe7:55
Render details
renderHome
func() string- OID
- 015bd3…1fe7:56
renderHome details
renderTask
func(t *v0.Task) string- OID
- 015bd3…1fe7:57
renderTask details
renderProfile
func(addr .uverse.address) string- OID
- 015bd3…1fe7:58
renderProfile details
mdText
func(s string) stringmdText escapes characters that would turn user text into markdown links, images, headings or HTML.
- OID
- 015bd3…1fe7:59
mdText details
gnot
func(u int64) stringgnot formats an amount in ugnot as GNOT, e.g. 1500000 -> "1.5 GNOT".
- OID
- 015bd3…1fe7:60
gnot details
trimSpace
func(s string) string- OID
- 015bd3…1fe7:61
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
- 015bd3…1fe7:63
checkText details
isWorkURL
func(s string) boolisWorkURL accepts https links with no spaces or control characters.
- OID
- 015bd3…1fe7:64