Documentation ¶
Index ¶
- func BumpThread(post *model.Post) error
- func DeleteOldThreads() error
- func DeletePost(data *model.DeleteData) error
- func GetIndex() ([]model.Post, error)
- func GetPost(id uint64) (*model.Post, error)
- func GetThread(id uint64) ([]model.Post, error)
- func SavePost(post *model.Post) (*model.DeleteData, error)
- func UpdatePost(data *model.UpdateData) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BumpThread ¶
BumpThread updates the parent thread from a given post.
func DeleteOldThreads ¶
func DeleteOldThreads() error
DeleteOldThreads deletes any thread that's fallen from the index.
func DeletePost ¶
func DeletePost(data *model.DeleteData) error
DeletePost returns an error that should be checked in the handler. Warning: if the post started a thread (parent_thread == nil), it will delete every post in the thread (parent_thread == id).
func SavePost ¶
func SavePost(post *model.Post) (*model.DeleteData, error)
SavePost returns a struct with the ID and delete code of the inserted post.
func UpdatePost ¶
func UpdatePost(data *model.UpdateData) error
UpdatePost returns an error that should be checked in the handler. Warning: the post must start a thread (parent_thread == nil), or else this will fail.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.