Documentation
¶
Index ¶
- Constants
- Variables
- func Connect(ctx context.Context, connectionString string) (*pgxpool.Pool, error)
- func CountBooks(ctx context.Context, db DBTX, req BookSearchRequest, limit uint) (int64, error)
- func CountTags(ctx context.Context, db DBTX, req ListTagsQuery) (int64, error)
- func CountUsers(ctx context.Context, db DBTX, req *UsersQuery) (int64, error)
- func PGArrayExpr[T any](arr []T) goqu.Expression
- type AgeRating
- type Analytics_GetChapterViewsParams
- type Analytics_GetChapterViewsRow
- type Analytics_GetMostViewedBooksByBookViewsOnlyParams
- type Analytics_GetMostViewedBooksByBookViewsOnlyRow
- type Analytics_GetViewsParams
- type Analytics_GetViewsRow
- type Analytics_GetViews_MultipleParams
- type Analytics_GetViews_MultipleRow
- type Analytics_IncrViewParams
- type Book
- type BookActionType
- type BookChapter
- type BookLog
- type BookSearchFilter
- type BookSearchRequest
- type BookSearchRow
- type BookSetCoverParams
- type BookStats
- type Book_Book_ManagerGetUserBooksCountParams
- type Book_GetByUserParams
- type Book_GetChapterOrderRow
- type Book_GetPubliclyVisibleChaptersRow
- type Book_InsertChapterParams
- type Book_InsertParams
- type Book_ManagerGetUserBooksParams
- type Book_ManagerGetUserBooksRow
- type Book_SetChapterOrderParams
- type Book_UnTrashParams
- type CensorMode
- type Chapter_UpdateParams
- type Collection
- type CollectionBook
- type Collection_AddBookToCollectionParams
- type Collection_DeleteBookFromCollectionParams
- type Collection_GetBooksParams
- type Collection_GetBooksRow
- type Collection_GetByBookParams
- type Collection_GetByBookRow
- type Collection_GetByUserParams
- type Collection_GetByUserRow
- type Collection_GetRecentByUserParams
- type Collection_GetRow
- type Collection_InsertParams
- type Collection_UpdateParams
- type Comment
- type Comment_GetByChapterAfterParams
- type Comment_GetByChapterAfterRow
- type Comment_GetByChapterParams
- type Comment_GetByChapterRow
- type Comment_GetChildCommentsAfterParams
- type Comment_GetChildCommentsAfterRow
- type Comment_GetChildCommentsParams
- type Comment_GetChildCommentsRow
- type Comment_GetLikedCommentsParams
- type Comment_GetLikedCommentsRow
- type Comment_GetWithUserByIDRow
- type Comment_InsertParams
- type Comment_LikeParams
- type Comment_UnLikeParams
- type Comment_UpdateParams
- type CommentsLiked
- type DBTX
- type DefinedTag
- type DeleteRateParams
- type DeleteReviewParams
- type DeleteUserFollowParams
- type Draft
- type DraftLog
- type Draft_GetByIdRow
- type Draft_InsertParams
- type Draft_UpdateChapterNameParams
- type Draft_UpdateContentParams
- type Draft_UpdateParams
- type EmailVerification
- type EmailVerification_InsertParams
- type GetAllBookChaptersRow
- type GetAllBooksParams
- type GetAllBooksRow
- type GetBookChapterWithDetailsParams
- type GetBookChapterWithDetailsRow
- type GetBookCollectionDataRow
- type GetBookReadingListStateParams
- type GetBookReadingListStateRow
- type GetBookReviewsDistributionRow
- type GetBookReviewsParams
- type GetBookReviewsRow
- type GetBookRow
- type GetBookSearchRelatedDataRow
- type GetBooksCollectionDataRow
- type GetRateParams
- type GetRatingParams
- type GetReviewAndRatingParams
- type GetReviewAndRatingRow
- type GetReviewParams
- type GetTagRow
- type GetTopUserBooksParams
- type GetUserLibraryParams
- type GetUserLibraryRow
- type GetUserPrivacySettingsRow
- type InsertDefinedTagEnMasseParams
- type InsertDefinedTagParams
- type InsertOrUpdateRateParams
- type InsertOrUpdateReviewParams
- type Int4Range
- type ListTagsQuery
- type ModAddBookLogParams
- type ModCountBookLogFilteredParams
- type ModGetBookInfoRow
- type ModGetBookLogFilteredParams
- type ModGetBookLogFilteredRow
- type ModGetBookLogOfTypeParams
- type ModGetBookLogParams
- type ModGetBookModStateRow
- type ModPermRemoveBookParams
- type ModSetBookBannedParams
- type ModSetBookShadowBannedParams
- type NullAgeRating
- type NullBookActionType
- type NullCensorMode
- type NullReadingListStatus
- type NullTagType
- type NullTypeOf2fa
- type NullUserActionType
- type NullUserRole
- type OlAnalyticsViewCounter
- type Queries
- func (q *Queries) Analytics_GetChapterViews(ctx context.Context, arg Analytics_GetChapterViewsParams) ([]Analytics_GetChapterViewsRow, error)
- func (q *Queries) Analytics_GetMostViewedBooksByBookViewsOnly(ctx context.Context, arg Analytics_GetMostViewedBooksByBookViewsOnlyParams) ([]Analytics_GetMostViewedBooksByBookViewsOnlyRow, error)
- func (q *Queries) Analytics_GetTotalViews(ctx context.Context, bookID int64) (int64, error)
- func (q *Queries) Analytics_GetViews(ctx context.Context, arg Analytics_GetViewsParams) ([]Analytics_GetViewsRow, error)
- func (q *Queries) Analytics_GetViews_Multiple(ctx context.Context, arg Analytics_GetViews_MultipleParams) ([]Analytics_GetViews_MultipleRow, error)
- func (q *Queries) Analytics_IncrView(ctx context.Context, arg Analytics_IncrViewParams) error
- func (q *Queries) BookSetCover(ctx context.Context, arg BookSetCoverParams) error
- func (q *Queries) Book_Book_ManagerGetUserBooksCount(ctx context.Context, arg Book_Book_ManagerGetUserBooksCountParams) (int64, error)
- func (q *Queries) Book_GetByIds(ctx context.Context, ids []int64) ([]Book, error)
- func (q *Queries) Book_GetByUser(ctx context.Context, arg Book_GetByUserParams) ([]Book, error)
- func (q *Queries) Book_GetChapterOrder(ctx context.Context, bookID int64) ([]Book_GetChapterOrderRow, error)
- func (q *Queries) Book_GetFirstChapterID(ctx context.Context, bookID int64) (int64, error)
- func (q *Queries) Book_GetLastChapterOrder(ctx context.Context, bookID int64) (int32, error)
- func (q *Queries) Book_GetPubliclyVisibleChapters(ctx context.Context, bookID int64) ([]Book_GetPubliclyVisibleChaptersRow, error)
- func (q *Queries) Book_Insert(ctx context.Context, arg Book_InsertParams) error
- func (q *Queries) Book_InsertChapter(ctx context.Context, arg Book_InsertChapterParams) error
- func (q *Queries) Book_ManagerGetUserBooks(ctx context.Context, arg Book_ManagerGetUserBooksParams) ([]Book_ManagerGetUserBooksRow, error)
- func (q *Queries) Book_SetChapterOrder(ctx context.Context, arg Book_SetChapterOrderParams) error
- func (q *Queries) Book_Trash(ctx context.Context, id int64) error
- func (q *Queries) Book_UnTrash(ctx context.Context, arg Book_UnTrashParams) error
- func (q *Queries) Chapter_Update(ctx context.Context, arg Chapter_UpdateParams) (int64, error)
- func (q *Queries) Collection_AddBookToCollection(ctx context.Context, arg Collection_AddBookToCollectionParams) error
- func (q *Queries) Collection_CountBooks(ctx context.Context, collectionID int64) (int64, error)
- func (q *Queries) Collection_CountByUser(ctx context.Context, userID pgtype.UUID) (int64, error)
- func (q *Queries) Collection_Delete(ctx context.Context, id int64) error
- func (q *Queries) Collection_DeleteAllBooks(ctx context.Context, collectionID int64) error
- func (q *Queries) Collection_DeleteBookFromCollection(ctx context.Context, arg Collection_DeleteBookFromCollectionParams) error
- func (q *Queries) Collection_Get(ctx context.Context, id int64) (Collection_GetRow, error)
- func (q *Queries) Collection_GetBooks(ctx context.Context, arg Collection_GetBooksParams) ([]Collection_GetBooksRow, error)
- func (q *Queries) Collection_GetByBook(ctx context.Context, arg Collection_GetByBookParams) ([]Collection_GetByBookRow, error)
- func (q *Queries) Collection_GetByUser(ctx context.Context, arg Collection_GetByUserParams) ([]Collection_GetByUserRow, error)
- func (q *Queries) Collection_GetMaxOrder(ctx context.Context, collectionID int64) (int32, error)
- func (q *Queries) Collection_GetRecentByUser(ctx context.Context, arg Collection_GetRecentByUserParams) ([]Collection, error)
- func (q *Queries) Collection_Insert(ctx context.Context, arg Collection_InsertParams) error
- func (q *Queries) Collection_RecalculateCounter(ctx context.Context, collectionID int64) error
- func (q *Queries) Collection_Update(ctx context.Context, arg Collection_UpdateParams) error
- func (q *Queries) Collections_ListByID(ctx context.Context, dollar_1 []int64) ([]Collection, error)
- func (q *Queries) Comment_GetByChapter(ctx context.Context, arg Comment_GetByChapterParams) ([]Comment_GetByChapterRow, error)
- func (q *Queries) Comment_GetByChapterAfter(ctx context.Context, arg Comment_GetByChapterAfterParams) ([]Comment_GetByChapterAfterRow, error)
- func (q *Queries) Comment_GetByID(ctx context.Context, id int64) (Comment, error)
- func (q *Queries) Comment_GetChildComments(ctx context.Context, arg Comment_GetChildCommentsParams) ([]Comment_GetChildCommentsRow, error)
- func (q *Queries) Comment_GetChildCommentsAfter(ctx context.Context, arg Comment_GetChildCommentsAfterParams) ([]Comment_GetChildCommentsAfterRow, error)
- func (q *Queries) Comment_GetLikedComments(ctx context.Context, arg Comment_GetLikedCommentsParams) ([]Comment_GetLikedCommentsRow, error)
- func (q *Queries) Comment_GetWithUserByID(ctx context.Context, id int64) (Comment_GetWithUserByIDRow, error)
- func (q *Queries) Comment_Insert(ctx context.Context, arg Comment_InsertParams) error
- func (q *Queries) Comment_Like(ctx context.Context, arg Comment_LikeParams) error
- func (q *Queries) Comment_RecalculateSubcomments(ctx context.Context, id pgtype.Int8) error
- func (q *Queries) Comment_UnLike(ctx context.Context, arg Comment_UnLikeParams) error
- func (q *Queries) Comment_Update(ctx context.Context, arg Comment_UpdateParams) (pgconn.CommandTag, error)
- func (q *Queries) DefinedTagsAreInitialized(ctx context.Context) (bool, error)
- func (q *Queries) DeleteInactive2FADevices(ctx context.Context, createdAt pgtype.Timestamptz) error
- func (q *Queries) DeleteRate(ctx context.Context, arg DeleteRateParams) error
- func (q *Queries) DeleteReview(ctx context.Context, arg DeleteReviewParams) error
- func (q *Queries) DeleteUserFollow(ctx context.Context, arg DeleteUserFollowParams) error
- func (q *Queries) Draft_Delete(ctx context.Context, id int64) error
- func (q *Queries) Draft_GetById(ctx context.Context, id int64) (Draft_GetByIdRow, error)
- func (q *Queries) Draft_GetLatestID(ctx context.Context, chapterID int64) (int64, error)
- func (q *Queries) Draft_Insert(ctx context.Context, arg Draft_InsertParams) error
- func (q *Queries) Draft_MarkAsPublished(ctx context.Context, id int64) error
- func (q *Queries) Draft_Update(ctx context.Context, arg Draft_UpdateParams) error
- func (q *Queries) Draft_UpdateChapterName(ctx context.Context, arg Draft_UpdateChapterNameParams) error
- func (q *Queries) Draft_UpdateContent(ctx context.Context, arg Draft_UpdateContentParams) error
- func (q *Queries) EmailVerification_Delete(ctx context.Context, email string) error
- func (q *Queries) EmailVerification_Get(ctx context.Context, email string) (EmailVerification, error)
- func (q *Queries) EmailVerification_Insert(ctx context.Context, arg EmailVerification_InsertParams) error
- func (q *Queries) GetAllBookChapters(ctx context.Context, bookID int64) ([]GetAllBookChaptersRow, error)
- func (q *Queries) GetAllBooks(ctx context.Context, arg GetAllBooksParams) ([]GetAllBooksRow, error)
- func (q *Queries) GetBook(ctx context.Context, id int64) (GetBookRow, error)
- func (q *Queries) GetBookChapterWithDetails(ctx context.Context, arg GetBookChapterWithDetailsParams) (GetBookChapterWithDetailsRow, error)
- func (q *Queries) GetBookCollectionData(ctx context.Context, bookID int64) ([]GetBookCollectionDataRow, error)
- func (q *Queries) GetBookReadingListState(ctx context.Context, arg GetBookReadingListStateParams) (GetBookReadingListStateRow, error)
- func (q *Queries) GetBookReviews(ctx context.Context, arg GetBookReviewsParams) ([]GetBookReviewsRow, error)
- func (q *Queries) GetBookReviewsDistribution(ctx context.Context, bookID int64) ([]GetBookReviewsDistributionRow, error)
- func (q *Queries) GetBookSearchRelatedData(ctx context.Context, ids []int64) ([]GetBookSearchRelatedDataRow, error)
- func (q *Queries) GetBooksCollectionData(ctx context.Context, dollar_1 []int64) ([]GetBooksCollectionDataRow, error)
- func (q *Queries) GetChapterBookID(ctx context.Context, id int64) (int64, error)
- func (q *Queries) GetChaptersOrder(ctx context.Context, bookID int64) ([]int64, error)
- func (q *Queries) GetFirstChapterID(ctx context.Context, bookID int64) (int64, error)
- func (q *Queries) GetLastChapterID(ctx context.Context, bookID int64) (int64, error)
- func (q *Queries) GetRandomPublicBookIDs(ctx context.Context, limit int32) ([]int64, error)
- func (q *Queries) GetRate(ctx context.Context, arg GetRateParams) (int16, error)
- func (q *Queries) GetRating(ctx context.Context, arg GetRatingParams) (Rating, error)
- func (q *Queries) GetReview(ctx context.Context, arg GetReviewParams) (Review, error)
- func (q *Queries) GetReviewAndRating(ctx context.Context, arg GetReviewAndRatingParams) (GetReviewAndRatingRow, error)
- func (q *Queries) GetTag(ctx context.Context, id int64) (GetTagRow, error)
- func (q *Queries) GetTagParent(ctx context.Context, id int64) (DefinedTag, error)
- func (q *Queries) GetTagsByIds(ctx context.Context, ids []int64) ([]DefinedTag, error)
- func (q *Queries) GetTagsByName(ctx context.Context, names []string) ([]DefinedTag, error)
- func (q *Queries) GetTopUserBooks(ctx context.Context, arg GetTopUserBooksParams) ([]Book, error)
- func (q *Queries) GetUserLibrary(ctx context.Context, arg GetUserLibraryParams) ([]GetUserLibraryRow, error)
- func (q *Queries) GetUserPrivacySettings(ctx context.Context, id pgtype.UUID) (GetUserPrivacySettingsRow, error)
- func (q *Queries) ImportTags(ctx context.Context, dollar_1 []byte) error
- func (q *Queries) InsertDefinedTag(ctx context.Context, arg InsertDefinedTagParams) error
- func (q *Queries) InsertDefinedTagEnMasse(ctx context.Context, arg []InsertDefinedTagEnMasseParams) (int64, error)
- func (q *Queries) InsertOrUpdateRate(ctx context.Context, arg InsertOrUpdateRateParams) error
- func (q *Queries) InsertOrUpdateReview(ctx context.Context, arg InsertOrUpdateReviewParams) (Review, error)
- func (q *Queries) ModAddBookLog(ctx context.Context, arg ModAddBookLogParams) error
- func (q *Queries) ModCountBookLogFiltered(ctx context.Context, arg ModCountBookLogFilteredParams) (int64, error)
- func (q *Queries) ModGetBookInfo(ctx context.Context, id int64) (ModGetBookInfoRow, error)
- func (q *Queries) ModGetBookLog(ctx context.Context, arg ModGetBookLogParams) ([]BookLog, error)
- func (q *Queries) ModGetBookLogFiltered(ctx context.Context, arg ModGetBookLogFilteredParams) ([]ModGetBookLogFilteredRow, error)
- func (q *Queries) ModGetBookLogOfType(ctx context.Context, arg ModGetBookLogOfTypeParams) ([]BookLog, error)
- func (q *Queries) ModGetBookModState(ctx context.Context, id int64) (ModGetBookModStateRow, error)
- func (q *Queries) ModPermRemoveBook(ctx context.Context, arg ModPermRemoveBookParams) error
- func (q *Queries) ModSetBookBanned(ctx context.Context, arg ModSetBookBannedParams) error
- func (q *Queries) ModSetBookShadowBanned(ctx context.Context, arg ModSetBookShadowBannedParams) error
- func (q *Queries) RecalculateBookRating(ctx context.Context, bookID int64) error
- func (q *Queries) RecalculateBookStats(ctx context.Context, id int64) error
- func (q *Queries) RemoveUnusedDefaultTags(ctx context.Context, names []string) error
- func (q *Queries) SearchDefinedTags(ctx context.Context, arg SearchDefinedTagsParams) ([]DefinedTag, error)
- func (q *Queries) SearchDefinedTagsWithType(ctx context.Context, arg SearchDefinedTagsWithTypeParams) ([]DefinedTag, error)
- func (q *Queries) Session_GetInfo(ctx context.Context, sid string) (Session_GetInfoRow, error)
- func (q *Queries) Session_GetUserSessions(ctx context.Context, userID pgtype.UUID) ([]Session_GetUserSessionsRow, error)
- func (q *Queries) Session_Insert(ctx context.Context, arg Session_InsertParams) error
- func (q *Queries) Session_Terminate(ctx context.Context, sid string) error
- func (q *Queries) Session_TerminateAllByUserID(ctx context.Context, userID pgtype.UUID) error
- func (q *Queries) SetBookReadingListChapter(ctx context.Context, arg SetBookReadingListChapterParams) error
- func (q *Queries) SetBookReadingListStatus(ctx context.Context, arg SetBookReadingListStatusParams) (ReadingList, error)
- func (q *Queries) SetBookReadingListStatusAndChapter(ctx context.Context, arg SetBookReadingListStatusAndChapterParams) (ReadingList, error)
- func (q *Queries) SiteConfig_Get(ctx context.Context) ([]byte, error)
- func (q *Queries) SiteConfig_Set(ctx context.Context, value []byte) error
- func (q *Queries) UpdateBook(ctx context.Context, arg UpdateBookParams) error
- func (q *Queries) UpdateTag(ctx context.Context, arg UpdateTagParams) error
- func (q *Queries) User_ExistsByEmail(ctx context.Context, email string) (bool, error)
- func (q *Queries) User_ExistsByUsername(ctx context.Context, name string) (bool, error)
- func (q *Queries) User_FindByLogin(ctx context.Context, name string) (User, error)
- func (q *Queries) User_Get(ctx context.Context, id pgtype.UUID) (User, error)
- func (q *Queries) User_Get2FADevices(ctx context.Context, userID pgtype.UUID) ([]User2fa, error)
- func (q *Queries) User_GetAboutSettings(ctx context.Context, id pgtype.UUID) (User_GetAboutSettingsRow, error)
- func (q *Queries) User_GetCustomizationSettings(ctx context.Context, id pgtype.UUID) (User_GetCustomizationSettingsRow, error)
- func (q *Queries) User_GetDetails(ctx context.Context, arg User_GetDetailsParams) (User_GetDetailsRow, error)
- func (q *Queries) User_GetModerationSettings(ctx context.Context, id pgtype.UUID) (User_GetModerationSettingsRow, error)
- func (q *Queries) User_GetNames(ctx context.Context, ids []pgtype.UUID) ([]User_GetNamesRow, error)
- func (q *Queries) User_Insert(ctx context.Context, arg User_InsertParams) error
- func (q *Queries) User_InsertFollow(ctx context.Context, arg User_InsertFollowParams) error
- func (q *Queries) User_IsFollowing(ctx context.Context, arg User_IsFollowingParams) (bool, error)
- func (q *Queries) User_SetEmailVerified(ctx context.Context, arg User_SetEmailVerifiedParams) error
- func (q *Queries) User_UpdateAboutSettings(ctx context.Context, arg User_UpdateAboutSettingsParams) error
- func (q *Queries) User_UpdateCustomizationSettings(ctx context.Context, arg User_UpdateCustomizationSettingsParams) error
- func (q *Queries) User_UpdateModerationSettings(ctx context.Context, arg User_UpdateModerationSettingsParams) error
- func (q *Queries) User_UpdatePassword(ctx context.Context, arg User_UpdatePasswordParams) error
- func (q *Queries) User_UpdatePrivacySettings(ctx context.Context, arg User_UpdatePrivacySettingsParams) error
- func (q *Queries) User_UpdateRole(ctx context.Context, arg User_UpdateRoleParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Rating
- type ReadingList
- type ReadingListHistory
- type ReadingListStatus
- type Review
- type SearchDefinedTagsParams
- type SearchDefinedTagsWithTypeParams
- type Session
- type Session_GetInfoRow
- type Session_GetUserSessionsRow
- type Session_InsertParams
- type SetBookReadingListChapterParams
- type SetBookReadingListStatusAndChapterParams
- type SetBookReadingListStatusParams
- type SiteConfig
- type TagRow
- type TagType
- type TypeOf2fa
- type UpdateBookParams
- type UpdateTagParams
- type User
- type User2fa
- type UserActionType
- type UserBan
- type UserFollower
- type UserLog
- type UserRole
- type UserRow
- type User_GetAboutSettingsRow
- type User_GetCustomizationSettingsRow
- type User_GetDetailsParams
- type User_GetDetailsRow
- type User_GetModerationSettingsRow
- type User_GetNamesRow
- type User_InsertFollowParams
- type User_InsertParams
- type User_IsFollowingParams
- type User_SetEmailVerifiedParams
- type User_UpdateAboutSettingsParams
- type User_UpdateCustomizationSettingsParams
- type User_UpdateModerationSettingsParams
- type User_UpdatePasswordParams
- type User_UpdatePrivacySettingsParams
- type User_UpdateRoleParams
- type UsersQuery
Constants ¶
View Source
const ( ANALYTICS_VIEW_COUNTER_TYPE_BOOK int16 = 0 ANALYTICS_VIEW_COUNTER_TYPE_CHAPTER int16 = 1 )
Variables ¶
View Source
var ErrNoRows = pgx.ErrNoRows
Functions ¶
func CountBooks ¶
func CountUsers ¶
func PGArrayExpr ¶
func PGArrayExpr[T any](arr []T) goqu.Expression
PGArrayExpr takes a slice of items and returns a literal expression with a Postgres array that can be used by goqu. It does this by using goqu natively and then manipulating the string to surround it in an array literal.
To use this in a struct, you can do something like:
type MyModel struct {
Tags []string `json:"tags" db:"-"`
DbTags goqu.Expression `json:"-" db:"tags"`
}
body := `{"tags":["x", "y"]}`
m := MyModel{}
_ = json.Unmarshal([]byte(body), &m)
m.DbTags = goqux.PGArrayExpr(m.Tags)
sql, _, _ := goqu.Insert("modeltable").Rows(m).ToSQL()
Types ¶
type Analytics_GetViewsRow ¶
type Book ¶
type Book struct {
ID int64
Name string
Slug string
Summary string
AuthorUserID pgtype.UUID
CreatedAt pgtype.Timestamptz
AgeRating AgeRating
IsPubliclyVisible bool
IsBanned bool
IsTrashed bool
Words int32
Chapters int32
TagIds []int64
CachedParentTagIds []int64
Cover string
View int32
Rating pgtype.Float8
TotalReviews int32
TotalRatings int32
IsPinned bool
IsPermRemoved bool
IsShadowBanned bool
}
type BookActionType ¶
type BookActionType string
const ( BookActionTypeSignificantUpdate BookActionType = "significant_update" BookActionTypeAuthorTransfer BookActionType = "author_transfer" BookActionTypeBan BookActionType = "ban" BookActionTypeShadowBan BookActionType = "shadow_ban" BookActionTypePermRemoval BookActionType = "perm_removal" BookActionTypeUnBan BookActionType = "un_ban" BookActionTypeUnShadowBan BookActionType = "un_shadow_ban" BookActionTypeReindex BookActionType = "reindex" )
func (*BookActionType) Scan ¶
func (e *BookActionType) Scan(src interface{}) error
type BookChapter ¶
type BookChapter struct {
ID int64
Name string
BookID int64
Content string
ContentUpdatedAt pgtype.Timestamptz
Order int32
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
Words int32
IsAdultOverride bool
Summary string
IsPubliclyVisible bool
}
type BookLog ¶
type BookLog struct {
ID int64
Time pgtype.Timestamptz
BookID int64
ActionType BookActionType
Payload []byte
ActorUserID pgtype.UUID
Reason string
}
type BookSearchFilter ¶
type BookSearchRequest ¶
type BookSearchRequest struct {
BookSearchFilter
Page uint
PageSize uint
}
type BookSearchRow ¶
type BookSearchRow struct {
ID int64 `db:"id"`
Name string `db:"name"`
Summary string `db:"summary"`
CreatedAt pgtype.Timestamptz `db:"created_at"`
AgeRating AgeRating `db:"age_rating"`
Words int `db:"words"`
Chapters int `db:"chapters"`
TagIds []int64 `db:"tag_ids"`
CachedParentTagIds []int64 `db:"cached_parent_tag_ids"`
AuthorUserID pgtype.UUID `db:"author_user_id"`
AuthorName string `db:"author_name"`
HasCover bool `db:"has_cover"`
}
func SearchBooks ¶
func SearchBooks(ctx context.Context, db DBTX, req BookSearchRequest) ([]BookSearchRow, error)
type BookSetCoverParams ¶
type BookStats ¶
type BookStats struct {
ChaptersMin int64 `db:"chapters_min"`
ChaptersMax int64 `db:"chapters_max"`
WordsMin int64 `db:"words_min"`
WordsMax int64 `db:"words_max"`
WordsPerChapterMin int64 `db:"words_per_chapter_min"`
WordsPerChapterMax int64 `db:"words_per_chapter_max"`
FavoritesMin int64 `db:"favorites_min"`
FavoritesMax int64 `db:"favorites_max"`
}
func GetBooksFilterExtremes ¶
type Book_GetByUserParams ¶
type Book_GetChapterOrderRow ¶
type Book_InsertParams ¶
type Book_ManagerGetUserBooksRow ¶
type Book_ManagerGetUserBooksRow struct {
ID int64
Name string
Slug string
Summary string
AuthorUserID pgtype.UUID
CreatedAt pgtype.Timestamptz
AgeRating AgeRating
IsPubliclyVisible bool
IsBanned bool
IsTrashed bool
Words int32
Chapters int32
TagIds []int64
CachedParentTagIds []int64
Cover string
View int32
Rating pgtype.Float8
TotalReviews int32
TotalRatings int32
IsPinned bool
IsPermRemoved bool
IsShadowBanned bool
CollectionID pgtype.Int8
CollectionName pgtype.Text
CollectionPosition pgtype.Int4
CollectionSize pgtype.Int4
}
type Book_UnTrashParams ¶
type CensorMode ¶
type CensorMode string
const ( CensorModeHide CensorMode = "hide" CensorModeCensor CensorMode = "censor" CensorModeNone CensorMode = "none" )
func (*CensorMode) Scan ¶
func (e *CensorMode) Scan(src interface{}) error
type Chapter_UpdateParams ¶
type Collection ¶
type CollectionBook ¶
type CollectionBook struct {
CollectionID int64
BookID int64
AddedAt pgtype.Timestamptz
Order int32
}
type Collection_GetBooksRow ¶
type Collection_GetBooksRow struct {
ID int64
Name string
Slug string
Summary string
AuthorUserID pgtype.UUID
CreatedAt pgtype.Timestamptz
AgeRating AgeRating
IsPubliclyVisible bool
IsBanned bool
IsTrashed bool
Words int32
Chapters int32
TagIds []int64
CachedParentTagIds []int64
Cover string
View int32
Rating pgtype.Float8
TotalReviews int32
TotalRatings int32
IsPinned bool
IsPermRemoved bool
IsShadowBanned bool
AuthorName string
OrderWithinCollection int32
}
type Collection_GetByBookRow ¶
type Collection_GetByUserRow ¶
type Collection_GetRow ¶
type Collection_InsertParams ¶
type Collection_UpdateParams ¶
type Comment ¶
type Comment struct {
ID int64
ChapterID int64
UserID pgtype.UUID
Content string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
ParentID pgtype.Int8
Subcomments int32
Likes int32
LikesRecalculatedAt pgtype.Timestamptz
}
type Comment_GetByChapterAfterParams ¶
type Comment_GetByChapterAfterParams struct {
ChapterID int64
Limit int32
CreatedAt pgtype.Timestamptz
}
type Comment_GetByChapterAfterRow ¶
type Comment_GetByChapterAfterRow struct {
ID int64
ChapterID int64
UserID pgtype.UUID
Content string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
ParentID pgtype.Int8
Subcomments int32
Likes int32
LikesRecalculatedAt pgtype.Timestamptz
UserName string
}
type Comment_GetByChapterRow ¶
type Comment_GetByChapterRow struct {
ID int64
ChapterID int64
UserID pgtype.UUID
Content string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
ParentID pgtype.Int8
Subcomments int32
Likes int32
LikesRecalculatedAt pgtype.Timestamptz
UserName string
}
type Comment_GetChildCommentsAfterParams ¶
type Comment_GetChildCommentsAfterParams struct {
Limit int32
CreatedAt pgtype.Timestamptz
ParentID int64
}
type Comment_GetChildCommentsAfterRow ¶
type Comment_GetChildCommentsAfterRow struct {
ID int64
ChapterID int64
UserID pgtype.UUID
Content string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
ParentID pgtype.Int8
Subcomments int32
Likes int32
LikesRecalculatedAt pgtype.Timestamptz
UserName string
}
type Comment_GetChildCommentsRow ¶
type Comment_GetChildCommentsRow struct {
ID int64
ChapterID int64
UserID pgtype.UUID
Content string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
ParentID pgtype.Int8
Subcomments int32
Likes int32
LikesRecalculatedAt pgtype.Timestamptz
UserName string
}
type Comment_GetLikedCommentsRow ¶
type Comment_GetLikedCommentsRow struct {
CommentID int64
LikedAt pgtype.Timestamptz
}
type Comment_GetWithUserByIDRow ¶
type Comment_GetWithUserByIDRow struct {
ID int64
ChapterID int64
UserID pgtype.UUID
Content string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
DeletedAt pgtype.Timestamptz
ParentID pgtype.Int8
Subcomments int32
Likes int32
LikesRecalculatedAt pgtype.Timestamptz
UserName string
}
type Comment_InsertParams ¶
type Comment_LikeParams ¶
type Comment_UnLikeParams ¶
type Comment_UpdateParams ¶
type CommentsLiked ¶
type CommentsLiked struct {
CommentID int64
UserID pgtype.UUID
LikedAt pgtype.Timestamptz
}
type DBTX ¶
type DBTX interface {
Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
Query(context.Context, string, ...interface{}) (pgx.Rows, error)
QueryRow(context.Context, string, ...interface{}) pgx.Row
CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}
type DefinedTag ¶
type DeleteRateParams ¶
type DeleteReviewParams ¶
type DeleteUserFollowParams ¶
type Draft ¶
type Draft struct {
ID int64
CreatedBy pgtype.UUID
ChapterID int64
ChapterName string
Content string
Words int32
Summary string
IsAdultOverride bool
UpdatedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
PublishedAt pgtype.Timestamptz
}
type Draft_GetByIdRow ¶
type Draft_GetByIdRow struct {
ID int64
CreatedBy pgtype.UUID
ChapterID int64
ChapterName string
Content string
Words int32
Summary string
IsAdultOverride bool
UpdatedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
PublishedAt pgtype.Timestamptz
BookID int64
BookName string
IsChapterPubliclyVisible bool
ChapterContentUpdatedAt pgtype.Timestamptz
}
type Draft_InsertParams ¶
type Draft_InsertParams struct {
ID int64
CreatedBy pgtype.UUID
ChapterID int64
ChapterName string
Content string
UpdatedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type Draft_UpdateParams ¶
type EmailVerification ¶
type EmailVerification struct {
Email string
UserID pgtype.UUID
VerificationCodeHash string
CreatedAt pgtype.Timestamptz
ValidThrough pgtype.Timestamptz
}
type GetAllBookChaptersRow ¶
type GetAllBooksParams ¶
type GetAllBooksRow ¶
type GetBookChapterWithDetailsRow ¶
type GetBookChapterWithDetailsRow struct {
ID int64
Name string
BookID int64
Content string
ContentUpdatedAt pgtype.Timestamptz
Order int32
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
Words int32
IsAdultOverride bool
Summary string
IsPubliclyVisible bool
PrevChapterID int64
PrevChapterName string
NextChapterID int64
NextChapterName string
}
type GetBookReviewsParams ¶
type GetBookReviewsRow ¶
type GetBookReviewsRow struct {
UserID pgtype.UUID
BookID int64
Content string
CreatedAt pgtype.Timestamptz
LastUpdatedAt pgtype.Timestamptz
Likes int32
Rating int16
RatingUpdatedAt pgtype.Timestamptz
UserName string
}
type GetBookRow ¶
type GetBookRow struct {
ID int64
Name string
Slug string
Summary string
AuthorUserID pgtype.UUID
CreatedAt pgtype.Timestamptz
AgeRating AgeRating
IsPubliclyVisible bool
IsBanned bool
IsTrashed bool
Words int32
Chapters int32
TagIds []int64
CachedParentTagIds []int64
Cover string
View int32
Rating pgtype.Float8
TotalReviews int32
TotalRatings int32
IsPinned bool
IsPermRemoved bool
IsShadowBanned bool
AuthorName string
}
type GetBookSearchRelatedDataRow ¶
type GetBookSearchRelatedDataRow struct {
CreatedAt pgtype.Timestamptz
Cover string
ID int64
}
type GetRateParams ¶
type GetRatingParams ¶
type GetReviewAndRatingRow ¶
type GetReviewAndRatingRow struct {
UserID pgtype.UUID
BookID int64
Content string
CreatedAt pgtype.Timestamptz
LastUpdatedAt pgtype.Timestamptz
Likes int32
Rating int16
RatingUpdatedAt pgtype.Timestamptz
}
type GetReviewParams ¶
type GetTopUserBooksParams ¶
type GetUserLibraryParams ¶
type GetUserLibraryParams struct {
UserID pgtype.UUID
Status ReadingListStatus
Limit int32
}
type GetUserLibraryRow ¶
type InsertDefinedTagParams ¶
type ListTagsQuery ¶
type ModAddBookLogParams ¶
type ModAddBookLogParams struct {
ID int64
Time pgtype.Timestamptz
BookID int64
ActionType BookActionType
Payload []byte
ActorUserID pgtype.UUID
Reason string
}
type ModCountBookLogFilteredParams ¶
type ModCountBookLogFilteredParams struct {
BookID int64
ActionTypes []BookActionType
}
type ModGetBookInfoRow ¶
type ModGetBookLogFilteredParams ¶
type ModGetBookLogFilteredParams struct {
BookID int64
Limit int32
Offset int32
ActionTypes []BookActionType
}
type ModGetBookLogFilteredRow ¶
type ModGetBookLogFilteredRow struct {
ID int64
Time pgtype.Timestamptz
BookID int64
ActionType BookActionType
Payload []byte
ActorUserID pgtype.UUID
Reason string
ActorUserName string
}
type ModGetBookLogOfTypeParams ¶
type ModGetBookLogOfTypeParams struct {
BookID int64
Limit int32
Offset int32
ActionType BookActionType
}
type ModGetBookLogParams ¶
type ModGetBookModStateRow ¶
type ModPermRemoveBookParams ¶
type ModSetBookBannedParams ¶
type NullAgeRating ¶
type NullAgeRating struct {
AgeRating AgeRating
Valid bool // Valid is true if AgeRating is not NULL
}
func (*NullAgeRating) Scan ¶
func (ns *NullAgeRating) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullBookActionType ¶
type NullBookActionType struct {
BookActionType BookActionType
Valid bool // Valid is true if BookActionType is not NULL
}
func (*NullBookActionType) Scan ¶
func (ns *NullBookActionType) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullCensorMode ¶
type NullCensorMode struct {
CensorMode CensorMode
Valid bool // Valid is true if CensorMode is not NULL
}
func (*NullCensorMode) Scan ¶
func (ns *NullCensorMode) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullReadingListStatus ¶
type NullReadingListStatus struct {
ReadingListStatus ReadingListStatus
Valid bool // Valid is true if ReadingListStatus is not NULL
}
func (*NullReadingListStatus) Scan ¶
func (ns *NullReadingListStatus) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullTagType ¶
func (*NullTagType) Scan ¶
func (ns *NullTagType) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullTypeOf2fa ¶
type NullTypeOf2fa struct {
TypeOf2fa TypeOf2fa
Valid bool // Valid is true if TypeOf2fa is not NULL
}
func (*NullTypeOf2fa) Scan ¶
func (ns *NullTypeOf2fa) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullUserActionType ¶
type NullUserActionType struct {
UserActionType UserActionType
Valid bool // Valid is true if UserActionType is not NULL
}
func (*NullUserActionType) Scan ¶
func (ns *NullUserActionType) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullUserRole ¶
func (*NullUserRole) Scan ¶
func (ns *NullUserRole) Scan(value interface{}) error
Scan implements the Scanner interface.
type OlAnalyticsViewCounter ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) Analytics_GetChapterViews ¶
func (q *Queries) Analytics_GetChapterViews(ctx context.Context, arg Analytics_GetChapterViewsParams) ([]Analytics_GetChapterViewsRow, error)
func (*Queries) Analytics_GetMostViewedBooksByBookViewsOnly ¶
func (q *Queries) Analytics_GetMostViewedBooksByBookViewsOnly(ctx context.Context, arg Analytics_GetMostViewedBooksByBookViewsOnlyParams) ([]Analytics_GetMostViewedBooksByBookViewsOnlyRow, error)
func (*Queries) Analytics_GetTotalViews ¶
func (*Queries) Analytics_GetViews ¶
func (q *Queries) Analytics_GetViews(ctx context.Context, arg Analytics_GetViewsParams) ([]Analytics_GetViewsRow, error)
func (*Queries) Analytics_GetViews_Multiple ¶
func (q *Queries) Analytics_GetViews_Multiple(ctx context.Context, arg Analytics_GetViews_MultipleParams) ([]Analytics_GetViews_MultipleRow, error)
func (*Queries) Analytics_IncrView ¶
func (q *Queries) Analytics_IncrView(ctx context.Context, arg Analytics_IncrViewParams) error
func (*Queries) BookSetCover ¶
func (q *Queries) BookSetCover(ctx context.Context, arg BookSetCoverParams) error
func (*Queries) Book_Book_ManagerGetUserBooksCount ¶
func (*Queries) Book_GetByIds ¶
func (*Queries) Book_GetByUser ¶
func (*Queries) Book_GetChapterOrder ¶
func (*Queries) Book_GetFirstChapterID ¶
func (*Queries) Book_GetLastChapterOrder ¶
func (*Queries) Book_GetPubliclyVisibleChapters ¶
func (*Queries) Book_Insert ¶
func (q *Queries) Book_Insert(ctx context.Context, arg Book_InsertParams) error
func (*Queries) Book_InsertChapter ¶
func (q *Queries) Book_InsertChapter(ctx context.Context, arg Book_InsertChapterParams) error
func (*Queries) Book_ManagerGetUserBooks ¶
func (q *Queries) Book_ManagerGetUserBooks(ctx context.Context, arg Book_ManagerGetUserBooksParams) ([]Book_ManagerGetUserBooksRow, error)
func (*Queries) Book_SetChapterOrder ¶
func (q *Queries) Book_SetChapterOrder(ctx context.Context, arg Book_SetChapterOrderParams) error
func (*Queries) Book_UnTrash ¶
func (q *Queries) Book_UnTrash(ctx context.Context, arg Book_UnTrashParams) error
func (*Queries) Chapter_Update ¶
func (*Queries) Collection_AddBookToCollection ¶
func (q *Queries) Collection_AddBookToCollection(ctx context.Context, arg Collection_AddBookToCollectionParams) error
func (*Queries) Collection_CountBooks ¶
func (*Queries) Collection_CountByUser ¶
func (*Queries) Collection_Delete ¶
func (*Queries) Collection_DeleteAllBooks ¶
func (*Queries) Collection_DeleteBookFromCollection ¶
func (q *Queries) Collection_DeleteBookFromCollection(ctx context.Context, arg Collection_DeleteBookFromCollectionParams) error
func (*Queries) Collection_Get ¶
func (*Queries) Collection_GetBooks ¶
func (q *Queries) Collection_GetBooks(ctx context.Context, arg Collection_GetBooksParams) ([]Collection_GetBooksRow, error)
func (*Queries) Collection_GetByBook ¶
func (q *Queries) Collection_GetByBook(ctx context.Context, arg Collection_GetByBookParams) ([]Collection_GetByBookRow, error)
func (*Queries) Collection_GetByUser ¶
func (q *Queries) Collection_GetByUser(ctx context.Context, arg Collection_GetByUserParams) ([]Collection_GetByUserRow, error)
func (*Queries) Collection_GetMaxOrder ¶
func (*Queries) Collection_GetRecentByUser ¶
func (q *Queries) Collection_GetRecentByUser(ctx context.Context, arg Collection_GetRecentByUserParams) ([]Collection, error)
func (*Queries) Collection_Insert ¶
func (q *Queries) Collection_Insert(ctx context.Context, arg Collection_InsertParams) error
func (*Queries) Collection_RecalculateCounter ¶
func (*Queries) Collection_Update ¶
func (q *Queries) Collection_Update(ctx context.Context, arg Collection_UpdateParams) error
func (*Queries) Collections_ListByID ¶
func (*Queries) Comment_GetByChapter ¶
func (q *Queries) Comment_GetByChapter(ctx context.Context, arg Comment_GetByChapterParams) ([]Comment_GetByChapterRow, error)
func (*Queries) Comment_GetByChapterAfter ¶
func (q *Queries) Comment_GetByChapterAfter(ctx context.Context, arg Comment_GetByChapterAfterParams) ([]Comment_GetByChapterAfterRow, error)
func (*Queries) Comment_GetByID ¶
func (*Queries) Comment_GetChildComments ¶
func (q *Queries) Comment_GetChildComments(ctx context.Context, arg Comment_GetChildCommentsParams) ([]Comment_GetChildCommentsRow, error)
func (*Queries) Comment_GetChildCommentsAfter ¶
func (q *Queries) Comment_GetChildCommentsAfter(ctx context.Context, arg Comment_GetChildCommentsAfterParams) ([]Comment_GetChildCommentsAfterRow, error)
func (*Queries) Comment_GetLikedComments ¶
func (q *Queries) Comment_GetLikedComments(ctx context.Context, arg Comment_GetLikedCommentsParams) ([]Comment_GetLikedCommentsRow, error)
func (*Queries) Comment_GetWithUserByID ¶
func (*Queries) Comment_Insert ¶
func (q *Queries) Comment_Insert(ctx context.Context, arg Comment_InsertParams) error
func (*Queries) Comment_Like ¶
func (q *Queries) Comment_Like(ctx context.Context, arg Comment_LikeParams) error
func (*Queries) Comment_RecalculateSubcomments ¶
func (*Queries) Comment_UnLike ¶
func (q *Queries) Comment_UnLike(ctx context.Context, arg Comment_UnLikeParams) error
func (*Queries) Comment_Update ¶
func (q *Queries) Comment_Update(ctx context.Context, arg Comment_UpdateParams) (pgconn.CommandTag, error)
func (*Queries) DefinedTagsAreInitialized ¶
func (*Queries) DeleteInactive2FADevices ¶
func (*Queries) DeleteRate ¶
func (q *Queries) DeleteRate(ctx context.Context, arg DeleteRateParams) error
func (*Queries) DeleteReview ¶
func (q *Queries) DeleteReview(ctx context.Context, arg DeleteReviewParams) error
func (*Queries) DeleteUserFollow ¶
func (q *Queries) DeleteUserFollow(ctx context.Context, arg DeleteUserFollowParams) error
func (*Queries) Draft_GetById ¶
func (*Queries) Draft_GetLatestID ¶
func (*Queries) Draft_Insert ¶
func (q *Queries) Draft_Insert(ctx context.Context, arg Draft_InsertParams) error
func (*Queries) Draft_MarkAsPublished ¶
func (*Queries) Draft_Update ¶
func (q *Queries) Draft_Update(ctx context.Context, arg Draft_UpdateParams) error
func (*Queries) Draft_UpdateChapterName ¶
func (q *Queries) Draft_UpdateChapterName(ctx context.Context, arg Draft_UpdateChapterNameParams) error
func (*Queries) Draft_UpdateContent ¶
func (q *Queries) Draft_UpdateContent(ctx context.Context, arg Draft_UpdateContentParams) error
func (*Queries) EmailVerification_Delete ¶
func (*Queries) EmailVerification_Get ¶
func (*Queries) EmailVerification_Insert ¶
func (q *Queries) EmailVerification_Insert(ctx context.Context, arg EmailVerification_InsertParams) error
func (*Queries) GetAllBookChapters ¶
func (*Queries) GetAllBooks ¶
func (q *Queries) GetAllBooks(ctx context.Context, arg GetAllBooksParams) ([]GetAllBooksRow, error)
func (*Queries) GetBookChapterWithDetails ¶
func (q *Queries) GetBookChapterWithDetails(ctx context.Context, arg GetBookChapterWithDetailsParams) (GetBookChapterWithDetailsRow, error)
func (*Queries) GetBookCollectionData ¶
func (*Queries) GetBookReadingListState ¶
func (q *Queries) GetBookReadingListState(ctx context.Context, arg GetBookReadingListStateParams) (GetBookReadingListStateRow, error)
func (*Queries) GetBookReviews ¶
func (q *Queries) GetBookReviews(ctx context.Context, arg GetBookReviewsParams) ([]GetBookReviewsRow, error)
func (*Queries) GetBookReviewsDistribution ¶
func (*Queries) GetBookSearchRelatedData ¶
func (*Queries) GetBooksCollectionData ¶
func (*Queries) GetChapterBookID ¶
func (*Queries) GetChaptersOrder ¶
func (*Queries) GetFirstChapterID ¶
func (*Queries) GetLastChapterID ¶
func (*Queries) GetRandomPublicBookIDs ¶
func (*Queries) GetReviewAndRating ¶
func (q *Queries) GetReviewAndRating(ctx context.Context, arg GetReviewAndRatingParams) (GetReviewAndRatingRow, error)
func (*Queries) GetTagParent ¶
func (*Queries) GetTagsByIds ¶
func (*Queries) GetTagsByName ¶
func (*Queries) GetTopUserBooks ¶
func (*Queries) GetUserLibrary ¶
func (q *Queries) GetUserLibrary(ctx context.Context, arg GetUserLibraryParams) ([]GetUserLibraryRow, error)
func (*Queries) GetUserPrivacySettings ¶
func (*Queries) ImportTags ¶
func (*Queries) InsertDefinedTag ¶
func (q *Queries) InsertDefinedTag(ctx context.Context, arg InsertDefinedTagParams) error
func (*Queries) InsertDefinedTagEnMasse ¶
func (*Queries) InsertOrUpdateRate ¶
func (q *Queries) InsertOrUpdateRate(ctx context.Context, arg InsertOrUpdateRateParams) error
func (*Queries) InsertOrUpdateReview ¶
func (*Queries) ModAddBookLog ¶
func (q *Queries) ModAddBookLog(ctx context.Context, arg ModAddBookLogParams) error
func (*Queries) ModCountBookLogFiltered ¶
func (*Queries) ModGetBookInfo ¶
func (*Queries) ModGetBookLog ¶
func (*Queries) ModGetBookLogFiltered ¶
func (q *Queries) ModGetBookLogFiltered(ctx context.Context, arg ModGetBookLogFilteredParams) ([]ModGetBookLogFilteredRow, error)
func (*Queries) ModGetBookLogOfType ¶
func (*Queries) ModGetBookModState ¶
func (*Queries) ModPermRemoveBook ¶
func (q *Queries) ModPermRemoveBook(ctx context.Context, arg ModPermRemoveBookParams) error
func (*Queries) ModSetBookBanned ¶
func (q *Queries) ModSetBookBanned(ctx context.Context, arg ModSetBookBannedParams) error
func (*Queries) ModSetBookShadowBanned ¶
func (q *Queries) ModSetBookShadowBanned(ctx context.Context, arg ModSetBookShadowBannedParams) error
func (*Queries) RecalculateBookRating ¶
func (*Queries) RecalculateBookStats ¶
func (*Queries) RemoveUnusedDefaultTags ¶
func (*Queries) SearchDefinedTags ¶
func (q *Queries) SearchDefinedTags(ctx context.Context, arg SearchDefinedTagsParams) ([]DefinedTag, error)
func (*Queries) SearchDefinedTagsWithType ¶
func (q *Queries) SearchDefinedTagsWithType(ctx context.Context, arg SearchDefinedTagsWithTypeParams) ([]DefinedTag, error)
func (*Queries) Session_GetInfo ¶
func (*Queries) Session_GetUserSessions ¶
func (*Queries) Session_Insert ¶
func (q *Queries) Session_Insert(ctx context.Context, arg Session_InsertParams) error
func (*Queries) Session_Terminate ¶
func (*Queries) Session_TerminateAllByUserID ¶
func (*Queries) SetBookReadingListChapter ¶
func (q *Queries) SetBookReadingListChapter(ctx context.Context, arg SetBookReadingListChapterParams) error
func (*Queries) SetBookReadingListStatus ¶
func (q *Queries) SetBookReadingListStatus(ctx context.Context, arg SetBookReadingListStatusParams) (ReadingList, error)
func (*Queries) SetBookReadingListStatusAndChapter ¶
func (q *Queries) SetBookReadingListStatusAndChapter(ctx context.Context, arg SetBookReadingListStatusAndChapterParams) (ReadingList, error)
func (*Queries) SiteConfig_Get ¶
func (*Queries) SiteConfig_Set ¶
func (*Queries) UpdateBook ¶
func (q *Queries) UpdateBook(ctx context.Context, arg UpdateBookParams) error
func (*Queries) UpdateTag ¶
func (q *Queries) UpdateTag(ctx context.Context, arg UpdateTagParams) error
func (*Queries) User_ExistsByEmail ¶
func (*Queries) User_ExistsByUsername ¶
func (*Queries) User_FindByLogin ¶
func (*Queries) User_Get2FADevices ¶
func (*Queries) User_GetAboutSettings ¶
func (*Queries) User_GetCustomizationSettings ¶
func (*Queries) User_GetDetails ¶
func (q *Queries) User_GetDetails(ctx context.Context, arg User_GetDetailsParams) (User_GetDetailsRow, error)
func (*Queries) User_GetModerationSettings ¶
func (*Queries) User_GetNames ¶
func (*Queries) User_Insert ¶
func (q *Queries) User_Insert(ctx context.Context, arg User_InsertParams) error
func (*Queries) User_InsertFollow ¶
func (q *Queries) User_InsertFollow(ctx context.Context, arg User_InsertFollowParams) error
func (*Queries) User_IsFollowing ¶
func (*Queries) User_SetEmailVerified ¶
func (q *Queries) User_SetEmailVerified(ctx context.Context, arg User_SetEmailVerifiedParams) error
func (*Queries) User_UpdateAboutSettings ¶
func (q *Queries) User_UpdateAboutSettings(ctx context.Context, arg User_UpdateAboutSettingsParams) error
func (*Queries) User_UpdateCustomizationSettings ¶
func (q *Queries) User_UpdateCustomizationSettings(ctx context.Context, arg User_UpdateCustomizationSettingsParams) error
func (*Queries) User_UpdateModerationSettings ¶
func (q *Queries) User_UpdateModerationSettings(ctx context.Context, arg User_UpdateModerationSettingsParams) error
func (*Queries) User_UpdatePassword ¶
func (q *Queries) User_UpdatePassword(ctx context.Context, arg User_UpdatePasswordParams) error
func (*Queries) User_UpdatePrivacySettings ¶
func (q *Queries) User_UpdatePrivacySettings(ctx context.Context, arg User_UpdatePrivacySettingsParams) error
func (*Queries) User_UpdateRole ¶
func (q *Queries) User_UpdateRole(ctx context.Context, arg User_UpdateRoleParams) error
type ReadingList ¶
type ReadingList struct {
UserID pgtype.UUID
BookID int64
Status ReadingListStatus
LastAccessedChapterID pgtype.Int8
LastUpdatedAt pgtype.Timestamptz
}
type ReadingListHistory ¶
type ReadingListStatus ¶
type ReadingListStatus string
const ( ReadingListStatusDnf ReadingListStatus = "dnf" ReadingListStatusReading ReadingListStatus = "reading" ReadingListStatusPaused ReadingListStatus = "paused" ReadingListStatusRead ReadingListStatus = "read" ReadingListStatusWantToRead ReadingListStatus = "want_to_read" )
func (*ReadingListStatus) Scan ¶
func (e *ReadingListStatus) Scan(src interface{}) error
type Review ¶
type Review struct {
UserID pgtype.UUID
BookID int64
Content string
CreatedAt pgtype.Timestamptz
LastUpdatedAt pgtype.Timestamptz
Likes int32
}
type SearchDefinedTagsParams ¶
type Session_GetInfoRow ¶
type Session_GetInfoRow struct {
ID int64
Sid string
UserID pgtype.UUID
CreatedAt pgtype.Timestamptz
UserAgent string
IpAddress string
ExpiresAt pgtype.Timestamptz
IsTerminated bool
UserName string
UserJoinedAt pgtype.Timestamptz
UserRole UserRole
}
type Session_InsertParams ¶
type Session_InsertParams struct {
ID int64
Sid string
UserID pgtype.UUID
CreatedAt pgtype.Timestamptz
UserAgent string
IpAddress string
ExpiresAt pgtype.Timestamptz
}
type SetBookReadingListStatusParams ¶
type SetBookReadingListStatusParams struct {
BookID int64
UserID pgtype.UUID
Status ReadingListStatus
}
type SiteConfig ¶
type TagRow ¶
type TagRow struct {
ID int64 `db:"id"`
Name string `db:"name"`
IsAdult bool `db:"is_adult"`
IsSpoiler bool `db:"is_spoiler"`
TagType TagType `db:"tag_type"`
Description string `db:"description"`
IsDefault bool `db:"is_default"`
CreatedAt time.Time `db:"created_at"`
SynonymOf pgtype.Int8 `db:"synonym_of"`
SynonymOfName pgtype.Text `db:"synonym_name"`
}
type UpdateBookParams ¶
type UpdateTagParams ¶
type User ¶
type User struct {
ID pgtype.UUID
Name string
Email string
EmailVerified bool
JoinedAt pgtype.Timestamptz
PasswordHash string
Role UserRole
IsBanned bool
AvatarFile pgtype.Text
About string
Gender string
ProfileCss string
EnableProfileCss bool
DefaultTheme string
PrivacyHideStats bool
PrivacyHideComments bool
PrivacyHideEmail bool
PrivacyAllowSearching bool
ShowAdultContent bool
CensoredTags []string
CensoredTagsMode CensorMode
}
type UserActionType ¶
type UserActionType string
const ( UserActionTypeSecPasswordReset UserActionType = "sec_password_reset" UserActionTypeSec2faUmbrella UserActionType = "sec_2fa_umbrella" UserActionTypeBan UserActionType = "ban" UserActionTypeUnban UserActionType = "unban" UserActionTypeMute UserActionType = "mute" UserActionTypeUnmute UserActionType = "unmute" )
func (*UserActionType) Scan ¶
func (e *UserActionType) Scan(src interface{}) error
type UserBan ¶
type UserBan struct {
ID int64
UserID pgtype.UUID
CreatedAt pgtype.Timestamptz
BannedByUserID pgtype.UUID
Note string
ExpiresAt pgtype.Timestamptz
}
type UserFollower ¶
type User_GetDetailsParams ¶
type User_GetDetailsRow ¶
type User_GetDetailsRow struct {
ID pgtype.UUID
Name string
Email string
EmailVerified bool
JoinedAt pgtype.Timestamptz
PasswordHash string
Role UserRole
IsBanned bool
AvatarFile pgtype.Text
About string
Gender string
ProfileCss string
EnableProfileCss bool
DefaultTheme string
PrivacyHideStats bool
PrivacyHideComments bool
PrivacyHideEmail bool
PrivacyAllowSearching bool
ShowAdultContent bool
CensoredTags []string
CensoredTagsMode CensorMode
BooksTotal int64
Followers int64
Following int64
IsFollowing bool
}
type User_GetModerationSettingsRow ¶
type User_GetModerationSettingsRow struct {
ShowAdultContent bool
CensoredTags []string
CensoredTagsMode CensorMode
}
type User_GetNamesRow ¶
type User_InsertFollowParams ¶
type User_InsertParams ¶
type User_IsFollowingParams ¶
type User_UpdateModerationSettingsParams ¶
type User_UpdateModerationSettingsParams struct {
ID pgtype.UUID
ShowAdultContent bool
CensoredTags []string
CensoredTagsMode CensorMode
}
type User_UpdateRoleParams ¶
Source Files
¶
- analytics.go
- book_search.go
- connection.go
- copyfrom.go
- db.go
- goqu_utils.go
- models.go
- query.analytics.sql.go
- query.book-manager.sql.go
- query.book-mod.sql.go
- query.book.sql.go
- query.collections.sql.go
- query.comments.sql.go
- query.draft.sql.go
- query.reading-list.sql.go
- query.reviews.sql.go
- query.sitecfg.sql.go
- query.tags.sql.go
- query.user.sql.go
- tags_list.go
- user_list.go
Click to show internal directories.
Click to hide internal directories.