Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Board ¶
type Board struct { Name string `json:"name"` Descr string `json:"description"` Style string `json:"style"` ThreadsMax int `json:"maxThreads,omitempty"` ThreadLengthMax int `json:"maxThreadLength,omitempty"` PostBytesMax int `json:"maxPostBytes,omitempty"` }
Board contains the configured settings for a board.
func (Board) MaxPostBytes ¶
MaxPostBytes returns the maximum length (in bytes) for post content on this board.
func (Board) MaxThreadLength ¶
MaxThreadLength returns the maximum number of posts a thread can have and be considered active.
func (Board) MaxThreads ¶
MaxThreads returns the maximum number of active threads to be displayed on this board.
type BoardOverview ¶
type BoardOverview struct { Board // embedded Threads []ThreadSummary `json:"threads"` }
BoardOverview contains superficial board data.
type Post ¶
type Post struct { ID int64 `json:"id"` Author string `json:"author"` Timestamp time.Time `json:"timestamp"` Content string `json:"content"` }
Post contains all data of a single post.
type Thread ¶
type Thread struct { Board Board `json:"board"` Topic string `json:"topic"` Posts []Post `json:"posts"` }
Thread contains all data of a single thread.
func (Thread) NumReplies ¶
NumReplies returns the number of replies this thread has received.
type ThreadSummary ¶
type ThreadSummary struct { Topic string `json:"topic"` OP Post `json:"op"` NumReplies int `json:"numReplies"` Active time.Time `json:"active"` }
ThreadSummary contains superficial thread data.
func (ThreadSummary) ID ¶
func (t ThreadSummary) ID() int64
ID returns the thread's associated ID, i.e. the OP's post ID.