Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

memba_feedback_v2 state

Back to all declarations

MaxPostLen

untyped bigint

Value

(5000 <untyped> bigint)

MaxTitleLen

untyped bigint

Value

(200 <untyped> bigint)

MaxChannels

untyped bigint

Value

(20 <untyped> bigint)

MaxThreadsPerChan

untyped bigint

Value

(500 <untyped> bigint)

FlagThreshold

untyped bigint

// flags before auto-hide

Value

(3 <untyped> bigint)

MaxRepliesPerThread

untyped bigint

// live (non-deleted) replies per thread

Value

(500 <untyped> bigint)

ReplyPageSize

untyped bigint

// replies rendered per page

Value

(50 <untyped> bigint)

ChannelType

type

Value

memba_feedback_v2.ChannelType

ChannelText

memba_feedback_v2.ChannelType

Value

<gnolang.StringValue>

ChannelAnnouncements

memba_feedback_v2.ChannelType

Value

<gnolang.StringValue>

ChannelReadonly

memba_feedback_v2.ChannelType

Value

<gnolang.StringValue>

Channel

type

Value

memba_feedback_v2.Channel

Thread

type

Value

memba_feedback_v2.Thread

Reply

type

Value

memba_feedback_v2.Reply

threads

*avl.Tree

// "channel/id" -> \*Thread

Open
OID
0bba5f…b6cd:116
threads details

Inspect pointer

replies

*avl.Tree

// "channel/threadId/replyId" -> \*Reply

Open
OID
0bba5f…b6cd:118
replies details

Inspect pointer

threadCount

*avl.Tree

// channel -> uint64 (next thread ID, monotonic)

Open
OID
0bba5f…b6cd:120
threadCount details

Inspect pointer

threadLive

*avl.Tree

// channel -> uint64 (currently live (non-deleted) threads)

Open
OID
0bba5f…b6cd:136
threadLive details

Inspect pointer

threadLiveIDs

*avl.Tree

// channel -> \[]uint64 (live thread IDs, ascending) — bounds renderChannel

Open
OID
0bba5f…b6cd:152
threadLiveIDs details

Inspect pointer

replyCount

*avl.Tree

// "channel/threadId" -> uint64 (next reply ID, monotonic)

Open
OID
0bba5f…b6cd:154
replyCount details

Inspect pointer

replyLive

*avl.Tree

// "channel/threadId" -> uint64 (currently live (non-deleted) replies)

Open
OID
0bba5f…b6cd:156
replyLive details

Inspect pointer

replyLiveIDs

*avl.Tree

// "channel/threadId" -> \[]uint64 (live reply IDs, ascending) — bounds renderThread

Open
OID
0bba5f…b6cd:158
replyLiveIDs details

Inspect pointer

threadTomb

*avl.Tree

// channel -> \[]uint64 (soft-deleted thread IDs awaiting hard-GC via SweepTombstones) — B2

Open
OID
0bba5f…b6cd:160
threadTomb details

Inspect pointer

flags

*avl.Tree

// "channel/threadId" -> \*avl.Tree (flagger addr -> bool)

Open
OID
0bba5f…b6cd:162
flags details

Inspect pointer

membershipRevision

uint64

Value

0

paused

bool

Value

false

owner

.uverse.address

Value

<gnolang.StringValue>

pendingOwner

.uverse.address

Value

<zero>

addChannel

func(name string, description string, ctype memba_feedback_v2.ChannelType, readRoles []string, writeRoles []string)
Open
OID
0bba5f…b6cd:22
addChannel details

Inspect func

AddMember

func(addr .uverse.address, roles string)

AddMember adds an address with specified roles. Only the owner can call this. roles is a comma-separated list (e.g., "admin,dev" or "member").

Open
OID
0bba5f…b6cd:23
AddMember details

Inspect func

RemoveMember

func(addr .uverse.address)

RemoveMember removes an address from the membership. Only the owner can call this.

Open
OID
0bba5f…b6cd:24
RemoveMember details

Inspect func

UpdateMemberRoles

func(addr .uverse.address, newRoles string)

UpdateMemberRoles updates the roles for an existing member. Only the owner can call this.

Open
OID
0bba5f…b6cd:25
UpdateMemberRoles details

Inspect func

TransferOwnership

func(newOwner .uverse.address)

TransferOwnership stages a successor owner. Nothing moves until that address calls AcceptOwnership with its own transaction, so ownership can never land on an address that cannot act. A later call replaces the staged address; CancelOwnershipTransfer withdraws it.

Open
OID
0bba5f…b6cd:26
TransferOwnership details

Inspect func

CancelOwnershipTransfer

func()

CancelOwnershipTransfer withdraws a staged handoff. Owner only.

Open
OID
0bba5f…b6cd:27
CancelOwnershipTransfer details

Inspect func

AcceptOwnership

func()

AcceptOwnership completes the handoff. Only the staged pendingOwner may call it. The new owner gets "admin" added to their existing roles (not overwritten); the old owner is demoted from "admin" to their other roles, or to "member" when none remain.

Open
OID
0bba5f…b6cd:28
AcceptOwnership details

Inspect func

GetPendingOwner

func() .uverse.address
Open
OID
0bba5f…b6cd:29
GetPendingOwner details

Inspect func

SyncMembers

func(addresses string, rolesList string)

SyncMembers allows the owner to batch-sync membership from the DAO. addresses and rolesList are comma-separated, with roles pipe-delimited per address. Example: SyncMembers("g1a,g1b", "admin,dev|member")

Open
OID
0bba5f…b6cd:30
SyncMembers details

Inspect func

PurgeNonMembers

func(keepAddresses string)

PurgeNonMembers removes all members not in the provided comma-separated list. The owner is never purged.

Open
OID
0bba5f…b6cd:31
PurgeNonMembers details

Inspect func

IsMember

func(addr .uverse.address) bool

IsMember returns whether an address is a member.

Open
OID
0bba5f…b6cd:32
IsMember details

Inspect func

GetMemberRoles

func(addr .uverse.address) string

GetMemberRoles returns the roles for a member (comma-separated) or empty string.

Open
OID
0bba5f…b6cd:33
GetMemberRoles details

Inspect func

GetMembershipRevision

func() uint64
Open
OID
0bba5f…b6cd:35
GetMembershipRevision details

Inspect func

GetChannelState

func(name string) (int, bool, string, string, string, string)

Value-only readback lets a fixed DAO action verify exact channel creation.

Open
OID
0bba5f…b6cd:41
GetChannelState details

Inspect func

CreateChannel

func(name string, description string, ctype string)

CreateChannel adds a new channel. Only the owner (admin) can create channels.

Open
OID
0bba5f…b6cd:42
CreateChannel details

Inspect func

PostThread

func(channel string, title string, body string) uint64

PostThread creates a new thread in a channel. Caller must be a member with a role listed in the channel's WriteRoles.

Open
OID
0bba5f…b6cd:43
PostThread details

Inspect func

PostReply

func(channel string, threadID uint64, body string)

PostReply adds a reply to a thread. Caller must be a member with a role listed in the channel's WriteRoles.

Open
OID
0bba5f…b6cd:44
PostReply details

Inspect func

dropReply

func(threadKey string, replyKey string, replyID uint64)

dropReply hard-removes a reply: deletes the node (storage reclaimed — B2), drops it from the live index, and decrements the live count. Shared by DeleteReply and RemoveReply. renderThread only walks the live index, so a removed reply is never looked up — no tombstone is needed.

Open
OID
0bba5f…b6cd:45
dropReply details

Inspect func

DeleteReply

func(channel string, threadID uint64, replyID uint64)

DeleteReply lets the reply's author delete it. Caller must be a member and the original author. The reply node is hard-removed (B2 state-shrink) and a slot is freed under MaxRepliesPerThread (B1).

Open
OID
0bba5f…b6cd:46
DeleteReply details

Inspect func

RemoveReply

func(channel string, threadID uint64, replyID uint64)

RemoveReply permanently removes a reply (moderation — admin role only). Hard- removes the node like DeleteReply, bounding renderThread (B1) + reclaiming storage (B2).

Open
OID
0bba5f…b6cd:47
RemoveReply details

Inspect func

EditThread

func(channel string, threadID uint64, newBody string)

EditThread allows the original author to edit their thread. Caller must be a member.

Open
OID
0bba5f…b6cd:48
EditThread details

Inspect func

DeleteThread

func(channel string, threadID uint64)

DeleteThread soft-deletes a thread (marks as deleted). Caller must be a member and the original author.

Open
OID
0bba5f…b6cd:49
DeleteThread details

