realmPkgPath
untyped stringValue
"gno.land/r/g1gsarxwyhnxfuug3lsys58rcpg7myrgmw3wuc2u/boards2/v1"
gRealmPath
untyped stringValue
"/r/g1gsarxwyhnxfuug3lsys58rcpg7myrgmw3wuc2u/boards2/v1"
RealmLink
txlink.RealmValue
<gnolang.StringValue>
RequiredAccountAmount
int64Value
3000000000
Notice
stringValue
""
Help
stringValue
""
gListedBoardsByID
v0.BPTree// string(id) -> \*boards.Board
- OID
- 0e8a17…7fdd:8
gListedBoardsByID details
gInviteRequests
v0.BPTree// string(board id) -> \*bptree.BPTree(address -> time.Time)
- OID
- 0e8a17…7fdd:10
gInviteRequests details
gBannedUsers
v0.BPTree// string(board id) -> \*bptree.BPTree(address -> time.Time)
- OID
- 0e8a17…7fdd:12
gBannedUsers details
gLocked
struct{...}TODO: Refactor globals in favor of a cleaner pattern
- OID
- 0e8a17…7fdd:14
gLocked details
gBoards
*boards.storage- OID
- 0e8a17…7fdd:16
gBoards details
gBoardsSequence
*boards.idGenerator- OID
- 0e8a17…7fdd:23
gBoardsSequence details
gPerms
*permissions.Permissions- OID
- 0e8a17…7fdd:26
gPerms details
initRealmPermissions
func(owners [].uverse.address) boards.PermissionsinitRealmPermissions returns the default realm permissions.
- OID
- 0e8a17…7fdd:142
initRealmPermissions details
getInviteRequests
func(boardID boards.ID) (*v0.BPTree, found bool)getInviteRequests returns invite requests for a board.
- OID
- 0e8a17…7fdd:144
getInviteRequests details
getBannedUsers
func(boardID boards.ID) (*v0.BPTree, found bool)getBannedUsers returns banned users within a board.
- OID
- 0e8a17…7fdd:145
getBannedUsers details
mustGetBoardByName
func(name string) *boards.BoardmustGetBoardByName returns a board or panics when it's not found.
- OID
- 0e8a17…7fdd:146
mustGetBoardByName details
mustGetBoard
func(id boards.ID) *boards.BoardmustGetBoard returns a board or panics when it's not found.
- OID
- 0e8a17…7fdd:147
mustGetBoard details
getThread
func(board *boards.Board, threadID boards.ID) (*boards.Post, bool)getThread returns a board thread.
- OID
- 0e8a17…7fdd:148
getThread details
getReply
func(thread *boards.Post, replyID boards.ID) (*boards.Post, bool)getReply returns a thread comment or reply.
- OID
- 0e8a17…7fdd:149
getReply details
mustGetThread
func(board *boards.Board, threadID boards.ID) *boards.PostmustGetThread returns a thread or panics when it's not found.
- OID
- 0e8a17…7fdd:150
mustGetThread details
mustGetReply
func(thread *boards.Post, replyID boards.ID) *boards.PostmustGetReply returns a reply or panics when it's not found.
- OID
- 0e8a17…7fdd:151
mustGetReply details
mustGetPermissions
func(bid boards.ID) boards.Permissions- OID
- 0e8a17…7fdd:152
mustGetPermissions details
parseRealmPath
func(path string) *realmpath.Request- OID
- 0e8a17…7fdd:153
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
- 0e8a17…7fdd:155
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
- 0e8a17…7fdd:156
flagItem details
getFlaggingThreshold
func(bid boards.ID) int- OID
- 0e8a17…7fdd:158
getFlaggingThreshold details
dateFormat
untyped stringValue
"2006-01-02 3:04pm MST"
padLeft
func(s string, length int) string- OID
- 0e8a17…7fdd:159
padLeft details
padZero
func(u64 uint64, length int) string- OID
- 0e8a17…7fdd:161
padZero details
indentBody
func(indent string, body string) string- OID
- 0e8a17…7fdd:162
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
- 0e8a17…7fdd:163
indentForeignBody details
summaryOf
func(text string, length int) string- OID
- 0e8a17…7fdd:164
summaryOf details
userLink
func(addr .uverse.address) string- OID
- 0e8a17…7fdd:165
userLink details
getRoleBadge
func(post *boards.Post) string- OID
- 0e8a17…7fdd:166
getRoleBadge details
Board
typeSafe view types are defined in the hub extensions package and re-exported here so callers can keep using them via this realm.
Value
hub.Board
Comment
typeSafe view types are defined in the hub extensions package and re-exported here so callers can keep using them via this realm.
Value
hub.Comment
Flag
typeSafe view types are defined in the hub extensions package and re-exported here so callers can keep using them via this realm.
Value
hub.Flag
Member
typeSafe view types are defined in the hub extensions package and re-exported here so callers can keep using them via this realm.
Value
hub.Member
Thread
typeSafe view types are defined in the hub extensions package and re-exported here so callers can keep using them via this realm.
Value
hub.Thread
GetBoard
func(id uint64) (hub.Board, bool)GetBoard returns a safe board.
- OID
- 0e8a17…7fdd:167
GetBoard details
GetThread
func(boardID uint64, threadID uint64) (hub.Thread, bool)GetThread returns a safe board thread.
- OID
- 0e8a17…7fdd:169
GetThread details
GetComment
func(boardID uint64, threadID uint64, commentID uint64) (hub.Comment, bool)GetComment returns a safe thread comment.
- OID
- 0e8a17…7fdd:170
GetComment details
GetBoards
func(start int, count int) []hub.BoardGetBoards returns a list with all boards. To reverse iterate use a negative count.
- OID
- 0e8a17…7fdd:171
GetBoards details
GetThreads
func(boardID uint64, start int, count int) []hub.ThreadGetThreads returns a list with threads of a board. To reverse iterate use a negative count.
- OID
- 0e8a17…7fdd:172
GetThreads details
GetMembers
func(boardID uint64, start int, count int) []hub.MemberGetMembers returns a list with the members of a board. To reverse iterate use a negative count.
- OID
- 0e8a17…7fdd:173
GetMembers details
GetReposts
func(boardID uint64, threadID uint64, start int, count int) []hub.ThreadGetReposts returns a list with repost of a board thread. To reverse iterate use a negative count.
- OID
- 0e8a17…7fdd:174
GetReposts details
GetFlags
func(boardID uint64, threadID uint64, commentID uint64, start int, count int) []hub.FlagGetFlags returns a list with thread or comment moderation flags. To reverse iterate use a negative count. Thread flags are returned when \`commentID\` is zero, or comment flags are returned otherwise.
- OID
- 0e8a17…7fdd:175
GetFlags details
GetComments
func(boardID uint64, threadID uint64, start int, count int) []hub.CommentGetComments returns a list with all thread comments and replies. To reverse iterate use a negative count. Top level comments can be filtered by checking \`Comment.ParentID\`, replies always have a parent comment or reply, while comments have no parent.
- OID
- 0e8a17…7fdd:176
GetComments details
GetReplies
func(boardID uint64, threadID uint64, commentID uint64, start int, count int) []hub.CommentGetReplies returns a list with top level comment replies. To reverse iterate use a negative count.
- OID
- 0e8a17…7fdd:177
GetReplies details
getBoardThread
func(boardID uint64, threadID uint64) (*boards.Post, bool)getBoardThread returns a board thread from their IDs.
- OID
- 0e8a17…7fdd:178
getBoardThread details
getComment
func(boardID uint64, threadID uint64, commentID uint64) (*boards.Post, bool)getComment returns a thread comment from their IDs.
- OID
- 0e8a17…7fdd:179
getComment 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
- 0e8a17…7fdd:180
createBasicBoardPermissions details
createOpenBoardPermissions
func(owner .uverse.address) *permissions.Permissions- OID
- 0e8a17…7fdd:182
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
- 0e8a17…7fdd:136
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
- 0e8a17…7fdd:183
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
- 0e8a17…7fdd:141
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
- 0e8a17…7fdd:139
validateBasicRoleChange details
checkBoardNameIsNotAddress
func(s string) .uverse.error- OID
- 0e8a17…7fdd:184
checkBoardNameIsNotAddress details
checkBoardNameBelongsToAddress
func(owner .uverse.address, name string) .uverse.error- OID
- 0e8a17…7fdd:185
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
- 0e8a17…7fdd:186
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
- 0e8a17…7fdd:188
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
- 0e8a17…7fdd:189
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
- 0e8a17…7fdd:190
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
- 0e8a17…7fdd:191
validateOpenReplyCreate details
checkAccountHasAmount
func(addr .uverse.address, amount int64) .uverse.error- OID
- 0e8a17…7fdd:192
checkAccountHasAmount 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
- 0e8a17…7fdd:194
reBoardName details
SetHelp
func(content string)SetHelp sets or updates boards realm help content.
- OID
- 0e8a17…7fdd:306
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
- 0e8a17…7fdd:308
SetRequiredAccountAmount details
SetPermissions
func(boardID boards.ID, p boards.Permissions)SetPermissions sets a permissions implementation for boards2 realm or a board.
- OID
- 0e8a17…7fdd:309
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
- 0e8a17…7fdd:310
SetRealmNotice details
GetBoardIDFromName
func(name string) (boards.ID, found bool)GetBoardIDFromName searches a board by name and returns its ID.
- OID
- 0e8a17…7fdd:311
GetBoardIDFromName details
BoardCount
func() intBoardCount returns the total number of boards.
- OID
- 0e8a17…7fdd:312
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
- 0e8a17…7fdd:313
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
- 0e8a17…7fdd:314
RenameBoard details
CreateThread
func(boardID boards.ID, title string, body string) boards.IDCreateThread creates a new thread within a board.
- OID
- 0e8a17…7fdd:315
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
- 0e8a17…7fdd:316
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
- 0e8a17…7fdd:317
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
- 0e8a17…7fdd:318
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
- 0e8a17…7fdd:319
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
- 0e8a17…7fdd:320
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
- 0e8a17…7fdd:321
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
- 0e8a17…7fdd:322
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
- 0e8a17…7fdd:323
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
- 0e8a17…7fdd:324
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
- 0e8a17…7fdd:325
ChangeMemberRole details
assertMemberAddressIsValid
func(member .uverse.address)- OID
- 0e8a17…7fdd:326
assertMemberAddressIsValid details
assertUserAddressIsValid
func(user .uverse.address)- OID
- 0e8a17…7fdd:327
assertUserAddressIsValid details
assertBoardExists
func(id boards.ID)- OID
- 0e8a17…7fdd:328
assertBoardExists details
assertBoardIsNotFrozen
func(b *boards.Board)- OID
- 0e8a17…7fdd:329
assertBoardIsNotFrozen details
assertIsValidBoardName
func(name string)- OID
- 0e8a17…7fdd:330
assertIsValidBoardName details
assertThreadIsNotFrozen
func(t *boards.Post)- OID
- 0e8a17…7fdd:331
assertThreadIsNotFrozen details
assertNameIsNotEmpty
func(name string)- OID
- 0e8a17…7fdd:332
assertNameIsNotEmpty details
assertTitleIsValid
func(title string)- OID
- 0e8a17…7fdd:333
assertTitleIsValid details
assertBodyIsNotEmpty
func(body string)- OID
- 0e8a17…7fdd:334
assertBodyIsNotEmpty details
assertBoardNameNotExists
func(name string)- OID
- 0e8a17…7fdd:335
assertBoardNameNotExists details
assertThreadExists
func(b *boards.Board, threadID boards.ID)- OID
- 0e8a17…7fdd:336
assertThreadExists details
assertReplyExists
func(thread *boards.Post, replyID boards.ID)- OID
- 0e8a17…7fdd:337
assertReplyExists details
assertThreadIsVisible
func(thread *boards.Post)- OID
- 0e8a17…7fdd:338
assertThreadIsVisible details
assertReplyIsVisible
func(thread *boards.Post)- OID
- 0e8a17…7fdd:339
assertReplyIsVisible details
assertThreadBodyIsValid
func(body string)- OID
- 0e8a17…7fdd:340
assertThreadBodyIsValid details
assertReplyBodyIsValid
func(body string)- OID
- 0e8a17…7fdd:341
assertReplyBodyIsValid details
assertMembersUpdateIsEnabled
func(boardID boards.ID)- OID
- 0e8a17…7fdd:342
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
- 0e8a17…7fdd:343
Ban details
Unban
func(boardID boards.ID, user .uverse.address, reason string)Unban unbans a user from a board.
- OID
- 0e8a17…7fdd:345
Unban details
IsBanned
func(boardID boards.ID, user .uverse.address) boolIsBanned checks if a user is banned from a board.
- OID
- 0e8a17…7fdd:346
IsBanned details
assertAddressIsValid
func(addr .uverse.address)- OID
- 0e8a17…7fdd:347
assertAddressIsValid details
assertUserIsNotBanned
func(boardID boards.ID, user .uverse.address)- OID
- 0e8a17…7fdd:348
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
- 0e8a17…7fdd:349
SetFlaggingThreshold details
GetFlaggingThreshold
func(boardID boards.ID) intGetFlaggingThreshold returns the number of flags required to hide a thread or comment within a board.
- OID
- 0e8a17…7fdd:351
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
- 0e8a17…7fdd:352
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
- 0e8a17…7fdd:353
FlagReply details
FreezeBoard
func(boardID boards.ID)FreezeBoard freezes a board so no more threads and comments can be created or modified.
- OID
- 0e8a17…7fdd:354
FreezeBoard details
UnfreezeBoard
func(boardID boards.ID)UnfreezeBoard removes frozen status from a board.
- OID
- 0e8a17…7fdd:356
UnfreezeBoard details
IsBoardFrozen
func(boardID boards.ID) boolIsBoardFrozen checks if a board has been frozen.
- OID
- 0e8a17…7fdd:357
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
- 0e8a17…7fdd:358
FreezeThread details
UnfreezeThread
func(boardID boards.ID, threadID boards.ID)UnfreezeThread removes frozen status from a thread. Fails if board is frozen.
- OID
- 0e8a17…7fdd:359
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
- 0e8a17…7fdd:360
IsThreadFrozen details
setBoardReadonly
func(int, rlm .uverse.realm, boardID boards.ID, readonly bool)- OID
- 0e8a17…7fdd:361
setBoardReadonly details
setThreadReadonly
func(int, rlm .uverse.realm, boardID boards.ID, threadID boards.ID, readonly bool)- OID
- 0e8a17…7fdd:362
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
- 0e8a17…7fdd:363
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
- 0e8a17…7fdd:365
InviteMembers details
RequestInvite
func(boardID boards.ID)RequestInvite request to be invited to a board.
- OID
- 0e8a17…7fdd:366
RequestInvite details
AcceptInvite
func(boardID boards.ID, user .uverse.address)AcceptInvite accepts a board invite request.
- OID
- 0e8a17…7fdd:367
AcceptInvite details
RevokeInvite
func(boardID boards.ID, user .uverse.address)RevokeInvite revokes a board invite request.
- OID
- 0e8a17…7fdd:368
RevokeInvite details
inviteMembers
func(int, rlm .uverse.realm, boardID boards.ID, invites []v1.Invite)- OID
- 0e8a17…7fdd:369
inviteMembers details
assertInviteRequestExists
func(boardID boards.ID, user .uverse.address)- OID
- 0e8a17…7fdd:370
assertInviteRequestExists details
assertNoDuplicatedInvites
func(invites []v1.Invite)- OID
- 0e8a17…7fdd:371
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
- 0e8a17…7fdd:372
LockRealm details
IsRealmLocked
func() boolIsRealmLocked checks if boards realm has been locked.
- OID
- 0e8a17…7fdd:374
IsRealmLocked details
AreRealmMembersLocked
func() boolAreRealmMembersLocked checks if realm members have been locked.
- OID
- 0e8a17…7fdd:375
AreRealmMembersLocked details
assertRealmIsNotLocked
func()- OID
- 0e8a17…7fdd:376
assertRealmIsNotLocked details
assertRealmMembersAreNotLocked
func()- OID
- 0e8a17…7fdd:377
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
- 0e8a17…7fdd:378
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
- 0e8a17…7fdd:380
sortToggleLink details
menuManageBoard
untyped stringValue
"manageBoard"
createBoardURI
stringValue
"/r/g1gsarxwyhnxfuug3lsys58rcpg7myrgmw3wuc2u/boards2/v1:create-board"
adminUsersURI
stringValue
"/r/g1gsarxwyhnxfuug3lsys58rcpg7myrgmw3wuc2u/boards2/v1:admin-users"
helpURI
stringValue
"/r/g1gsarxwyhnxfuug3lsys58rcpg7myrgmw3wuc2u/boards2/v1:help"
Render
func(path string) string- OID
- 0e8a17…7fdd:384
Render details
renderHelp
func(res *v0.ResponseWriter, *v0.Request)- OID
- 0e8a17…7fdd:385
renderHelp details
renderBoardsList
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:386
renderBoardsList details
renderBoardListMenu
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:387
renderBoardListMenu details
renderCreateBoard
func(res *v0.ResponseWriter, *v0.Request)- OID
- 0e8a17…7fdd:388
renderCreateBoard details
renderMembers
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:389
renderMembers details
renderInvites
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:390
renderInvites details
renderBannedUsers
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:391
renderBannedUsers details
infoAlert
func(title string, msg string) string- OID
- 0e8a17…7fdd:392
infoAlert details
rolesToString
func(roles []boards.Role) string- OID
- 0e8a17…7fdd:393
rolesToString details
menuURL
func(name string) string- OID
- 0e8a17…7fdd:394
menuURL details
getCurrentMenu
func(rawURL string) string- OID
- 0e8a17…7fdd:395
getCurrentMenu details
renderBoard
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:396
renderBoard details
renderSubMenu
func(items []string) stringrenderSubMenu renders a sub-menu with a distinct visual pattern.
- OID
- 0e8a17…7fdd:398
renderSubMenu details
renderBoardMenu
func(board *boards.Board, req *v0.Request) string- OID
- 0e8a17…7fdd:399
renderBoardMenu details
renderInviteMember
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:400
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
- 0e8a17…7fdd:401
renderPost details
renderPostContent
func(post *boards.Post, indent string, levels int, budget *int) string- OID
- 0e8a17…7fdd:403
renderPostContent details
renderPostInner
func(post *boards.Post, path string) string- OID
- 0e8a17…7fdd:404
renderPostInner details
renderSourcePost
func(post *boards.Post, indent string, budget *int) (string, *boards.Post)- OID
- 0e8a17…7fdd:405
renderSourcePost details
renderFlagPost
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:406
renderFlagPost details
renderFlaggingReasonsPost
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:407
renderFlaggingReasonsPost details
renderReplyPost
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:408
renderReplyPost details
renderReply
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:409
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
- 0e8a17…7fdd:411
newClampedPager details
renderTopLevelReplies
func(post *boards.Post, path string, indent string, levels int, budget *int) string- OID
- 0e8a17…7fdd:412
renderTopLevelReplies details
renderSubReplies
func(post *boards.Post, indent string, levels int, budget *int, desc bool) string- OID
- 0e8a17…7fdd:413
renderSubReplies details
renderEditReply
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:414
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
- 0e8a17…7fdd:415
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
- 0e8a17…7fdd:417
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
- 0e8a17…7fdd:418
flatIndent details
renderThreadSummary
func(thread *boards.Post) string- OID
- 0e8a17…7fdd:419
renderThreadSummary details
renderCreateThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:420
renderCreateThread details
renderEditThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:421
renderEditThread details
renderRepostThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0e8a17…7fdd:422
renderRepostThread details
makeBoardURI
func(b *boards.Board) string- OID
- 0e8a17…7fdd:423
makeBoardURI details
makeFreezeBoardURI
func(b *boards.Board) string- OID
- 0e8a17…7fdd:425
makeFreezeBoardURI details
makeUnfreezeBoardURI
func(b *boards.Board) string- OID
- 0e8a17…7fdd:426
makeUnfreezeBoardURI details
makeInviteMemberURI
func(b *boards.Board) string- OID
- 0e8a17…7fdd:427
makeInviteMemberURI details
makeCreateThreadURI
func(b *boards.Board) string- OID
- 0e8a17…7fdd:428
makeCreateThreadURI details
makeRequestInviteURI
func(b *boards.Board) string- OID
- 0e8a17…7fdd:429
makeRequestInviteURI details
makeThreadURI
func(p *boards.Post) string- OID
- 0e8a17…7fdd:430
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
- 0e8a17…7fdd:432
makeThreadFlatURI details
makeReplyURI
func(p *boards.Post) string- OID
- 0e8a17…7fdd:433
makeReplyURI details
makeCreateReplyURI
func(p *boards.Post) string- OID
- 0e8a17…7fdd:434
makeCreateReplyURI details
makeCreateRepostURI
func(p *boards.Post) string- OID
- 0e8a17…7fdd:435
makeCreateRepostURI details
makeDeletePostURI
func(p *boards.Post) string- OID
- 0e8a17…7fdd:436
makeDeletePostURI details
makeEditPostURI
func(p *boards.Post) string- OID
- 0e8a17…7fdd:437
makeEditPostURI details
makeFlagURI
func(p *boards.Post) string- OID
- 0e8a17…7fdd:438
makeFlagURI details
makeFlaggingReasonsURI
func(p *boards.Post) string- OID
- 0e8a17…7fdd:439