realmPkgPath
untyped stringValue
"gno.land/r/gnoland/boards2/v1"
gRealmPath
untyped stringValue
"/r/gnoland/boards2/v1"
RealmLink
txlink.RealmValue
<gnolang.StringValue>
RequiredAccountAmount
int64Value
3000000000
Notice
stringValue
""
Help
stringValue
""
gListedBoardsByID
v0.BPTree// string(id) -> \*boards.Board
- OID
- 0fb476…77f7:8
gListedBoardsByID details
gInviteRequests
v0.BPTree// string(board id) -> \*bptree.BPTree(address -> time.Time)
- OID
- 0fb476…77f7:10
gInviteRequests details
gBannedUsers
v0.BPTree// string(board id) -> \*bptree.BPTree(address -> time.Time)
- OID
- 0fb476…77f7:12
gBannedUsers details
gLocked
struct{...}TODO: Refactor globals in favor of a cleaner pattern
- OID
- 0fb476…77f7:14
gLocked details
gBoards
*boards.storage- OID
- 0fb476…77f7:16
gBoards details
gBoardsSequence
*boards.idGenerator- OID
- 0fb476…77f7:23
gBoardsSequence details
gPerms
*permissions.Permissions// GovDAO T1 multisig
- OID
- 0fb476…77f7:26
gPerms details
initRealmPermissions
func(owners [].uverse.address) boards.PermissionsinitRealmPermissions returns the default realm permissions.
- OID
- 0fb476…77f7:125
initRealmPermissions details
getInviteRequests
func(boardID boards.ID) (*v0.BPTree, found bool)getInviteRequests returns invite requests for a board.
- OID
- 0fb476…77f7:127
getInviteRequests details
getBannedUsers
func(boardID boards.ID) (*v0.BPTree, found bool)getBannedUsers returns banned users within a board.
- OID
- 0fb476…77f7:128
getBannedUsers details
mustGetBoardByName
func(name string) *boards.BoardmustGetBoardByName returns a board or panics when it's not found.
- OID
- 0fb476…77f7:129
mustGetBoardByName details
mustGetBoard
func(id boards.ID) *boards.BoardmustGetBoard returns a board or panics when it's not found.
- OID
- 0fb476…77f7:130
mustGetBoard details
getThread
func(board *boards.Board, threadID boards.ID) (*boards.Post, bool)getThread returns a board thread.
- OID
- 0fb476…77f7:131
getThread details
getReply
func(thread *boards.Post, replyID boards.ID) (*boards.Post, bool)getReply returns a thread comment or reply.
- OID
- 0fb476…77f7:132
getReply details
mustGetThread
func(board *boards.Board, threadID boards.ID) *boards.PostmustGetThread returns a thread or panics when it's not found.
- OID
- 0fb476…77f7:133
mustGetThread details
mustGetReply
func(thread *boards.Post, replyID boards.ID) *boards.PostmustGetReply returns a reply or panics when it's not found.
- OID
- 0fb476…77f7:134
mustGetReply details
mustGetPermissions
func(bid boards.ID) boards.Permissions- OID
- 0fb476…77f7:135
mustGetPermissions details
parseRealmPath
func(path string) *realmpath.Request- OID
- 0fb476…77f7:136
parseRealmPath details
DefaultFlaggingThreshold
untyped bigintDefaultFlaggingThreshold defines the default number of flags that hides flaggable items.
Value
(1 <untyped> bigint)
gFlaggingThresholds
v0.BPTree// string(board ID) -> int
- OID
- 0fb476…77f7:138
gFlaggingThresholds details
flagItem
func(post *boards.Post, user .uverse.address, reason string, threshold int) boolflagItem adds a flag to a post. Returns whether flag count threshold is reached and post can be hidden. Panics if flag count threshold was already reached.
- OID
- 0fb476…77f7:139
flagItem details
getFlaggingThreshold
func(bid boards.ID) int- OID
- 0fb476…77f7:141
getFlaggingThreshold details
dateFormat
untyped stringValue
"2006-01-02 3:04pm MST"
padLeft
func(s string, length int) string- OID
- 0fb476…77f7:142
padLeft details
padZero
func(u64 uint64, length int) string- OID
- 0fb476…77f7:144
padZero details
indentBody
func(indent string, body string) string- OID
- 0fb476…77f7:145
indentBody details
indentForeignBody
func(indent string, body string, budget *int) stringindentForeignBody is the single "render a user body" operation: it sandboxes the body in a \<gno-foreign> block, indents it like indentBody, AND charges one unit against the per-render budget — so wrapping and budget-accounting can't drift apart (the \*int signals the mutation). The body renders inside the sandbox: its block structure (headings, blockquotes, lists, columns, alerts) is contained and cannot hijack realm chrome, so boards no longer needs the write-time markdown blacklist. The opener survives the "> " comment indentation at any depth (goldmark strips the "> " prefix before the block parser runs).
- OID
- 0fb476…77f7:146
indentForeignBody details
summaryOf
func(text string, length int) string- OID
- 0fb476…77f7:147
summaryOf details
userLink
func(addr .uverse.address) string- OID
- 0fb476…77f7:148
userLink details
getRoleBadge
func(post *boards.Post) string- OID
- 0fb476…77f7:149
getRoleBadge details
BoardMeta
typeBoardMeta defines a type for board metadata.
Value
v1.BoardMeta
ThreadMeta
typeThreadMeta defines a type for thread metadata.
Value
v1.ThreadMeta
RoleOwner
boards.RoleList of Boards2 member roles.
Value
<gnolang.StringValue>
RoleAdmin
untyped stringList of Boards2 member roles.
Value
"admin"
RoleModerator
untyped stringList of Boards2 member roles.
Value
"moderator"
RoleGuest
untyped stringList of Boards2 member roles.
Value
"guest"
PermissionCustom
boards.PermissionPermissionCustom defines an initial value for custom board permissions. When a board defines custom permissions it must starts from a value greater or equal than PermissionCustom. Custom permissions definition example: const ( PermissionCustom1 boards.Permission = iota + boards2.PermissionCustom PermissionCustom2 PermissionCustom3 )
Value
<zero>
PermissionBoardCreate
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionBoardFlaggingUpdate
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionBoardFreeze
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionBoardRename
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionMemberInvite
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionMemberInviteRevoke
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionMemberRemove
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionPermissionsUpdate
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionRealmHelpChange
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionRealmLock
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionRealmNotice
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionAccountRequiredAmountChange
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionReplyCreate
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionReplyDelete
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionReplyFlag
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionRoleChange
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionThreadCreate
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionThreadDelete
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionThreadEdit
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionThreadFlag
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionThreadFreeze
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionThreadRepost
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionUserBan
boards.PermissionList of Boards2 permissions.
Value
<zero>
PermissionUserUnban
boards.PermissionList of Boards2 permissions.
Value
<zero>
createBasicBoardPermissions
func(owner .uverse.address) *permissions.Permissions- OID
- 0fb476…77f7:150
createBasicBoardPermissions details
createOpenBoardPermissions
func(owner .uverse.address) *permissions.Permissions- OID
- 0fb476…77f7:152
createOpenBoardPermissions details
validateBasicBoardCreate
func(perms boards.Permissions, args boards.Args) .uverse.errorvalidateBasicBoardCreate validates PermissionBoardCreate. Expected \`args\` values: 1. Caller address 2. Board name 3. Board ID 4. Is board listed 5. Is board open
- OID
- 0fb476…77f7:119
validateBasicBoardCreate details
validateBasicBoardRename
func(boards.Permissions, args boards.Args) .uverse.errorvalidateBasicBoardRename validates PermissionBoardRename. Expected \`args\` values: 1. Caller address 2. Board ID 3. Current board name 4. New board name
- OID
- 0fb476…77f7:153
validateBasicBoardRename details
validateBasicMemberInvite
func(perms boards.Permissions, args boards.Args) .uverse.errorvalidateBasicMemberInvite validates PermissionMemberInvite. Expected \`args\` values: 1. Caller address 2. Board ID 3. Invites
- OID
- 0fb476…77f7:124
validateBasicMemberInvite details
validateBasicRoleChange
func(perms boards.Permissions, args boards.Args) .uverse.errorvalidateBasicRoleChange validates PermissionRoleChange. Expected \`args\` values: 1. Caller address 2. Board ID 3. Member address 4. Role
- OID
- 0fb476…77f7:122
validateBasicRoleChange details
checkBoardNameIsNotAddress
func(s string) .uverse.error- OID
- 0fb476…77f7:154
checkBoardNameIsNotAddress details
checkBoardNameBelongsToAddress
func(owner .uverse.address, name string) .uverse.error- OID
- 0fb476…77f7:155
checkBoardNameBelongsToAddress details
validateOpenBoardRename
func(boards.Permissions, args boards.Args) .uverse.errorvalidateOpenBoardRename validates PermissionBoardRename. Expected \`args\` values: 1. Caller address 2. Board ID 3. Current board name 4. New board name
- OID
- 0fb476…77f7:156
validateOpenBoardRename details
validateOpenMemberInvite
func(perms boards.Permissions, args boards.Args) .uverse.errorvalidateOpenMemberInvite validates PermissionMemberInvite. Expected \`args\` values: 1. Caller address 2. Board ID 3. Invites
- OID
- 0fb476…77f7:158
validateOpenMemberInvite details
validateOpenRoleChange
func(perms boards.Permissions, args boards.Args) .uverse.errorvalidateOpenRoleChange validates PermissionRoleChange. Expected \`args\` values: 1. Caller address 2. Board ID 3. Member address 4. Role
- OID
- 0fb476…77f7:159
validateOpenRoleChange details
validateOpenThreadCreate
func(perms boards.Permissions, args boards.Args) .uverse.errorvalidateOpenThreadCreate validates PermissionThreadCreate. Expected \`args\` values: 1. Caller address 2. Board ID 3. Thread ID 4. Title 5. Body
- OID
- 0fb476…77f7:160
validateOpenThreadCreate details
validateOpenReplyCreate
func(perms boards.Permissions, args boards.Args) .uverse.errorvalidateOpenReplyCreate validates PermissionReplyCreate. Expected \`args\` values: 1. Caller address 2. Board ID 3. Thread ID 4. Parent ID 5. Reply ID 6. Body
- OID
- 0fb476…77f7:161
validateOpenReplyCreate details
checkAccountHasAmount
func(addr .uverse.address, amount int64) .uverse.error- OID
- 0fb476…77f7:162
checkAccountHasAmount details
boardsNS
untyped stringboardsNS is the package-path namespace shared by all Boards2 versions. Update as part of each version bump.
Value
"gno.land/r/gnoland/boards2/"
GetRealmPermissions
func() boards.PermissionsGetRealmPermissions returns Boards2 realm permissions. This is a protected function only callable by Boards2 sub realms.
- OID
- 0fb476…77f7:163
GetRealmPermissions details
GetBoard
func(boardID boards.ID) (*boards.Board, found bool)GetBoard returns a board. This is a protected function only callable by Boards2 sub realms.
- OID
- 0fb476…77f7:165
GetBoard details
MustGetBoard
func(boardID boards.ID) *boards.BoardMustGetBoard returns a board or panics on error. This is a protected function only callable by Boards2 sub realms.
- OID
- 0fb476…77f7:166
MustGetBoard details
Iterate
func(start int, count int, fn boards.BoardIterFn) boolIterate iterates boards. Iteration is done for all boards, including the ones that are not listed. To reverse iterate boards use a negative count. If the callback returns true, iteration is stopped.
- OID
- 0fb476…77f7:167
Iterate details
assertCallerHasBoardsNS
func(int, rlm .uverse.realm)assertCallerHasBoardsNS panics unless the caller realm's PkgPath lives within the Boards2 namespace. Callers pass their own live cur; the helper enforces rlm.IsCurrent() and derives the caller as rlm.Previous() internally. This mirrors the Transfer/AddMember pattern (see docs/resources/gno-security.md): receive the live cur, extract Previous() inside, never trust a stale-or-stashed realm value's PkgPath(). \_ int discriminator keeps this helper non-crossing.
- OID
- 0fb476…77f7:168
assertCallerHasBoardsNS details
MaxBoardNameLength
untyped bigintValue
(50 <untyped> bigint)
MaxThreadTitleLength
untyped bigintValue
(100 <untyped> bigint)
MaxThreadBodyLength
untyped bigintValue
(40000 <untyped> bigint)
MaxReplyLength
untyped bigintValue
(10000 <untyped> bigint)
reBoardName
*regexp.Regexp- OID
- 0fb476…77f7:170
reBoardName details
SetHelp
func(content string)SetHelp sets or updates boards realm help content.
- OID
- 0fb476…77f7:282
SetHelp details
SetRequiredAccountAmount
func(amount int64)SetRequiredAccountAmount sets the required account amount to interact as a non member with open boards. Amount must be given as ugnot. The amount requirement is not applied to members that were invited to an open board.
- OID
- 0fb476…77f7:284
SetRequiredAccountAmount details
SetPermissions
func(boardID boards.ID, p boards.Permissions)SetPermissions sets a permissions implementation for boards2 realm or a board.
- OID
- 0fb476…77f7:285
SetPermissions details
SetRealmNotice
func(message string)SetRealmNotice sets a notice to be displayed globally within the realm. An empty message removes the realm notice.
- OID
- 0fb476…77f7:286
SetRealmNotice details
GetBoardIDFromName
func(name string) (boards.ID, found bool)GetBoardIDFromName searches a board by name and returns its ID.
- OID
- 0fb476…77f7:287
GetBoardIDFromName details
BoardCount
func() intBoardCount returns the total number of boards.
- OID
- 0fb476…77f7:288
BoardCount details
CreateBoard
func(name string, listed bool, open bool) boards.IDCreateBoard creates a new board. Listed boards are included in the realm's list of boards. Open boards allow anyone to create threads and comment.
- OID
- 0fb476…77f7:289
CreateBoard details
RenameBoard
func(name string, newName string)RenameBoard changes the name of an existing board. A history of previous board names is kept when boards are renamed. Because of that boards are also accessible using previous name(s).
- OID
- 0fb476…77f7:290
RenameBoard details
CreateThread
func(boardID boards.ID, title string, body string) boards.IDCreateThread creates a new thread within a board.
- OID
- 0fb476…77f7:291
CreateThread details
CreateReply
func(boardID boards.ID, threadID boards.ID, replyID boards.ID, body string) boards.IDCreateReply creates a new comment or reply within a thread. The value of \`replyID\` is only required when creating a reply of another reply.
- OID
- 0fb476…77f7:292
CreateReply details
CreateRepost
func(boardID boards.ID, threadID boards.ID, destinationBoardID boards.ID, title string, body string) boards.IDCreateRepost reposts a thread into another board.
- OID
- 0fb476…77f7:293
CreateRepost details
DeleteThread
func(boardID boards.ID, threadID boards.ID)DeleteThread deletes a thread from a board. Threads can be deleted by the users who created them or otherwise by users with special permissions.
- OID
- 0fb476…77f7:294
DeleteThread details
DeleteReply
func(boardID boards.ID, threadID boards.ID, replyID boards.ID)DeleteReply deletes a reply from a thread. Replies can be deleted by the users who created them or otherwise by users with special permissions. Soft deletion is used when the deleted reply contains sub replies, in which case the reply content is replaced by a text informing that reply has been deleted to avoid deleting sub-replies.
- OID
- 0fb476…77f7:295
DeleteReply details
EditThread
func(boardID boards.ID, threadID boards.ID, title string, body string)EditThread updates the title and body of a thread. Threads can be updated by the users who created them or otherwise by users with special permissions.
- OID
- 0fb476…77f7:296
EditThread details
EditReply
func(boardID boards.ID, threadID boards.ID, replyID boards.ID, body string)EditReply updates the body of a comment or reply. Replies can be updated only by the users who created them.
- OID
- 0fb476…77f7:297
EditReply details
RemoveMember
func(boardID boards.ID, member .uverse.address)RemoveMember removes a member from the realm or a board. Board ID is only required when removing a member from board.
- OID
- 0fb476…77f7:298
RemoveMember details
IsMember
func(boardID boards.ID, user .uverse.address) boolIsMember checks if a user is a member of the realm or a board. Board ID is only required when checking if a user is a member of a board.
- OID
- 0fb476…77f7:299
IsMember details
HasMemberRole
func(boardID boards.ID, member .uverse.address, role boards.Role) boolHasMemberRole checks if a realm or board member has a specific role assigned. Board ID is only required when checking a member of a board.
- OID
- 0fb476…77f7:300
HasMemberRole details
ChangeMemberRole
func(boardID boards.ID, member .uverse.address, role boards.Role)ChangeMemberRole changes the role of a realm or board member. Board ID is only required when changing the role for a member of a board.
- OID
- 0fb476…77f7:301
ChangeMemberRole details
assertMemberAddressIsValid
func(member .uverse.address)- OID
- 0fb476…77f7:302
assertMemberAddressIsValid details
assertUserAddressIsValid
func(user .uverse.address)- OID
- 0fb476…77f7:303
assertUserAddressIsValid details
assertBoardExists
func(id boards.ID)- OID
- 0fb476…77f7:304
assertBoardExists details
assertBoardIsNotFrozen
func(b *boards.Board)- OID
- 0fb476…77f7:305
assertBoardIsNotFrozen details
assertIsValidBoardName
func(name string)- OID
- 0fb476…77f7:306
assertIsValidBoardName details
assertThreadIsNotFrozen
func(t *boards.Post)- OID
- 0fb476…77f7:307
assertThreadIsNotFrozen details
assertNameIsNotEmpty
func(name string)- OID
- 0fb476…77f7:308
assertNameIsNotEmpty details
assertTitleIsValid
func(title string)- OID
- 0fb476…77f7:309
assertTitleIsValid details
assertBodyIsNotEmpty
func(body string)- OID
- 0fb476…77f7:310
assertBodyIsNotEmpty details
assertBoardNameNotExists
func(name string)- OID
- 0fb476…77f7:311
assertBoardNameNotExists details
assertThreadExists
func(b *boards.Board, threadID boards.ID)- OID
- 0fb476…77f7:312
assertThreadExists details
assertReplyExists
func(thread *boards.Post, replyID boards.ID)- OID
- 0fb476…77f7:313
assertReplyExists details
assertThreadIsVisible
func(thread *boards.Post)- OID
- 0fb476…77f7:314
assertThreadIsVisible details
assertReplyIsVisible
func(thread *boards.Post)- OID
- 0fb476…77f7:315
assertReplyIsVisible details
assertThreadBodyIsValid
func(body string)- OID
- 0fb476…77f7:316
assertThreadBodyIsValid details
assertReplyBodyIsValid
func(body string)- OID
- 0fb476…77f7:317
assertReplyBodyIsValid details
assertMembersUpdateIsEnabled
func(boardID boards.ID)- OID
- 0fb476…77f7:318
assertMembersUpdateIsEnabled details
BanDay
uintConstants for different banning periods.
Value
24
BanWeek
uintConstants for different banning periods.
Value
168
BanYear
uintConstants for different banning periods.
Value
8760
Ban
func(boardID boards.ID, user .uverse.address, hours uint, reason string)Ban bans a user from a board for a period of time. Only invited guest members and external users can be banned. Banning board owners, admins and moderators is not allowed.
- OID
- 0fb476…77f7:319
Ban details
Unban
func(boardID boards.ID, user .uverse.address, reason string)Unban unbans a user from a board.
- OID
- 0fb476…77f7:321
Unban details
IsBanned
func(boardID boards.ID, user .uverse.address) boolIsBanned checks if a user is banned from a board.
- OID
- 0fb476…77f7:322
IsBanned details
assertAddressIsValid
func(addr .uverse.address)- OID
- 0fb476…77f7:323
assertAddressIsValid details
assertUserIsNotBanned
func(boardID boards.ID, user .uverse.address)- OID
- 0fb476…77f7:324
assertUserIsNotBanned details
SetFlaggingThreshold
func(boardID boards.ID, threshold int)SetFlaggingThreshold sets the number of flags required to hide a thread or comment. Threshold is only applicable within the board where it's setted.
- OID
- 0fb476…77f7:325
SetFlaggingThreshold details
GetFlaggingThreshold
func(boardID boards.ID) intGetFlaggingThreshold returns the number of flags required to hide a thread or comment within a board.
- OID
- 0fb476…77f7:327
GetFlaggingThreshold details
FlagThread
func(boardID boards.ID, threadID boards.ID, reason string)FlagThread adds a new flag to a thread. Flagging requires special permissions and hides the thread when the number of flags reaches a pre-defined flagging threshold.
- OID
- 0fb476…77f7:328
FlagThread details
FlagReply
func(boardID boards.ID, threadID boards.ID, replyID boards.ID, reason string)FlagReply adds a new flag to a comment or reply. Flagging requires special permissions and hides the comment or reply when the number of flags reaches a pre-defined flagging threshold.
- OID
- 0fb476…77f7:329
FlagReply details
FreezeBoard
func(boardID boards.ID)FreezeBoard freezes a board so no more threads and comments can be created or modified.
- OID
- 0fb476…77f7:330
FreezeBoard details
UnfreezeBoard
func(boardID boards.ID)UnfreezeBoard removes frozen status from a board.
- OID
- 0fb476…77f7:332
UnfreezeBoard details
IsBoardFrozen
func(boardID boards.ID) boolIsBoardFrozen checks if a board has been frozen.
- OID
- 0fb476…77f7:333
IsBoardFrozen details
FreezeThread
func(boardID boards.ID, threadID boards.ID)FreezeThread freezes a thread so thread cannot be replied, modified or deleted. Fails if board is frozen.
- OID
- 0fb476…77f7:334
FreezeThread details
UnfreezeThread
func(boardID boards.ID, threadID boards.ID)UnfreezeThread removes frozen status from a thread. Fails if board is frozen.
- OID
- 0fb476…77f7:335
UnfreezeThread details
IsThreadFrozen
func(boardID boards.ID, threadID boards.ID) boolIsThreadFrozen checks if a thread has been frozen. Returns true if board is frozen.
- OID
- 0fb476…77f7:336
IsThreadFrozen details
setBoardReadonly
func(int, rlm .uverse.realm, boardID boards.ID, readonly bool)- OID
- 0fb476…77f7:337
setBoardReadonly details
setThreadReadonly
func(int, rlm .uverse.realm, boardID boards.ID, threadID boards.ID, readonly bool)- OID
- 0fb476…77f7:338
setThreadReadonly details
Invite
typeInvite contains a user invitation.
Value
v1.Invite
InviteMember
func(boardID boards.ID, user .uverse.address, role boards.Role)InviteMember adds a member to the realm or to a board. A role can optionally be specified to be assigned to the new member.
- OID
- 0fb476…77f7:339
InviteMember details
InviteMembers
func(boardID boards.ID, invites []v1.Invite)InviteMembers adds one or more members to the realm or to a board. Board ID is only required when inviting a member to a specific board.
- OID
- 0fb476…77f7:341
InviteMembers details
RequestInvite
func(boardID boards.ID)RequestInvite request to be invited to a board.
- OID
- 0fb476…77f7:342
RequestInvite details
AcceptInvite
func(boardID boards.ID, user .uverse.address)AcceptInvite accepts a board invite request.
- OID
- 0fb476…77f7:343
AcceptInvite details
RevokeInvite
func(boardID boards.ID, user .uverse.address)RevokeInvite revokes a board invite request.
- OID
- 0fb476…77f7:344
RevokeInvite details
inviteMembers
func(int, rlm .uverse.realm, boardID boards.ID, invites []v1.Invite)- OID
- 0fb476…77f7:345
inviteMembers details
assertInviteRequestExists
func(boardID boards.ID, user .uverse.address)- OID
- 0fb476…77f7:346
assertInviteRequestExists details
assertNoDuplicatedInvites
func(invites []v1.Invite)- OID
- 0fb476…77f7:347
assertNoDuplicatedInvites details
LockRealm
func(lockRealmMembers bool)LockRealm locks the realm making it readonly. WARNING: Realm can't be unlocked once locked. Realm can also be locked without locking realm members. Realm members can be locked when locking the realm or afterwards. This is relevant for two reasons, one so that members can be modified after the lock. The other is for realm owners, who can delete threads and comments after the lock.
- OID
- 0fb476…77f7:348
LockRealm details
IsRealmLocked
func() boolIsRealmLocked checks if boards realm has been locked.
- OID
- 0fb476…77f7:350
IsRealmLocked details
AreRealmMembersLocked
func() boolAreRealmMembersLocked checks if realm members have been locked.
- OID
- 0fb476…77f7:351
AreRealmMembersLocked details
assertRealmIsNotLocked
func()- OID
- 0fb476…77f7:352
assertRealmIsNotLocked details
assertRealmMembersAreNotLocked
func()- OID
- 0fb476…77f7:353
assertRealmMembersAreNotLocked details
pageSizeDefault
untyped bigintValue
(6 <untyped> bigint)
pageSizeReplies
untyped bigintValue
(10 <untyped> bigint)
pageSizeFlat
untyped bigintValue
(50 <untyped> bigint)
maxRenderedBodies
func() intmaxRenderedBodies caps user bodies wrapped in \<gno-foreign> per page render, kept a margin under gnoweb's per-render foreign-block cap (foreign.MaxBlocksPerRender, sourced from chain/markdown so it can't drift from the renderer). On reaching it the tree stops descending and shows a truncation notice instead of letting the renderer blank comments past the cap. The margin absorbs the OP, repost source bodies, and chrome. Computed lazily (a func, not a package-level var) so it tracks the native cap across chain upgrades: a var initializer runs once at realm-init and persists, freezing a stale value if the underlying MaxBlocksPerRender ever changes; recomputing per render re-reads it.
- OID
- 0fb476…77f7:354
maxRenderedBodies details
sortToggleLink
func(path string) (link string, desc bool)sortToggleLink builds the asc/desc sort-toggle link for path. The label names the DESTINATION order (what you get by clicking), not the order you're currently viewing, and ?page= is reset since page N of one order is a different slice in the other. It reports whether the CURRENT order is descending, so callers can drive their own (signed-count or reverse-iterate) pagination. Other query params (e.g. flat=1) are preserved.
- OID
- 0fb476…77f7:356
sortToggleLink details
menuManageBoard
untyped stringValue
"manageBoard"
createBoardURI
stringValue
"/r/gnoland/boards2/v1:create-board"
adminUsersURI
stringValue
"/r/gnoland/boards2/v1:admin-users"
helpURI
stringValue
"/r/gnoland/boards2/v1:help"
Render
func(path string) string- OID
- 0fb476…77f7:360
Render details
renderHelp
func(res *v0.ResponseWriter, *v0.Request)- OID
- 0fb476…77f7:361
renderHelp details
renderBoardsList
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:362
renderBoardsList details
renderBoardListMenu
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:363
renderBoardListMenu details
renderCreateBoard
func(res *v0.ResponseWriter, *v0.Request)- OID
- 0fb476…77f7:364
renderCreateBoard details
renderMembers
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:365
renderMembers details
renderInvites
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:366
renderInvites details
renderBannedUsers
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:367
renderBannedUsers details
infoAlert
func(title string, msg string) string- OID
- 0fb476…77f7:368
infoAlert details
rolesToString
func(roles []boards.Role) string- OID
- 0fb476…77f7:369
rolesToString details
menuURL
func(name string) string- OID
- 0fb476…77f7:370
menuURL details
getCurrentMenu
func(rawURL string) string- OID
- 0fb476…77f7:371
getCurrentMenu details
renderBoard
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:372
renderBoard details
renderSubMenu
func(items []string) stringrenderSubMenu renders a sub-menu with a distinct visual pattern.
- OID
- 0fb476…77f7:374
renderSubMenu details
renderBoardMenu
func(board *boards.Board, req *v0.Request) string- OID
- 0fb476…77f7:375
renderBoardMenu details
renderInviteMember
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:376
renderInviteMember details
renderPost
func(post *boards.Post, path string, indent string, levels int, budget *int, desc bool) stringrenderPost renders a post and (unless it's a leaf or capped) its replies. desc is the page's sort order, forwarded so a comment's nested inline children (renderSubReplies) match the order of the view they appear in. It is unused for the top-level/re-root call (path != "" routes to renderTopLevelReplies, which derives the order from the path); those callers pass false.
- OID
- 0fb476…77f7:377
renderPost details
renderPostContent
func(post *boards.Post, indent string, levels int, budget *int) string- OID
- 0fb476…77f7:379
renderPostContent details
renderPostInner
func(post *boards.Post, path string) string- OID
- 0fb476…77f7:380
renderPostInner details
renderSourcePost
func(post *boards.Post, indent string, budget *int) (string, *boards.Post)- OID
- 0fb476…77f7:381
renderSourcePost details
renderFlagPost
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:382
renderFlagPost details
renderFlaggingReasonsPost
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:383
renderFlaggingReasonsPost details
renderReplyPost
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:384
renderReplyPost details
renderReply
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:385
renderReply details
newClampedPager
func(path string, size int, pageSize int) pager.PagernewClampedPager builds a pager, clamping an out-of-range, zero, negative, or malformed ?page= to the last valid page instead of erroring. pager.New rejects page==0, page>pageCount, and non-numeric pages with ErrInvalidPageNumber, which the callers would otherwise surface as a panic (aborting the whole render) or an error page in place of the list. A NEGATIVE page is not rejected by pager.New (it only checks ==0 and >pageCount), so it must be caught here too — otherwise it renders a broken "page -N of M" picker with both arrows disabled. Triggers on a stale deep link after deletions, or a hand-edited URL.
- OID
- 0fb476…77f7:387
newClampedPager details
renderTopLevelReplies
func(post *boards.Post, path string, indent string, levels int, budget *int) string- OID
- 0fb476…77f7:388
renderTopLevelReplies details
renderSubReplies
func(post *boards.Post, indent string, levels int, budget *int, desc bool) string- OID
- 0fb476…77f7:389
renderSubReplies details
renderEditReply
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:390
renderEditReply details
maxFlatIndentDepth
untyped bigintmaxFlatIndentDepth caps the blockquote nesting in the flat comment view so deep reply chains stay readable; comments deeper than this still render, just at the capped indent.
Value
(6 <untyped> bigint)
renderThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:391
renderThread details
renderThreadFlat
func(thread *boards.Post, path string, budget *int) stringrenderThreadFlat renders every comment in the thread as a single flat, depth-indented, paginated list backed by ThreadMeta.AllReplies (the index that already holds every reply at every depth). Unlike the recursive threaded view — which bounds work with the render budget and truncates a large subtree — this view is reachable to the very last comment: each comment renders one \<gno-foreign> block (no recursion), so a fixed page size (pageSizeFlat) plus the OP stays well under the budget regardless of nesting, and the pager always advances. ?order=desc shows newest first, so its page 1 is the latest comments.
- OID
- 0fb476…77f7:393
renderThreadFlat details
flatIndent
func(thread *boards.Post, reply *boards.Post) stringflatIndent returns the blockquote indent for a reply in the flat view, derived from its depth below the thread root (depth 1 = a direct reply to the thread), capped at maxFlatIndentDepth.
- OID
- 0fb476…77f7:394
flatIndent details
renderThreadSummary
func(thread *boards.Post) string- OID
- 0fb476…77f7:395
renderThreadSummary details
renderCreateThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:396
renderCreateThread details
renderEditThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:397
renderEditThread details
renderRepostThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:398
renderRepostThread details
makeBoardURI
func(b *boards.Board) string- OID
- 0fb476…77f7:399
makeBoardURI details
makeFreezeBoardURI
func(b *boards.Board) string- OID
- 0fb476…77f7:401
makeFreezeBoardURI details
makeUnfreezeBoardURI
func(b *boards.Board) string- OID
- 0fb476…77f7:402
makeUnfreezeBoardURI details
makeInviteMemberURI
func(b *boards.Board) string- OID
- 0fb476…77f7:403
makeInviteMemberURI details
makeCreateThreadURI
func(b *boards.Board) string- OID
- 0fb476…77f7:404
makeCreateThreadURI details
makeRequestInviteURI
func(b *boards.Board) string- OID
- 0fb476…77f7:405
makeRequestInviteURI details
makeThreadURI
func(p *boards.Post) string- OID
- 0fb476…77f7:406
makeThreadURI details
makeThreadFlatURI
func(p *boards.Post) stringmakeThreadFlatURI links to the thread's flat "all comments" view. Works for a thread or any reply within it (makeThreadURI resolves to the thread).
- OID
- 0fb476…77f7:408
makeThreadFlatURI details
makeReplyURI
func(p *boards.Post) string- OID
- 0fb476…77f7:409
makeReplyURI details
makeCreateReplyURI
func(p *boards.Post) string- OID
- 0fb476…77f7:410
makeCreateReplyURI details
makeCreateRepostURI
func(p *boards.Post) string- OID
- 0fb476…77f7:411
makeCreateRepostURI details
makeDeletePostURI
func(p *boards.Post) string- OID
- 0fb476…77f7:412
makeDeletePostURI details
makeEditPostURI
func(p *boards.Post) string- OID
- 0fb476…77f7:413
makeEditPostURI details
makeFlagURI
func(p *boards.Post) string- OID
- 0fb476…77f7:414
makeFlagURI details
makeFlaggingReasonsURI
func(p *boards.Post) string- OID
- 0fb476…77f7:415