Inspect func

FlagThread

func(channel string, threadID uint64)

FlagThread flags a thread for moderation review. After FlagThreshold flags, the thread is auto-hidden. Caller must be a member (any role) to flag content.

Open
OID
0bba5f…b6cd:50
FlagThread details

Inspect func

UnhideThread

func(channel string, threadID uint64)

UnhideThread allows the owner or an admin to clear flags and un-hide a thread.

Open
OID
0bba5f…b6cd:51
UnhideThread details

Inspect func

RemoveThread

func(channel string, threadID uint64)

RemoveThread permanently removes a thread (moderation action — admin role only).

Open
OID
0bba5f…b6cd:52
RemoveThread details

Inspect func

SweepTombstones

func(channel string, limit int) int

SweepTombstones hard-removes up to \`limit\` soft-deleted threads in a channel (and all of their remaining reply state), reclaiming AVL storage so that post+delete spam can no longer accrete permanent state (B2). Permissionless GC by design: anyone may call it. Released storage deposits go to the calling tx per the chain's deposit policy (an explicit caller bounty); on restricted-denom chains (e.g. test12/test13 \`restricted\_denoms=\["ugnot"]\`) they route to the StorageFeeCollector instead — so this is a state-shrink/ hygiene primitive, not a user-refund path (see plan B2 / Q11). Bounded + idempotent: each soft-deleted thread holds at most MaxRepliesPerThread reply nodes, so keep \`limit\` small (1–5) to stay well within block gas; re-running drains the next batch and stops at 0. Returns the number of threads swept.

Open
OID
0bba5f…b6cd:53
SweepTombstones details

Inspect func

GetTombstoneCount

func(channel string) int

GetTombstoneCount returns how many soft-deleted threads in a channel are still awaiting hard-GC (read-only; lets ops/indexers decide when to call SweepTombstones).

Open
OID
0bba5f…b6cd:54
GetTombstoneCount details

Inspect func

renderHome

func() string

renderHome produces the board home page. Format: parser.ts parseBoardHome() expects: - \[#name](:\_channel/name) 📢 (N threads)

Open
OID
0bba5f…b6cd:56
renderHome details

Inspect func

renderChannel

func(channelName string) string

renderChannel produces a channel's thread list. Format: parser.ts parseThreadList() expects: ### [Title](:channel/id) by g1addr... | N replies | block H

Open
OID
0bba5f…b6cd:57
renderChannel details

Inspect func

renderThread

func(channelName string, threadID uint64, page uint64) string

renderThread produces a single thread with replies. Format: parser.ts parseThreadDetail() expects: # Title body --- *Posted by g1addr at block H* *(edited at block M)* ## Replies **g1addr...** (block H) *(edited)* reply body ---

Open
OID
0bba5f…b6cd:58
renderThread details

Inspect func

parsePageQuery

func(q string) uint64

parsePageQuery extracts the page number from a "?page=N" query string (also tolerates extra &-separated params). Returns 0 (= default/newest) on absence or parse error.

Open
OID
0bba5f…b6cd:59
parsePageQuery details

Inspect func

pageClamp

func(p uint64, totalPages uint64) uint64

pageClamp keeps a page link within \[1, totalPages].

Open
OID
0bba5f…b6cd:60
pageClamp details

Inspect func

renderACL

func(channelName string) string

renderACL produces the ACL response for a channel. Format: parser.ts parseACL() expects: read:role1,role2 write:role1,role2,role3 type:text

Open
OID
0bba5f…b6cd:61
renderACL details

Inspect func

getChannel

func(name string) *memba_feedback_v2.Channel
Open
OID
0bba5f…b6cd:62
getChannel details

Inspect func

getThreadCount

func(channel string) uint64
Open
OID
0bba5f…b6cd:63
getThreadCount details

Inspect func

getLiveThreadCount

func(channel string) uint64

getLiveThreadCount returns the number of non-deleted threads in a channel. Unlike getThreadCount (monotonic ID counter), this decreases when threads are deleted, so deleted threads free up slots under MaxThreadsPerChan.

Open
OID
0bba5f…b6cd:64
getLiveThreadCount details

Inspect func

getLiveThreadIDs

func(channel string) []uint64
Open
OID
0bba5f…b6cd:65
getLiveThreadIDs details

Inspect func

addLiveThreadID

func(channel string, id uint64)
Open
OID
0bba5f…b6cd:66
addLiveThreadID details

Inspect func

removeLiveThreadID

func(channel string, id uint64)
Open
OID
0bba5f…b6cd:67
removeLiveThreadID details

Inspect func

getLiveReplyCount

func(threadKey string) uint64
Open
OID
0bba5f…b6cd:68
getLiveReplyCount details

Inspect func

getLiveReplyIDs

func(threadKey string) []uint64
Open
OID
0bba5f…b6cd:69
getLiveReplyIDs details

Inspect func

addLiveReplyID

func(threadKey string, id uint64)
Open
OID
0bba5f…b6cd:70
addLiveReplyID details

Inspect func

removeLiveReplyID

func(threadKey string, id uint64)
Open
OID
0bba5f…b6cd:71
removeLiveReplyID details

Inspect func

getThreadTomb

func(channel string) []uint64
Open
OID
0bba5f…b6cd:72
getThreadTomb details

Inspect func

enqueueThreadTomb

func(channel string, id uint64)
Open
OID
0bba5f…b6cd:73
enqueueThreadTomb details

Inspect func

getReplyCount

func(threadKey string) uint64
Open
OID
0bba5f…b6cd:74
getReplyCount details

Inspect func

truncAddr

func(addr .uverse.address) string
Open
OID
0bba5f…b6cd:75
truncAddr details

Inspect func

isValidRoles

func(s string) bool

isValidRoles validates a comma-separated role list contains only safe characters. Allowed: a-z, A-Z, 0-9, hyphen, comma. No spaces, no markdown chars, no null bytes.

Open
OID
0bba5f…b6cd:76
isValidRoles details

Inspect func

sanitizeForRender

func(s string) string

sanitizeForRender strips markdown-sensitive characters to prevent injection.

Open
OID
0bba5f…b6cd:77
sanitizeForRender details

Inspect func

assertCallerIsOwner

func()
Open
OID
0bba5f…b6cd:78
assertCallerIsOwner details

Inspect func

assertCallerIsMember

func(caller .uverse.address)
Open
OID
0bba5f…b6cd:79
assertCallerIsMember details

Inspect func

assertCallerHasWriteAccess

func(caller .uverse.address, ch *memba_feedback_v2.Channel)

assertCallerHasWriteAccess checks that the caller is a member AND has at least one role that matches the channel's WriteRoles.

Open
OID
0bba5f…b6cd:80
assertCallerHasWriteAccess details

Inspect func

hasRole

func(caller .uverse.address, role string) bool
Open
OID
0bba5f…b6cd:81
hasRole details

Inspect func

assertCallerIsAdminRole

func()

assertCallerIsAdminRole checks that the caller is a member with the "admin" role. Used for moderation actions (RemoveThread, UnhideThread) so any admin can moderate, not just the single owner.

Open
OID
0bba5f…b6cd:82
assertCallerIsAdminRole details

Inspect func

isValidChannelName

func(name string) bool

isValidChannelName validates that a channel name contains only lowercase alphanumeric characters and hyphens, and does not start with underscore.

Open
OID
0bba5f…b6cd:83
isValidChannelName details

Inspect func
MaxPostLen : untyped bigint =(5000 <untyped> bigint)
MaxTitleLen : untyped bigint =(200 <untyped> bigint)
MaxChannels : untyped bigint =(20 <untyped> bigint)
MaxThreadsPerChan : untyped bigint =(500 <untyped> bigint)
FlagThreshold : untyped bigint =(3 <untyped> bigint)
MaxRepliesPerThread : untyped bigint =(500 <untyped> bigint)
ReplyPageSize : untyped bigint =(50 <untyped> bigint)
ChannelType : type =memba_feedback_v2.ChannelType
ChannelText : memba_feedback_v2.ChannelType =<gnolang.StringValue>
ChannelAnnouncements : memba_feedback_v2.ChannelType =<gnolang.StringValue>
ChannelReadonly : memba_feedback_v2.ChannelType =<gnolang.StringValue>
Channel : type =memba_feedback_v2.Channel
Thread : type =memba_feedback_v2.Thread
Reply : type =memba_feedback_v2.Reply
channels : *avl.Tree Inspect
threads : *avl.Tree Inspect
replies : *avl.Tree Inspect
threadCount : *avl.Tree Inspect
threadLive : *avl.Tree Inspect
threadLiveIDs : *avl.Tree Inspect
replyCount : *avl.Tree Inspect
replyLive : *avl.Tree Inspect
replyLiveIDs : *avl.Tree Inspect
threadTomb : *avl.Tree Inspect
flags : *avl.Tree Inspect
channelOrder : []string (len=4) Inspect
members : *avl.Tree Inspect
membershipRevision : uint64 =0
paused : bool =false
owner : .uverse.address =<gnolang.StringValue>
pendingOwner : .uverse.address =<zero>
init.31 : func() Inspect
addChannel : func(name string, description string, ctype memba_feedback_v2.ChannelType, readRoles []string, writeRoles []string) Inspect
AddMember : func(addr .uverse.address, roles string) Inspect
RemoveMember : func(addr .uverse.address) Inspect
UpdateMemberRoles : func(addr .uverse.address, newRoles string) Inspect
TransferOwnership : func(newOwner .uverse.address) Inspect
CancelOwnershipTransfer : func() Inspect
AcceptOwnership : func() Inspect
GetPendingOwner : func() .uverse.address Inspect
SyncMembers : func(addresses string, rolesList string) Inspect
PurgeNonMembers : func(keepAddresses string) Inspect
IsMember : func(addr .uverse.address) bool Inspect
GetMemberRoles : func(addr .uverse.address) string Inspect
GetMemberCount : func() int Inspect
GetMembershipRevision : func() uint64 Inspect
GetOwner : func() .uverse.address Inspect
assertNotPaused : func() Inspect
PauseRealm : func() Inspect
UnpauseRealm : func() Inspect
IsPaused : func() bool Inspect
GetChannelState : func(name string) (int, bool, string, string, string, string) Inspect
CreateChannel : func(name string, description string, ctype string) Inspect
PostThread : func(channel string, title string, body string) uint64 Inspect
PostReply : func(channel string, threadID uint64, body string) Inspect
dropReply : func(threadKey string, replyKey string, replyID uint64) Inspect
DeleteReply : func(channel string, threadID uint64, replyID uint64) Inspect
RemoveReply : func(channel string, threadID uint64, replyID uint64) Inspect
EditThread : func(channel string, threadID uint64, newBody string) Inspect
DeleteThread : func(channel string, threadID uint64) Inspect
FlagThread : func(channel string, threadID uint64) Inspect
UnhideThread : func(channel string, threadID uint64) Inspect
RemoveThread : func(channel string, threadID uint64) Inspect
SweepTombstones : func(channel string, limit int) int Inspect
GetTombstoneCount : func(channel string) int Inspect
Render : func(path string) string Inspect
renderHome : func() string Inspect
renderChannel : func(channelName string) string Inspect
renderThread : func(channelName string, threadID uint64, page uint64) string Inspect
parsePageQuery : func(q string) uint64 Inspect
pageClamp : func(p uint64, totalPages uint64) uint64 Inspect
renderACL : func(channelName string) string Inspect
getChannel : func(name string) *memba_feedback_v2.Channel Inspect
getThreadCount : func(channel string) uint64 Inspect
getLiveThreadCount : func(channel string) uint64 Inspect
getLiveThreadIDs : func(channel string) []uint64 Inspect
addLiveThreadID : func(channel string, id uint64) Inspect
removeLiveThreadID : func(channel string, id uint64) Inspect
getLiveReplyCount : func(threadKey string) uint64 Inspect
getLiveReplyIDs : func(threadKey string) []uint64 Inspect
addLiveReplyID : func(threadKey string, id uint64) Inspect
removeLiveReplyID : func(threadKey string, id uint64) Inspect
getThreadTomb : func(channel string) []uint64 Inspect
enqueueThreadTomb : func(channel string, id uint64) Inspect
getReplyCount : func(threadKey string) uint64 Inspect
truncAddr : func(addr .uverse.address) string Inspect
isValidRoles : func(s string) bool Inspect
sanitizeForRender : func(s string) string Inspect
assertCallerIsOwner : func() Inspect
assertCallerIsMember : func(caller .uverse.address) Inspect
assertCallerHasWriteAccess : func(caller .uverse.address, ch *memba_feedback_v2.Channel) Inspect
hasRole : func(caller .uverse.address, role string) bool Inspect
assertCallerIsAdminRole : func() Inspect
isValidChannelName : func(name string) bool Inspect