querydb

package
v0.0.0-...-fd0b6e6 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(user models.Username, hash models.Hash) (int32, error)

func Connect

func Connect(creds string, address string, database string) error

func CreateUser

func CreateUser(user models.Username, hash models.Hash) error

func DeletePost

func DeletePost(pid int32) error

func DeleteReply

func DeleteReply(cid int32) error

func GetCommentPoster

func GetCommentPoster(cid int32) (int32, error)

func GetComments

func GetComments(post_id int32) ([]models.Comment, error)

func GetPost

func GetPost(post_id int32) (models.Post, error)

func GetPostMD

func GetPostMD(post_id int32) (models.Post, error)

func GetPostOP

func GetPostOP(pid int32) (int32, string, string, error)

func GetSectionPosts

func GetSectionPosts(section string) ([]models.PostListing, error)

func GetTheme

func GetTheme(user_id int32) (models.Theme, error)

func GetUser

func GetUser(user_id int32) (models.Userlisted, error)

func LikeUnlike

func LikeUnlike(user_id int32, post_id int32) error

func Liked

func Liked(user_id int32, post_id int32) (bool, error)

func Likes

func Likes(user_id int32) ([]models.PostListing, error)

func MostLiked

func MostLiked(section models.Section) ([]models.PostListing, error)

func NewNotification

func NewNotification(to_uid int32, from_uid int32, message string) error

func NewPost

func NewPost(user_id int32, section string, status string, title string, md string, html string) (int32, error)

returns post id and error

func Notifications

func Notifications(user_id int32) ([]models.Notification, error)

func PostComment

func PostComment(user_id int32, parent_post int32, comment_post int32, md string, html string) (int32, error)

func RecentPosts

func RecentPosts() ([]models.PostListing, error)

func RecentUserPosts

func RecentUserPosts(user_id int32) ([]models.PostListing, error)
func Search(search_qry string) ([]models.PostListing, error)

func SetBio

func SetBio(user_id int32, bio string) error

func SetColor

func SetColor(user_id int32, fg string, bg string) error

func SetPFP

func SetPFP(user_id int32, filename string) error

func SetTheme

func SetTheme(user_id int32, primary_text string, secondary_text string, background string, border string) error

func UpdatePost

func UpdatePost(post_id int32, title string, md string, html string, section string) error

func UpdatePostStatus

func UpdatePostStatus(post_id int32, status string) error

func UserExists

func UserExists(username models.Username) int32

func UserPosts

func UserPosts(user_id int32, status string) ([]models.PostListing, error)

func Userinfo

func Userinfo(user_id int32) (models.User, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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