Documentation
¶
Index ¶
- Constants
- Variables
- func AddPostToSection(section *model.Section, post *model.Post) error
- func CountArticles() (int64, error)
- func CountGalleries() (int64, error)
- func CountUsers() (int64, error)
- func CreateArticle(article *model.Article) error
- func CreateFollowList(followList *model.FollowList) error
- func CreateGallery(gallery *model.Gallery) error
- func CreateImage(image *model.Image) error
- func CreateReport(report *model.Report) error
- func CreateSection(section *model.Section) error
- func CreateTag(tag *model.Tag) error
- func CreateUser(user *model.User) error
- func DeleteArticle(article *model.Article) error
- func DeleteGallery(gallery *model.Gallery) error
- func DeleteImage(image *model.Image) error
- func DeletePostByID(id uint64) error
- func DeleteSectionByUsernameAndName(username, name string) error
- func DeleteUser(user *model.User) error
- func FilterPostsInUserSection(posts []model.Post, username, section string) ([]model.Post, error)
- func FindAllArticlesByAuthorPaginated(author string, page, size int) ([]model.Article, error)
- func FindAllArticlesByTagPaginated(tag string, page, size int) ([]model.Article, error)
- func FindAllGalleriesByAuthorPaginated(author string, page, size int) ([]model.Gallery, error)
- func FindAllGalleriesByTagPaginated(tag string, page, size int) ([]model.Gallery, error)
- func FindAllPostsByqueryPaginated(page, size int, query string) ([]model.Post, error)
- func FindAllPostsPaginated(page, size int) ([]model.Post, error)
- func FindArticleByID(id uint64) (model.Article, error)
- func FindArticlesByQueryPaginated(query string, page, size int) ([]model.Article, error)
- func FindFollowListByUsername(username string) (model.FollowList, error)
- func FindFollowingPostsPaginated(user model.User, page, pageSize int) ([]model.Post, error)
- func FindGalleriesByQueryPaginated(query string, page, size int) ([]model.Gallery, error)
- func FindGalleryByID(id uint64) (model.Gallery, error)
- func FindImageByID(id uint64) (model.Image, error)
- func FindPaginatedPostsByTagOrderedByNumberOfVotes(tagName string, page, size int) ([]model.Post, error)
- func FindPostById(id uint64) (model.Post, error)
- func FindPostsByQueryPaginated(query string, page, size int) ([]model.Post, error)
- func FindPostsByUserAndSectionPaginated(username, section string, page, page_size int) ([]model.Post, error)
- func FindPostsByUserNotInSectionPaginated(username, section string, page, page_size int) ([]model.Post, error)
- func FindPostsByUserPaginated(username string, page, page_size int) ([]model.Post, error)
- func FindPostsPaginated(page, page_size int) ([]model.Post, error)
- func FindProjectByID(id uint64) (model.Project, error)
- func FindSectionByUsernameAndName(username, name string) (model.Section, error)
- func FindSectionsByUser(username string) ([]model.Section, error)
- func FindTagByName(name string) (model.Tag, error)
- func FindTagLikeName(name string, limit int) ([]model.Tag, error)
- func FindUserByEmail(email string) (model.User, error)
- func FindUserById(id uint64) (model.User, error)
- func FindUserByUsername(username string) (model.User, error)
- func FindUsersPaginated(page, pageSize int) ([]model.User, error)
- func FindUsersPaginatedBySearch(search string, page, pageSize int) ([]model.User, error)
- func FindVoteByTagAndUser(tagID uint64, username string) (model.Vote, error)
- func FollowUser(follower_follow_list *model.FollowList, followed *model.User) error
- func GetFirstFiftyMostVotedTagsForArticle(articleID uint64) ([]model.Tag, error)
- func GetFirstFiftyMostVotedTagsForGallery(galleryID uint64) ([]model.Tag, error)
- func GetReportByID(id uint64) (model.Report, error)
- func GetReportsPaginated(page, pageSize int) ([]model.Report, error)
- func Remigrate()
- func RemoveAllVotesForArticle(article *model.Article) error
- func RemoveAllVotesForGallery(gallery *model.Gallery) error
- func RemovePostFromSection(section *model.Section, post *model.Post) error
- func UnfollowUser(follower_follow_list *model.FollowList, followed *model.User) error
- func UnvoteTagForArticle(article *model.Article, vote *model.Vote) error
- func UnvoteTagForGallery(gallery *model.Gallery, vote *model.Vote) error
- func UpdateArticle(article *model.Article) error
- func UpdateGallery(gallery *model.Gallery) error
- func UpdateUser(user *model.User) error
- func VoteExistsForTagUserAndPost(tagID uint64, voter string, postID uint64, postType string) bool
- func VoteTagForArticle(article *model.Article, vote *model.Vote) error
- func VoteTagForGallery(gallery *model.Gallery, vote *model.Vote) error
Constants ¶
View Source
const ReplicasDirStr = "./replicas"
Variables ¶
View Source
var Connector *libsql.Connector
View Source
var DB *gorm.DB
View Source
var DBname = "dev.db"
View Source
var Replicas string
Functions ¶
func CountArticles ¶
func CountGalleries ¶
func CountUsers ¶
func CreateArticle ¶
func CreateFollowList ¶
func CreateFollowList(followList *model.FollowList) error
func CreateGallery ¶
func CreateImage ¶
func CreateReport ¶
func CreateSection ¶
func CreateUser ¶
func DeleteArticle ¶
func DeleteGallery ¶
func DeleteImage ¶
func DeletePostByID ¶
func DeleteUser ¶
func FindFollowListByUsername ¶
func FindFollowListByUsername(username string) (model.FollowList, error)
func FindVoteByTagAndUser ¶
func FollowUser ¶
func FollowUser(follower_follow_list *model.FollowList, followed *model.User) error
func RemovePostFromSection ¶
func UnfollowUser ¶
func UnfollowUser(follower_follow_list *model.FollowList, followed *model.User) error
func UpdateArticle ¶
func UpdateGallery ¶
func UpdateUser ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.