func NewSafeBoard
NewSafeBoard creates a safe board.
NewSafeBoard creates a safe board.
NewSafeComment creates a safe comment.
NewSafeFlag creates a safe flag.
NewSafeThread creates a safe thread.
1type Board struct {
2 // id is the unique identifier of the board.
3 id uint64
4
5 // name is the current name of the board.
6 name string
7
8 // aliases contains a list of alternative names for the board.
9 aliases []string
10
11 // readonly indicates that the board is readonly.
12 readonly bool
13
14 // threadCount contains the number of threads within the board.
15 threadCount int
16
17 // memberCount contains the number of members of the board.
18 memberCount int
19
20 // creator is the account address that created the board.
21 creator address
22
23 // createdAt is the board's creation time as Unix time.
24 createdAt int64
25
26 // updatedAt is the board's update time as Unix time.
27 updatedAt int64
28}Board defines a safe type for boards.
Aliases returns the list of alternative names for the board.
CreatedAt returns the board's creation time as Unix time.
Creator returns the account address that created the board.
ID returns the unique identifier of the board.
MemberCount returns the number of members of the board.
Name returns the current name of the board.
Readonly indicates that the board is readonly.
ThreadCount returns the number of threads within the board.
UpdatedAt returns the board's update time as Unix time.
1type Comment struct {
2 // id is the unique identifier of the comment.
3 id uint64
4
5 // boardID is the board ID where comment is created.
6 boardID uint64
7
8 // threadID is the ID of the thread where comment is created.
9 threadID uint64
10
11 // parentID is the ID of the parent comment or reply.
12 parentID uint64
13
14 // body contains the comment's content.
15 body string
16
17 // hidden indicates that comment is hidden.
18 hidden bool
19
20 // replyCount contains the number of comments replies.
21 // Count only includes top level replies, sub-replies are not included.
22 replyCount int
23
24 // flagCount contains the number of flags that comment has.
25 flagCount int
26
27 // creator is the account address that created the comment or reply.
28 creator address
29
30 // createdAt is thread's creation time as Unix time.
31 createdAt int64
32
33 // updatedAt is thread's update time as Unix time.
34 updatedAt int64
35}Comment defines a type for threads comment/replies.
BoardID returns the board ID where the comment is created.
Body returns the comment's content.
CreatedAt returns the comment's creation time as Unix time.
Creator returns the account address that created the comment or reply.
FlagCount returns the number of flags that the comment has.
Hidden indicates that the comment is hidden.
ID returns the unique identifier of the comment.
ParentID returns the ID of the parent comment or reply.
ReplyCount returns the number of comment replies. Count only includes top level replies, sub-replies are not included.
ThreadID returns the ID of the thread where the comment is created.
UpdatedAt returns the comment's update time as Unix time.
Flag defines a type for thread and comment flags.
Member defines a type for board members.
1type Thread struct {
2 // id is the unique identifier of the thread.
3 id uint64
4
5 // originalBoardID contains the board ID of the original thread when current is a repost.
6 originalBoardID uint64
7
8 // originalThreadID contains the ID of the original thread when current is a repost.
9 originalThreadID uint64
10
11 // boardID is the board ID where thread is created.
12 boardID uint64
13
14 // title contains thread's title.
15 title string
16
17 // body contains content of the thread.
18 body string
19
20 // hidden indicates that thread is hidden.
21 hidden bool
22
23 // readonly indicates that thread is readonly.
24 readonly bool
25
26 // commentCount contains the number of thread comments.
27 // Count only includes top level comment, replies are not included.
28 commentCount int
29
30 // repostCount contains the number of times thread has been reposted.
31 repostCount int
32
33 // flagCount contains the number of flags that thread has.
34 flagCount int
35
36 // creator is the account address that created the thread.
37 creator address
38
39 // createdAt is thread's creation time as Unix time.
40 createdAt int64
41
42 // updatedAt is thread's update time as unix time.
43 updatedAt int64
44}Thread defines a type for board threads.
BoardID returns the board ID where the thread is created.
Body returns the content of the thread.
CommentCount returns the number of thread comments. Count only includes top level comment, replies are not included.
CreatedAt returns the thread's creation time as Unix time.
Creator returns the account address that created the thread.
FlagCount returns the number of flags that the thread has.
Hidden indicates that the thread is hidden.
ID returns the unique identifier of the thread.
OriginalBoardID returns the board ID of the original thread when current is a repost.
OriginalThreadID returns the ID of the original thread when current is a repost.
Readonly indicates that the thread is readonly.
RepostCount returns the number of times the thread has been reposted.
Title returns the thread's title.
UpdatedAt returns the thread's update time as Unix time.