MaxBodyLen
untyped bigint// review body
Value
(2000 <untyped> bigint)
MaxCommentLen
untyped bigint// comment body
Value
(1000 <untyped> bigint)
MaxPageLimit
untyped bigint// hard cap on any paginated read (DoS guard)
Value
(100 <untyped> bigint)
ModeratorAddress
untyped string── Constants ────────────────────────────────────────────────
Value
"g1x7k4628w93a7wzdhqc06atzx0v50rnshweuxu0"
Review
type── Types ────────────────────────────────────────────────────
Value
memba_reviews_v1.Review
Comment
typeValue
memba_reviews_v1.Comment
reviews
*avl.Tree// strID(id) -> \*Review
- OID
- 074f6e…fc00:53
reviews details
comments
*avl.Tree// strID(id) -> \*Comment
- OID
- 074f6e…fc00:55
comments details
subjectIndex
*avl.Tree// subject -> \[]uint64 (review IDs, ascending) — bounds reads
- OID
- 074f6e…fc00:57
subjectIndex details
commentIndex
*avl.Tree// strID(reviewID) -> \[]uint64 (comment IDs, ascending)
- OID
- 074f6e…fc00:59
commentIndex details
authorSubject
*avl.Tree// subject + "\\x00" + author -> uint64 (reviewID) — one-per-pair
- OID
- 074f6e…fc00:61
authorSubject details
reactions
*avl.Tree// strID(targetID) + "/" + addr -> "like"|"dislike"
- OID
- 074f6e…fc00:63
reactions details
flags
*avl.Tree// strID(targetID) + "/" + addr -> true (one flag per acct/target)
- OID
- 074f6e…fc00:65
flags details
reputation
*avl.Tree// addr -> int64 (Σ likes−dislikes on their reviews+comments)
- OID
- 074f6e…fc00:67
reputation details
flaggedIDs
*avl.Tree// strID(targetID) -> true (visible targets with ≥1 flag, for the mod dashboard)
- OID
- 074f6e…fc00:69
flaggedIDs details
nextID
uint64── State ────────────────────────────────────────────────────
Value
1
init.16
func()- OID
- 074f6e…fc00:13
init.16 details
strID
func(id uint64) string── Helpers ──────────────────────────────────────────────────
- OID
- 074f6e…fc00:15
strID details
getReview
func(id uint64) (*memba_reviews_v1.Review, bool)- OID
- 074f6e…fc00:16
getReview details
getComment
func(id uint64) (*memba_reviews_v1.Comment, bool)- OID
- 074f6e…fc00:17
getComment details
assertModerator
func()- OID
- 074f6e…fc00:18
assertModerator details
getReputation
func(addr string) int64- OID
- 074f6e…fc00:19
getReputation details
addReputation
func(addr string, delta int64)- OID
- 074f6e…fc00:20
addReputation details
idList
func(t *avl.Tree, key string) []uint64- OID
- 074f6e…fc00:21
idList details
removeID
func(ids []uint64, target uint64) []uint64removeID returns ids with the first occurrence of target removed.
- OID
- 074f6e…fc00:22
removeID details
sanitizeForRender
func(s string) stringsanitizeForRender strips markdown/HTML-sensitive chars from user strings used inside Render() markdown (defense-in-depth; the frontend also DOMPurifies). "&" is escaped FIRST to prevent entity-injection (e.g. "<" → "&lt;").
- OID
- 074f6e…fc00:23
sanitizeForRender details
jsonEscape
func(s string) stringjsonEscape escapes a string for embedding in the realm's hand-built JSON.
- OID
- 074f6e…fc00:24
jsonEscape details
validRating
func(r int) bool- OID
- 074f6e…fc00:25
validRating details
validBody
func(b string) bool- OID
- 074f6e…fc00:26
validBody details
pairKey
func(subject string, a .uverse.address) stringpairKey returns the authorSubject tree key for a (subject, author) pair. The NUL separator prevents prefix collisions between subject and author.
- OID
- 074f6e…fc00:27
pairKey details
PostReview
func(subject string, rating int, body string)PostReview creates the caller's review for \`subject\`, or replaces it in place if one already exists (the "one editable review per pair" rule).
- OID
- 074f6e…fc00:28
PostReview details
EditReview
func(reviewID uint64, rating int, body string)EditReview updates rating + body of an existing non-deleted review. Only the original author may edit.
- OID
- 074f6e…fc00:29
EditReview details
DeleteReview
func(reviewID uint64)DeleteReview tombstones the caller's review: keeps the ID + reaction history, clears the body, and frees the (author, subject) pair for a fresh review. Only the original author may delete.
- OID
- 074f6e…fc00:30
DeleteReview details
validComment
func(b string) boolvalidComment returns true iff body is non-empty and within MaxCommentLen.
- OID
- 074f6e…fc00:31
validComment details
PostComment
func(reviewID uint64, body string)PostComment posts a flat reply to an existing, non-deleted, non-hidden review.
- OID
- 074f6e…fc00:32
PostComment details
EditComment
func(commentID uint64, body string)EditComment updates the body of an existing, non-deleted comment. Only the original author may edit.
- OID
- 074f6e…fc00:33
EditComment details
DeleteComment
func(commentID uint64)DeleteComment tombstones the caller's comment: clears the body. Only the original author may delete.
- OID
- 074f6e…fc00:34
DeleteComment details
boolToInt
func(b bool) int- OID
- 074f6e…fc00:35
boolToInt details
reactionDelta
func(old string, newKind string) (likesDelta int, dislikesDelta int, repDelta int)reactionDelta returns how a reaction change (old -> newKind, each "" | "like" | "dislike") moves the target's like count, dislike count, and the target author's reputation. repDelta = likesDelta - dislikesDelta.
- OID
- 074f6e…fc00:36
reactionDelta details
applyDelta
func(v uint64, delta int) uint64applyDelta adjusts an unsigned counter by ±1-style delta without underflow.
- OID
- 074f6e…fc00:37
applyDelta details
React
func(targetID uint64, kind string)React records or toggles a like/dislike on a review or comment. Re-reacting with the same kind toggles it off; switching kind replaces it. Updates the target's Likes/Dislikes counters and the author's reputation by Δ(likes−dislikes). Self-reactions are rejected. Deleted/hidden targets are rejected.
- OID
- 074f6e…fc00:38
React details
Flag
func(targetID uint64)Flag records one community flag per account per target (review or comment). Auto-hide is NOT performed here; takedowns are multisig-only (HideReview/HideComment). Deleted/hidden targets are rejected.
- OID
- 074f6e…fc00:39
Flag details
HideReview
func(id uint64)HideReview soft-deletes a review. Moderator (multisig) only.
- OID
- 074f6e…fc00:40
HideReview details
HideComment
func(id uint64)HideComment soft-deletes a comment. Moderator (multisig) only.
- OID
- 074f6e…fc00:41
HideComment details
Unhide
func(targetID uint64)Unhide reverses a hide (manual or auto-flag) on a review or comment. Moderator (multisig) only. Also removes the target from the mod dashboard index.
- OID
- 074f6e…fc00:42
Unhide details
clampLimit
func(limit int) intclampLimit ensures limit is in \[1, MaxPageLimit]. Zero or negative values and values above MaxPageLimit are all clamped to MaxPageLimit.
- OID
- 074f6e…fc00:43
clampLimit details
window
func(ids []uint64, offset int, limit int) []uint64window slices ids\[offset : offset+limit] safely (no panics on out-of-range).
- OID
- 074f6e…fc00:44
window details
reviewJSON
func(r *memba_reviews_v1.Review) string- OID
- 074f6e…fc00:45
reviewJSON details
commentJSON
func(c *memba_reviews_v1.Comment) string- OID
- 074f6e…fc00:46
commentJSON details
GetReviewsJSON
func(subject string, offset int, limit int) stringGetReviewsJSON returns a JSON array of a subject's non-hidden reviews (paginated). Deleted reviews are included as tombstones (empty body, deleted:true).
- OID
- 074f6e…fc00:47
GetReviewsJSON details
GetCommentsJSON
func(reviewID uint64, offset int, limit int) stringGetCommentsJSON returns a JSON array of a review's non-hidden comments (paginated).
- OID
- 074f6e…fc00:48
GetCommentsJSON details
GetSubjectSummaryJSON
func(subject string) stringGetSubjectSummaryJSON returns {"count":N,"average":A,"sum":S} over non-hidden, non-deleted reviews for a subject. Average is integer-rounded.
- OID
- 074f6e…fc00:49
GetSubjectSummaryJSON details
GetReputation
func(addr string) int64GetReputation returns the net likes−dislikes reputation for an address. Returns 0 for unknown addresses. Queried via vm/qeval (bare int64).
- OID
- 074f6e…fc00:50
GetReputation details
GetFlaggedJSON
func(offset int, limit int) stringGetFlaggedJSON returns a JSON array of flagged target IDs for the mod dashboard, paginated. IDs are returned as bare integers (not quoted strings). Uses early-stop iteration to avoid loading the entire tree.
- OID
- 074f6e…fc00:51
GetFlaggedJSON details
Render
func(path string) stringRender — human gnoweb view. "" → home (total count); "s/\<subject>" → subject review list; else 404.
- OID
- 074f6e…fc00:52