repositories

package
v0.0.0-...-0497b7e Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCategory

func CreateCategory(name string, color string) (int64, error)

func CreateFollow

func CreateFollow(userID uint32, threadID uint32) (int64, error)

func CreatePost

func CreatePost(userID uint32, threadID uint32, content string) (int64, error)

func CreateThread

func CreateThread(userID uint32, title string, categoryID uint32) (int64, error)

func CreateThreadFollowNotification

func CreateThreadFollowNotification(userID uint32, content string, link string, threadID uint32, postID uint32) (int64, error)

func CreateUser

func CreateUser(username string, email string, password string, access int) (int64, error)

func DeleteCategory

func DeleteCategory(id uint32) error

func DeleteFollow

func DeleteFollow(userID uint32, threadID uint32) error

func DeleteFollowsByThreadID

func DeleteFollowsByThreadID(threadID uint32) error

func DeleteNotificationsByThreadID

func DeleteNotificationsByThreadID(threadID uint32) error

func DeletePostsByThreadID

func DeletePostsByThreadID(threadID uint32) error

func DeleteThread

func DeleteThread(id uint32) error

func GetAllThreadsByCategoryID

func GetAllThreadsByCategoryID(categoryID uint32) ([]*models.Thread, error)

func GetCategories

func GetCategories() ([]*models.Category, error)

func GetFollow

func GetFollow(userID uint32, threadID uint32) (*models.Follow, error)

func GetFollowsByThreadID

func GetFollowsByThreadID(threadID uint32) ([]*models.Follow, error)

func GetNotificationsByUserID

func GetNotificationsByUserID(userID uint32, page uint32, pageSize uint32) ([]*models.Notification, error)

func GetPost

func GetPost(id uint32) (*models.Post, error)

func GetPostsAndThreadsByUserID

func GetPostsAndThreadsByUserID(userID uint32, page uint32, pageSize uint32) ([]*models.PostAndThread, error)

func GetPostsByThreadID

func GetPostsByThreadID(threadID uint32, page uint32, pageSize uint32) ([]*models.Post, error)

func GetPostsByUserID

func GetPostsByUserID(userID uint32, page uint32, pageSize uint32) ([]*models.Post, error)

func GetSettings

func GetSettings() (map[string]string, error)

func GetThread

func GetThread(id uint32) (*models.Thread, error)

func GetThreads

func GetThreads(page uint32, pageSize uint32) ([]*models.Thread, error)

func GetThreadsByCategoryID

func GetThreadsByCategoryID(categoryID uint32, page uint32, pageSize uint32) ([]*models.Thread, error)

func GetUnseenNotificationCountByUserID

func GetUnseenNotificationCountByUserID(userID uint32) (int, error)

func GetUser

func GetUser(id uint32) (*models.User, error)

func GetUserByUsername

func GetUserByUsername(username string) (*models.User, error)

func MarkNotificationsSeen

func MarkNotificationsSeen(userID uint32, IDs []int) error

func UpdatePostContent

func UpdatePostContent(id uint32, content string) error

func UpdateSettings

func UpdateSettings(settings map[string]string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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