Documentation
¶
Index ¶
- Constants
- type Bump
- type BumpTimeDesc
- type Context
- type CreateTimeAsc
- type Cursor
- type DeleteInfo
- type Forum
- func (f Forum) CreateDraftReply(ctx context.Context, s []string, body string, author string) (string, error)
- func (f Forum) CreateReply(ctx Context, parent []PostID, subject string, body string, author User) ([]PostID, error)
- func (f Forum) CreateSection(ctx Context, subject string, description string, index int, author User) ([]PostID, error)
- func (f Forum) CreateThread(ctx Context, subject string, body string, author User, sectionId PostID) ([]PostID, error)
- func (f Forum) DeleteReply(ctx context.Context, path []string, s string) error
- func (f Forum) DeleteSection(ctx context.Context, sectionID string, user User, reason string) error
- func (f Forum) DeleteThread(ctx context.Context, threadID string, user User, reason string) error
- func (f Forum) GetReplies(ctx Context, thread PostID, cursor Cursor, n int) ([]*Post, error)
- func (f Forum) GetSections(ctx Context) ([]*Post, error)
- func (f Forum) GetThreads(ctx Context, section PostID, cursor Cursor, n int) ([]*Post, Cursor, error)
- func (f Forum) InstallReply(ctx context.Context, userID string, docID string) error
- func (f Forum) ListReplies(ctx context.Context, threadID string) ([]*Post, error)
- func (f Forum) ListThreads(ctx context.Context, sectionID string) ([]*Post, error)
- func (f Forum) UpdateReply(ctx context.Context, replyID string, body string) error
- func (f Forum) UpdateThread(ctx context.Context, threadID string, subject string, body string) error
- type IndexAsc
- type Order
- type Post
- type PostID
- type User
Constants ¶
View Source
const ( MaxDepth = 100 Root = "Posts" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BumpTimeDesc ¶
type BumpTimeDesc struct {
// contains filtered or unexported fields
}
func (*BumpTimeDesc) Next ¶
func (tc *BumpTimeDesc) Next(post *Post) Cursor
type CreateTimeAsc ¶
type CreateTimeAsc struct {
// contains filtered or unexported fields
}
func (*CreateTimeAsc) Next ¶
func (tc *CreateTimeAsc) Next(post *Post) Cursor
type Forum ¶
type Forum struct {
// contains filtered or unexported fields
}
func (Forum) CreateDraftReply ¶
func (Forum) CreateReply ¶
func (Forum) CreateSection ¶
func (Forum) CreateThread ¶
func (Forum) DeleteReply ¶
func (Forum) DeleteSection ¶
func (Forum) DeleteThread ¶
func (Forum) GetReplies ¶
func (Forum) GetThreads ¶
func (f Forum) GetThreads(ctx Context, section PostID, cursor Cursor, n int) ([]*Post, Cursor, error)
GetThreads retrieves threads, most-recently-bumped thread first.
func (Forum) InstallReply ¶
func (Forum) ListReplies ¶
func (Forum) ListThreads ¶
func (Forum) UpdateReply ¶
type Post ¶
type Post struct { Path []PostID // Path to this post, from root down. Index int // For explicit ordering Parent PostID // ID of the parent of this post (same as next-to-last element of Path) Head string // Subject or summary of post Body string // Body of post (HTML) Author User // ID of author Bump *Bump // Most recent change to tree rooted here. ChildCount int // Number of direct children DescendentCount int // Number of direct and indirect children ViewCount int // Number of times this post has been viewed Deleted *DeleteInfo CreateTime time.Time `firestore:",serverTimestamp"` // Time this post was created. EditTime time.Time `firestore:",serverTimestamp"` // Last time the header or body were edited }
Click to show internal directories.
Click to hide internal directories.