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.

gnosage state

Back to all declarations

maxPathLength

untyped bigint

Limits keep review payloads small: storage on Gno.land costs a refundable deposit, and a review board must stay cheap to write.

Value

(256 <untyped> bigint)

maxVerdictLength

untyped bigint

Limits keep review payloads small: storage on Gno.land costs a refundable deposit, and a review board must stay cheap to write.

Value

(1000 <untyped> bigint)

maxChecksLength

untyped bigint

Limits keep review payloads small: storage on Gno.land costs a refundable deposit, and a review board must stay cheap to write.

Value

(2000 <untyped> bigint)

ReviewPostedEvent

untyped string

Value

"ReviewPosted"

ReviewerRegisteredEvent

untyped string

Value

"ReviewerRegistered"

ReviewerRemovedEvent

untyped string

Value

"ReviewerRemoved"

ErrScoreOutOfRange

*errors.errorString
Open
OID
0ce804…e3fe:13
ErrScoreOutOfRange details

Inspect pointer

ErrVerdictTooLong

*errors.errorString
Open
OID
0ce804…e3fe:19
ErrVerdictTooLong details

Inspect pointer

ErrChecksTooLong

*errors.errorString
Open
OID
0ce804…e3fe:22
ErrChecksTooLong details

Inspect pointer

ErrReviewNotFound

*errors.errorString
Open
OID
0ce804…e3fe:28
ErrReviewNotFound details

Inspect pointer

Review

type

Review is one scored verdict for one realm path at one version.

Value

gnosage.Review

reviewCount

uint64

Value

3

reviewKey

func(pkgPath string, version uint64) string

reviewKey builds the storage key for one version of one path. The zero-padded version keeps lexicographic order equal to version order, so range scans over a path return reviews oldest-first.

Open
OID
0ce804…e3fe:38
reviewKey details

Inspect func

assertOwner

func()

assertOwner panics unless the caller is the realm owner.

Open
OID
0ce804…e3fe:39
assertOwner details

Inspect func

RegisterReviewer

func(reviewer .uverse.address)

RegisterReviewer marks an address as a trusted agent reviewer. Only the owner can register reviewers. Reviews from registered reviewers are the board's headline verdicts.

Open
OID
0ce804…e3fe:40
RegisterReviewer details

Inspect func

UnregisterReviewer

func(reviewer .uverse.address)

UnregisterReviewer removes a registered agent reviewer. Only the owner.

Open
OID
0ce804…e3fe:41
UnregisterReviewer details

Inspect func

IsReviewer

func(reviewer .uverse.address) bool

IsReviewer reports whether an address is a registered agent reviewer.

Open
OID
0ce804…e3fe:42
IsReviewer details

Inspect func

PostReview

func(pkgPath string, score int, docs int, tests int, safety int, quality int, verdict string, checks string) (uint64, .uverse.error)

PostReview records a scored verdict for a realm path. Any caller may post; the review is marked as an agent review only when the caller is a registered agent reviewer. Returns the new version for the path.

Open
OID
0ce804…e3fe:43
PostReview details

Inspect func

validateReview

func(pkgPath string, score int, docs int, tests int, safety int, quality int, verdict string, checks string) .uverse.error

validateReview checks every field of a review before it is stored.

Open
OID
0ce804…e3fe:44
validateReview details

Inspect func

GetReview

func(pkgPath string, version uint64) *gnosage.Review

GetReview returns one review by path and version, or nil.

Open
OID
0ce804…e3fe:45
GetReview details

Inspect func

LatestAgentReview

func(pkgPath string) *gnosage.Review

LatestAgentReview returns the newest agent review for a path, or nil when no agent has reviewed it yet.

Open
OID
0ce804…e3fe:46
LatestAgentReview details

Inspect func

VersionCount

func(pkgPath string) int

VersionCount returns how many reviews a path has received.

Open
OID
0ce804…e3fe:47
VersionCount details

Inspect func

ReviewCount

func() uint64

ReviewCount returns the total number of reviews on the board.

Open
OID
0ce804…e3fe:48
ReviewCount details

Inspect func

ReviewedPaths

func() []string

ReviewedPaths returns every path that has at least one review, in lexicographic order.

Open
OID
0ce804…e3fe:49
ReviewedPaths details

Inspect func

Render

func(path string) string

Render serves the review board through gnoweb. - Render("") lists every reviewed realm with its latest agent score. - Render("\<pkgPath>") shows the review history of one realm, e.g. Render("gno.land/r/\<addr>/foo"). Caller-controlled text (verdicts) is flattened before rendering so a review can never break the board's markdown layout or smuggle links.

Open
OID
0ce804…e3fe:50
Render details

Inspect func

renderIndex

func() string

renderIndex lists reviewed realms with their latest agent verdict.

Open
OID
0ce804…e3fe:52
renderIndex details

Inspect func

renderDetail

func(pkgPath string) string

renderDetail shows every review of one realm, newest first.

Open
OID
0ce804…e3fe:53
renderDetail details

Inspect func

flatten

func(s string) string

flatten removes markdown-breaking characters from caller text.

Open
OID
0ce804…e3fe:54
flatten details

Inspect func
maxPathLength : untyped bigint =(256 <untyped> bigint)
maxVerdictLength : untyped bigint =(1000 <untyped> bigint)
maxChecksLength : untyped bigint =(2000 <untyped> bigint)
ReviewPostedEvent : untyped string ="ReviewPosted"
ReviewerRegisteredEvent : untyped string ="ReviewerRegistered"
ReviewerRemovedEvent : untyped string ="ReviewerRemoved"
ErrEmptyPath : *errors.errorString Inspect
ErrPathTooLong : *errors.errorString Inspect
ErrBadPath : *errors.errorString Inspect
ErrScoreOutOfRange : *errors.errorString Inspect
ErrEmptyVerdict : *errors.errorString Inspect
ErrVerdictTooLong : *errors.errorString Inspect
ErrChecksTooLong : *errors.errorString Inspect
ErrNotOwner : *errors.errorString Inspect
ErrReviewNotFound : *errors.errorString Inspect
Review : type =gnosage.Review
Ownable : *v0.Ownable Inspect
reviews : *v0.Tree Inspect
versions : *v0.Tree Inspect
latestAgent : *v0.Tree Inspect
reviewers : *v0.Tree Inspect
reviewCount : uint64 =3
init.22 : func() Inspect
reviewKey : func(pkgPath string, version uint64) string Inspect
assertOwner : func() Inspect
RegisterReviewer : func(reviewer .uverse.address) Inspect
UnregisterReviewer : func(reviewer .uverse.address) Inspect
IsReviewer : func(reviewer .uverse.address) bool Inspect
PostReview : func(pkgPath string, score int, docs int, tests int, safety int, quality int, verdict string, checks string) (uint64, .uverse.error) Inspect
validateReview : func(pkgPath string, score int, docs int, tests int, safety int, quality int, verdict string, checks string) .uverse.error Inspect
GetReview : func(pkgPath string, version uint64) *gnosage.Review Inspect
LatestAgentReview : func(pkgPath string) *gnosage.Review Inspect
VersionCount : func(pkgPath string) int Inspect
ReviewCount : func() uint64 Inspect
ReviewedPaths : func() []string Inspect
Render : func(path string) string Inspect
renderIndex : func() string Inspect
renderDetail : func(pkgPath string) string Inspect
flatten : func(s string) string Inspect