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:77
initRealmPermissions details
getInviteRequests
func(boardID boards.ID) (*v0.BPTree, found bool)getInviteRequests returns invite requests for a board.
- OID
- 0fb476…77f7:79
getInviteRequests details
getBannedUsers
func(boardID boards.ID) (*v0.BPTree, found bool)getBannedUsers returns banned users within a board.
- OID
- 0fb476…77f7:80
getBannedUsers details
mustGetBoardByName
func(name string) *boards.BoardmustGetBoardByName returns a board or panics when it's not found.
- OID
- 0fb476…77f7:81
mustGetBoardByName details
mustGetBoard
func(id boards.ID) *boards.BoardmustGetBoard returns a board or panics when it's not found.
- OID
- 0fb476…77f7:82
mustGetBoard details
getThread
func(board *boards.Board, threadID boards.ID) (*boards.Post, bool)getThread returns a board thread.
- OID
- 0fb476…77f7:83
getThread details
getReply
func(thread *boards.Post, replyID boards.ID) (*boards.Post, bool)getReply returns a thread comment or reply.
- OID
- 0fb476…77f7:84
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:85
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:86
mustGetReply details
mustGetPermissions
func(bid boards.ID) boards.Permissions- OID
- 0fb476…77f7:87
mustGetPermissions details
parseRealmPath
func(path string) *realmpath.Request- OID
- 0fb476…77f7:88
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:90
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:91
flagItem details
getFlaggingThreshold
func(bid boards.ID) int- OID
- 0fb476…77f7:93
getFlaggingThreshold details
dateFormat
untyped stringValue
"2006-01-02 3:04pm MST"
padLeft
func(s string, length int) string- OID
- 0fb476…77f7:94
padLeft details
padZero
func(u64 uint64, length int) string- OID
- 0fb476…77f7:96
padZero details
indentBody
func(indent string, body string) string- OID
- 0fb476…77f7:97
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:98
indentForeignBody details
summaryOf
func(text string, length int) string- OID
- 0fb476…77f7:99
summaryOf details
userLink
func(addr .uverse.address) string- OID
- 0fb476…77f7:100
userLink details
getRoleBadge
func(post *boards.Post) string- OID
- 0fb476…77f7:101
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
- 0fb476…77f7:102
GetBoard details
GetThread
func(boardID uint64, threadID uint64) (hub.Thread, bool)GetThread returns a safe board thread.
- OID
- 0fb476…77f7:104
GetThread details
GetComment
func(boardID uint64, threadID uint64, commentID uint64) (hub.Comment, bool)GetComment returns a safe thread comment or reply. \`commentID\` can be the ID of a top level comment or of a nested reply.
- OID
- 0fb476…77f7:105
GetComment details
GetBoards
func(start int, count int) []hub.BoardGetBoards returns a list with all boards. To reverse iterate use a negative count.
- OID
- 0fb476…77f7:106
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. A board without thread storage has no threads, so nil is returned.
- OID
- 0fb476…77f7:107
GetThreads details
GetMembers
func(boardID uint64, start int, count int) []hub.MemberGetMembers returns a list with the members of a board. A zero \`boardID\` refers to the realm, so the realm admin users are returned. A non permissioned board has no members, so nil is returned.
- OID
- 0fb476…77f7:108
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. A repost is not included when its destination thread has been deleted, so the total accessible results can be shorter than the thread's RepostCount(), and a single call can return fewer than count results. (The reason for the discrepancy is that the start index can be large, and this function cannot scan all reposts up to the start index to resolve the discrepancy.)
- OID
- 0fb476…77f7:109
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 the flags of the comment or reply with that ID are returned otherwise.
- OID
- 0fb476…77f7:110
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 comparing \`Comment.ParentID()\` to \`Comment.ThreadID()\`: a top level comment's parent is its thread, while a reply's parent is the comment or reply it answers.
- OID
- 0fb476…77f7:111
GetComments details
GetReplies
func(boardID uint64, threadID uint64, commentID uint64, start int, count int) []hub.CommentGetReplies returns a list with the direct replies of a comment or reply. To reverse iterate use a negative count. \`commentID\` can be the ID of a top level comment or of a nested reply.
- OID
- 0fb476…77f7:112
GetReplies details
getBoardThread
func(boardID uint64, threadID uint64) (*boards.Post, bool)getBoardThread returns a board thread from their IDs.
- OID
- 0fb476…77f7:113
getBoardThread details
getComment
func(boardID uint64, threadID uint64, commentID uint64) (*boards.Post, bool)getComment returns a thread comment or reply from their IDs. It searches the thread's flat index of all comments and replies, so nested replies are addressable by ID and not only top level comments.
- OID
- 0fb476…77f7:114
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
- 0fb476…77f7:115
createBasicBoardPermissions details
createOpenBoardPermissions
func(owner .uverse.address) *permissions.Permissions- OID
- 0fb476…77f7:117
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:71
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:118
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:76
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:74
validateBasicRoleChange details
checkBoardNameIsNotAddress
func(s string) .uverse.error- OID
- 0fb476…77f7:119
checkBoardNameIsNotAddress details
checkBoardNameBelongsToAddress
func(owner .uverse.address, name string) .uverse.error- OID
- 0fb476…77f7:120
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:121
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:123
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:124
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:125
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:126
validateOpenReplyCreate details
checkAccountHasAmount
func(addr .uverse.address, amount int64) .uverse.error- OID
- 0fb476…77f7:127
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
- 0fb476…77f7:129
reBoardName details
SetHelp
func(content string)SetHelp sets or updates boards realm help content.
- OID
- 0fb476…77f7:241
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:243
SetRequiredAccountAmount details
SetPermissions
func(boardID boards.ID, p boards.Permissions)SetPermissions sets a permissions implementation for boards2 realm or a board.
- OID
- 0fb476…77f7:244
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:245
SetRealmNotice details
GetBoardIDFromName
func(name string) (boards.ID, found bool)GetBoardIDFromName searches a board by name and returns its ID.
- OID
- 0fb476…77f7:246
GetBoardIDFromName details
BoardCount
func() intBoardCount returns the total number of boards.
- OID
- 0fb476…77f7:247
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:248
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:249
RenameBoard details
CreateThread
func(boardID boards.ID, title string, body string) boards.IDCreateThread creates a new thread within a board.
- OID
- 0fb476…77f7:250
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:251
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:252
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:253
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:254
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:255
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:256
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:257
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:258
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:259
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:260
ChangeMemberRole details
assertMemberAddressIsValid
func(member .uverse.address)- OID
- 0fb476…77f7:261
assertMemberAddressIsValid details
assertUserAddressIsValid
func(user .uverse.address)- OID
- 0fb476…77f7:262
assertUserAddressIsValid details
assertBoardExists
func(id boards.ID)- OID
- 0fb476…77f7:263
assertBoardExists details
assertBoardIsNotFrozen
func(b *boards.Board)- OID
- 0fb476…77f7:264
assertBoardIsNotFrozen details
assertIsValidBoardName
func(name string)- OID
- 0fb476…77f7:265
assertIsValidBoardName details
assertThreadIsNotFrozen
func(t *boards.Post)- OID
- 0fb476…77f7:266
assertThreadIsNotFrozen details
assertNameIsNotEmpty
func(name string)- OID
- 0fb476…77f7:267
assertNameIsNotEmpty details
assertTitleIsValid
func(title string)- OID
- 0fb476…77f7:268
assertTitleIsValid details
assertBodyIsNotEmpty
func(body string)- OID
- 0fb476…77f7:269
assertBodyIsNotEmpty details
assertBoardNameNotExists
func(name string)- OID
- 0fb476…77f7:270
assertBoardNameNotExists details
assertThreadExists
func(b *boards.Board, threadID boards.ID)- OID
- 0fb476…77f7:271
assertThreadExists details
assertReplyExists
func(thread *boards.Post, replyID boards.ID)- OID
- 0fb476…77f7:272
assertReplyExists details
assertThreadIsVisible
func(thread *boards.Post)- OID
- 0fb476…77f7:273
assertThreadIsVisible details
assertReplyIsVisible
func(thread *boards.Post)- OID
- 0fb476…77f7:274
assertReplyIsVisible details
assertThreadBodyIsValid
func(body string)- OID
- 0fb476…77f7:275
assertThreadBodyIsValid details
assertReplyBodyIsValid
func(body string)- OID
- 0fb476…77f7:276
assertReplyBodyIsValid details
assertMembersUpdateIsEnabled
func(boardID boards.ID)- OID
- 0fb476…77f7:277
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:278
Ban details
Unban
func(boardID boards.ID, user .uverse.address, reason string)Unban unbans a user from a board.
- OID
- 0fb476…77f7:280
Unban details
IsBanned
func(boardID boards.ID, user .uverse.address) boolIsBanned checks if a user is banned from a board.
- OID
- 0fb476…77f7:281
IsBanned details
assertAddressIsValid
func(addr .uverse.address)- OID
- 0fb476…77f7:282
assertAddressIsValid details
assertUserIsNotBanned
func(boardID boards.ID, user .uverse.address)- OID
- 0fb476…77f7:283
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:284
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:286
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:287
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:288
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:289
FreezeBoard details
UnfreezeBoard
func(boardID boards.ID)UnfreezeBoard removes frozen status from a board.
- OID
- 0fb476…77f7:291
UnfreezeBoard details
IsBoardFrozen
func(boardID boards.ID) boolIsBoardFrozen checks if a board has been frozen.
- OID
- 0fb476…77f7:292
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:293
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:294
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:295
IsThreadFrozen details
setBoardReadonly
func(int, rlm .uverse.realm, boardID boards.ID, readonly bool)- OID
- 0fb476…77f7:296
setBoardReadonly details
setThreadReadonly
func(int, rlm .uverse.realm, boardID boards.ID, threadID boards.ID, readonly bool)- OID
- 0fb476…77f7:297
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:298
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:300
InviteMembers details
RequestInvite
func(boardID boards.ID)RequestInvite request to be invited to a board.
- OID
- 0fb476…77f7:301
RequestInvite details
AcceptInvite
func(boardID boards.ID, user .uverse.address)AcceptInvite accepts a board invite request.
- OID
- 0fb476…77f7:302
AcceptInvite details
RevokeInvite
func(boardID boards.ID, user .uverse.address)RevokeInvite revokes a board invite request.
- OID
- 0fb476…77f7:303
RevokeInvite details
inviteMembers
func(int, rlm .uverse.realm, boardID boards.ID, invites []v1.Invite)- OID
- 0fb476…77f7:304
inviteMembers details
assertInviteRequestExists
func(boardID boards.ID, user .uverse.address)- OID
- 0fb476…77f7:305
assertInviteRequestExists details
assertNoDuplicatedInvites
func(invites []v1.Invite)- OID
- 0fb476…77f7:306
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:307
LockRealm details
IsRealmLocked
func() boolIsRealmLocked checks if boards realm has been locked.
- OID
- 0fb476…77f7:309
IsRealmLocked details
AreRealmMembersLocked
func() boolAreRealmMembersLocked checks if realm members have been locked.
- OID
- 0fb476…77f7:310
AreRealmMembersLocked details
assertRealmIsNotLocked
func()- OID
- 0fb476…77f7:311
assertRealmIsNotLocked details
assertRealmMembersAreNotLocked
func()- OID
- 0fb476…77f7:312
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:313
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:315
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:319
Render details
renderHelp
func(res *v0.ResponseWriter, *v0.Request)- OID
- 0fb476…77f7:320
renderHelp details
renderBoardsList
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:321
renderBoardsList details
renderBoardListMenu
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:322
renderBoardListMenu details
renderCreateBoard
func(res *v0.ResponseWriter, *v0.Request)- OID
- 0fb476…77f7:323
renderCreateBoard details
renderMembers
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:324
renderMembers details
renderInvites
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:325
renderInvites details
renderBannedUsers
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:326
renderBannedUsers details
infoAlert
func(title string, msg string) string- OID
- 0fb476…77f7:327
infoAlert details
rolesToString
func(roles []boards.Role) string- OID
- 0fb476…77f7:328
rolesToString details
menuURL
func(name string) string- OID
- 0fb476…77f7:329
menuURL details
getCurrentMenu
func(rawURL string) string- OID
- 0fb476…77f7:330
getCurrentMenu details
renderBoard
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:331
renderBoard details
renderSubMenu
func(items []string) stringrenderSubMenu renders a sub-menu with a distinct visual pattern.
- OID
- 0fb476…77f7:333
renderSubMenu details
renderBoardMenu
func(board *boards.Board, req *v0.Request) string- OID
- 0fb476…77f7:334
renderBoardMenu details
renderInviteMember
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:335
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:336
renderPost details
renderPostContent
func(post *boards.Post, indent string, levels int, budget *int) string- OID
- 0fb476…77f7:338
renderPostContent details
renderPostInner
func(post *boards.Post, path string) string- OID
- 0fb476…77f7:339
renderPostInner details
renderSourcePost
func(post *boards.Post, indent string, budget *int) (string, *boards.Post)- OID
- 0fb476…77f7:340
renderSourcePost details
renderFlagPost
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:341
renderFlagPost details
renderFlaggingReasonsPost
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:342
renderFlaggingReasonsPost details
renderReplyPost
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:343
renderReplyPost details
renderReply
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:344
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:346
newClampedPager details
renderTopLevelReplies
func(post *boards.Post, path string, indent string, levels int, budget *int) string- OID
- 0fb476…77f7:347
renderTopLevelReplies details
renderSubReplies
func(post *boards.Post, indent string, levels int, budget *int, desc bool) string- OID
- 0fb476…77f7:348
renderSubReplies details
renderEditReply
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:349
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:350
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:352
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:353
flatIndent details
renderThreadSummary
func(thread *boards.Post) string- OID
- 0fb476…77f7:354
renderThreadSummary details
renderCreateThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:355
renderCreateThread details
renderEditThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:356
renderEditThread details
renderRepostThread
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fb476…77f7:357
renderRepostThread details
makeBoardURI
func(b *boards.Board) string- OID
- 0fb476…77f7:358
makeBoardURI details
makeFreezeBoardURI
func(b *boards.Board) string- OID
- 0fb476…77f7:360
makeFreezeBoardURI details
makeUnfreezeBoardURI
func(b *boards.Board) string- OID
- 0fb476…77f7:361
makeUnfreezeBoardURI details
makeInviteMemberURI
func(b *boards.Board) string- OID
- 0fb476…77f7:362
makeInviteMemberURI details
makeCreateThreadURI
func(b *boards.Board) string- OID
- 0fb476…77f7:363
makeCreateThreadURI details
makeRequestInviteURI
func(b *boards.Board) string- OID
- 0fb476…77f7:364
makeRequestInviteURI details
makeThreadURI
func(p *boards.Post) string- OID
- 0fb476…77f7:365
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:367
makeThreadFlatURI details
makeReplyURI
func(p *boards.Post) string- OID
- 0fb476…77f7:368
makeReplyURI details
makeCreateReplyURI
func(p *boards.Post) string- OID
- 0fb476…77f7:369
makeCreateReplyURI details
makeCreateRepostURI
func(p *boards.Post) string- OID
- 0fb476…77f7:370
makeCreateRepostURI details
makeDeletePostURI
func(p *boards.Post) string- OID
- 0fb476…77f7:371
makeDeletePostURI details
makeEditPostURI
func(p *boards.Post) string- OID
- 0fb476…77f7:372
makeEditPostURI details
makeFlagURI
func(p *boards.Post) string- OID
- 0fb476…77f7:373
makeFlagURI details
makeFlaggingReasonsURI
func(p *boards.Post) string- OID
- 0fb476…77f7:374