Versions in this module Expand all Collapse all v2 v2.9.3 Sep 18, 2024 Changes in this version + func CommentsWithinPage(pageKey string) func(liteDB) liteDB + func CommentsWithinSite(siteName string) func(liteDB) liteDB + func CommentsWithinSomeUsers(allAdminIDs []uint) func(liteDB) liteDB + func CommonScope(user entity.User) func(liteDB) liteDB + func ConvertGormScopes(funcs ...func(liteDB) liteDB) []func(*gorm.DB) *gorm.DB + func FindComments(dao *dao.Dao, opts QueryOptions, pg FindOptions) ([]entity.CookedComment, int64, int64) + func GetQueryScopes(dao *dao.Dao, opts QueryOptions) func(liteDB) liteDB + func GetSortSQL(scope Scope, sortBy SortRule) string + func NoPending(allowUserID ...uint) func(db liteDB) liteDB + func OnlyRoot() func(db *gorm.DB) *gorm.DB + func PageScopeQuery(payload PageScopePayload, opts PageScopeOpts) func(liteDB) liteDB + func SearchScope(dao *dao.Dao, keywords string) func(d liteDB) liteDB + func SiteScopeQuery(payload SitePayload, user entity.User) func(liteDB) liteDB + func UserScopeQuery(payload UserScopePayload, opts UserScopeOpts) func(liteDB) liteDB + type FindOptions struct + Limit int + Nested bool + Offset int + type PageScopeOpts struct + AdminUserIDs []uint + type PageScopePayload struct + PageKey string + SiteName string + Tags []PageScopeTag + type PageScopeTag string + const AdminOnly + type QueryOptions struct + PagePayload PageScopePayload + Scope Scope + Search string + SitePayload SitePayload + SortBy SortRule + User entity.User + UserPayload UserScopePayload + type Scope string + const ScopePage + const ScopeSite + const ScopeUser + type SitePayload struct + SiteName string + Type SiteScopeType + type SiteScopeType string + const SiteAll + const SitePending + type SortRule string + const SortByDateAsc + const SortByDateDesc + const SortByVote + type UserScopeOpts struct + GetUserComments func(userID uint) []uint + User entity.User + type UserScopePayload struct + Type UserScopeType + type UserScopeType string + const UserAll + const UserMentions + const UserMine + const UserPending