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.

v0 source realm

Package erratabank records corrections, finder credit and book reward escrow.

Overview

Package erratabank records corrections, finder credit and book reward escrow.

Constants 1

Functions 16

func Accept

crossing Action
1func Accept(cur realm, erratumID int, note string)
source

Accept credits the finder and pays the full reward when escrow covers it.

func AcceptedEntriesPage

Action
1func AcceptedEntriesPage(bookID, offset, limit int) []errata.Entry
source

AcceptedEntriesPage supports integrations that render a bounded page.

func CreateBook

crossing Action
1func CreateBook(cur realm, title, edition, link string, rewardPerErratum int64) int
source

CreateBook registers an open book and optionally credits inbound reward escrow.

func FundBook

crossing Action
1func FundBook(cur realm, bookID int)
source

FundBook credits a book with ugnot supplied by any direct caller.

func MarkDuplicate

crossing Action
1func MarkDuplicate(cur realm, erratumID, originalID int)
source

MarkDuplicate links a pending report to an earlier accepted report in the same book.

func Reject

crossing Action
1func Reject(cur realm, erratumID int, note string)
source

Reject closes a pending submission without finder credit.

func Render

1func Render(path string) string
source

Render is the public Markdown entry point for gnoweb.

func SetBookOpen

crossing Action
1func SetBookOpen(cur realm, bookID int, open bool)
source

SetBookOpen controls new submissions. Existing submissions remain reviewable.

func Submit

crossing Action
1func Submit(cur realm, bookID int, location, text string) int
source

Submit records a report. Increasing IDs break ties within a block.

func Withdraw

crossing Action
1func Withdraw(cur realm, bookID int, amount int64)
source

Withdraw returns unused escrow to the book owner.

func ListErrata

Action
1func ListErrata(bookID int, status string, offset, limit int) []Erratum
source

ListErrata returns reports in submission order. An empty status selects all reports.

Types 2

type Book

struct
 1type Book struct {
 2	ID               int
 3	Owner            address
 4	Title            string
 5	Edition          string
 6	Link             string
 7	RewardPerErratum int64
 8	Escrow           int64
 9	Open             bool
10	CreatedAt        int64
11}
source

type Erratum

struct
 1type Erratum struct {
 2	ID          int
 3	BookID      int
 4	Finder      address
 5	Location    string
 6	Text        string
 7	Status      string
 8	DuplicateOf int
 9	SubmittedAt int64
10	ReviewedAt  int64
11	Paid        int64
12	Note        string
13}
source

Dependencies

Source Files 7