db

package
v0.0.0-...-cf2bd73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

func Close

func Close()

func CountForums

func CountForums() (count int32)

func CountPosts

func CountPosts() (count int64)

func CountThreads

func CountThreads() (count int32)

func CountUsers

func CountUsers() (count int32)

func CreateForum

func CreateForum(srcForum *models.Forum) (forum *models.Forum, status int)

func CreatePosts

func CreatePosts(srcPosts []models.Post, threadSlug string) (posts []models.Post, status int)

func CreateThread

func CreateThread(srcThread *models.Thread) (threadNew *models.Thread, status int)

func CreateUser

func CreateUser(profile *models.User) (users []models.User, ok bool)

func GetForumDetails

func GetForumDetails(slug string) (forum *models.Forum, status int)

func GetForumUsers

func GetForumUsers(slug string, limit int32, sinceNickname string, desc bool) (users []models.User, status int)

func GetPost

func GetPost(postId int64, withAuthor bool, withThread bool, withForum bool) (postInfo *models.PostFull, status int)

func GetPosts

func GetPosts(threadSlug string, limit int32, since int, desc bool, sortString string) (posts []models.Post, status int)

func GetThread

func GetThread(threadSlug string) (thread *models.Thread, status int)

func GetThreads

func GetThreads(slug string, limit int32, sinceString string, desc bool) (threads []models.Thread, status int)

func GetUser

func GetUser(nickname string) (user *models.User, ok bool)

func InitDB

func InitDB(config pgx.ConnConfig)

func ModifyPost

func ModifyPost(postUpdate *models.PostUpdate, postId int64) (post *models.Post, status int)

func ModifyThread

func ModifyThread(threadUpdate *models.ThreadUpdate, threadSlug string) (thread *models.Thread, status int)

func UpdateUser

func UpdateUser(srcUser *models.User) (user *models.User, status int)

func VoteThread

func VoteThread(vote *models.Vote, threadSlug string) (thread *models.Thread, status int)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL