data

package
v0.0.0-...-4a4ea3a Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRateLimitExceeded    = errors.New("rate limit exceeded")
	ErrCaptchaFailed        = errors.New("captcha verification failed")
	ErrInvalidContentLength = errors.New("invalid content length")
	ErrChapterNotFound      = errors.New("chapter not found")
	ErrInvalidDisplayName   = errors.New("invalid display name")
	ErrUnsupportedFormat    = errors.New("unsupported image format")
	ErrProfileNotFound      = errors.New("profile not found")
	ErrS3NotConfigured      = errors.New("s3 not configured")
	ErrNameEmpty            = errors.New("name is empty")
	ErrNameTooLong          = errors.New("name too long")
	ErrInvalidCharacters    = errors.New("invalid characters in name")
	ErrInvalidVoteValue     = errors.New("invalid vote value")
	ErrCommentNotFound      = errors.New("comment not found")
	ErrNotCommentAuthor     = errors.New("not comment author")
	ErrCannotDeleteComment  = errors.New("cannot delete comment with current status")
)

Functions

func CreateComment

func CreateComment(ctx context.Context, userID string, input models.CreateCommentInput) (*models.Comment, error)

func DeleteComment

func DeleteComment(ctx context.Context, commentID, userID string) error

func DeleteProfile

func DeleteProfile(ctx context.Context, userID string) error

func DeleteTelegramMessage

func DeleteTelegramMessage(chatID int64, messageID int64) error

func GetAppUpdates

func GetAppUpdates(ctx context.Context, limit int) ([]models.AppUpdate, error)

func GetCatalogNovels

func GetCatalogNovels(ctx context.Context, page int, sort string, search string) (*models.CatalogPage, error)

func GetChapter

func GetChapter(ctx context.Context, id string) (*models.Chapter, error)

func GetChapters

func GetChapters(ctx context.Context, novelID string) (*models.ChaptersList, error)

func GetCommentByID

func GetCommentByID(ctx context.Context, commentID string) (*models.Comment, error)

func GetLatestUpdates

func GetLatestUpdates(ctx context.Context, limit int) ([]models.NovelUpdate, error)

func GetNovel

func GetNovel(ctx context.Context, id string) (*models.Novel, error)

func GetNovels

func GetNovels(ctx context.Context, page int, sort string) (*models.NovelsPage, error)

func GetNovelsByIDs

func GetNovelsByIDs(ctx context.Context, ids []string) ([]models.NovelSummary, error)

func GetProfile

func GetProfile(ctx context.Context, profileID string) (*models.ProfilePublic, error)

func GetRandomAnnouncement

func GetRandomAnnouncement(ctx context.Context) (*models.Announcement, error)

func GetRecentlyAddedNovels

func GetRecentlyAddedNovels(ctx context.Context, limit int) ([]models.NovelAddition, error)

func GetSitemapData

func GetSitemapData(ctx context.Context) ([]models.SitemapItem, error)

func GetSystemStatus

func GetSystemStatus() (string, error)

func GetTelegramChatID

func GetTelegramChatID() string

func GetTelegramWebhookSecret

func GetTelegramWebhookSecret() string

func GetUserComments

func GetUserComments(ctx context.Context, userID string, page int) (*models.UserCommentsPage, error)

func GetVisibleComments

func GetVisibleComments(ctx context.Context, chapterID, userID string, page int) (*models.CommentsPage, error)

func IncrementNovelViews

func IncrementNovelViews(ctx context.Context, novelID string)

func SearchNovels

func SearchNovels(ctx context.Context, query string) ([]models.NovelSummary, error)

func SetTelegramChatID

func SetTelegramChatID(chatID string)

func SetTelegramWebhookSecret

func SetTelegramWebhookSecret(secret string)

func SyncCookies

func SyncCookies(ctx context.Context, userID string, cookies map[string]models.CookieValue) (map[string]models.CookieValue, error)

func UpdateAvatar

func UpdateAvatar(ctx context.Context, userID string, imageData []byte) (*models.ProfilePublic, error)

func UpdateCommentStatus

func UpdateCommentStatus(ctx context.Context, commentID, status string) error

func UpdateDisplayName

func UpdateDisplayName(ctx context.Context, userID, newName string) (*models.ProfilePublic, error)

func UploadCommentImage

func UploadCommentImage(ctx context.Context, userID string, imageData []byte) (string, error)

func ValidateDisplayName

func ValidateDisplayName(name string) (string, error)

func VoteComment

func VoteComment(ctx context.Context, commentID, userID string, value int) (int, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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