db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveTasksOfParams

type ActiveTasksOfParams struct {
	Kind  string
	Field string
	Value string
}

type AddBookmarksParams

type AddBookmarksParams struct {
	UserID     uuid.UUID
	ChapterIds []uuid.UUID
	WorkID     uuid.UUID
}

type AddLibraryEntryParams

type AddLibraryEntryParams struct {
	UserID uuid.UUID
	WorkID uuid.UUID
}

type ApiKey

type ApiKey struct {
	ID         uuid.UUID
	UserID     uuid.UUID
	Name       string
	Prefix     string
	KeyHash    []byte
	Scopes     []string
	CreatedAt  time.Time
	LastUsedAt *time.Time
	ExpiresAt  *time.Time
}

type AssignVariantsParams

type AssignVariantsParams struct {
	ChapterID uuid.NullUUID
	Ids       []uuid.UUID
}

type AttachedSourceIDsByWorkRow

type AttachedSourceIDsByWorkRow struct {
	WorkID   uuid.UUID
	SourceID string
}

type Bookmark

type Bookmark struct {
	UserID    uuid.UUID
	ChapterID uuid.UUID
	WorkID    uuid.UUID
	CreatedAt time.Time
}

type Chapter

type Chapter struct {
	ID                 uuid.UUID
	WorkID             uuid.UUID
	Number             *float64
	ExtraKey           string
	Volume             string
	Title              string
	PreferredVariantID uuid.NullUUID
	PinnedVariantID    uuid.NullUUID
	Reason             string
	Available          bool
	CreatedAt          time.Time
	UpdatedAt          time.Time
	AppearedAt         *time.Time
}

type ChapterFile

type ChapterFile struct {
	ID            uuid.UUID
	ChapterID     uuid.UUID
	StorageID     string
	Key           string
	Pages         int32
	Bytes         int64
	Sha256        string
	FromVariantID uuid.NullUUID
	CreatedAt     time.Time
}

type ChapterFileByKeyParams

type ChapterFileByKeyParams struct {
	StorageID string
	Key       string
}

type ChapterVariantsRow

type ChapterVariantsRow struct {
	SourceChapter  SourceChapter
	SourceID       string
	SeriesPriority int32
	SourceHealth   string
	SourceName     string
	SourceLang     string
	SourceUsable   bool
}

type ClaimCandidatesParams

type ClaimCandidatesParams struct {
	Kinds []string
	Lim   int32
}

type CountAttachedByWorkRow

type CountAttachedByWorkRow struct {
	WorkID   uuid.UUID
	Attached int64
}

type CountBookmarksParams

type CountBookmarksParams struct {
	UserID  uuid.UUID
	WorkIds []uuid.UUID
}

type CountBookmarksRow

type CountBookmarksRow struct {
	WorkID    uuid.UUID
	Bookmarks int64
}

type CountChaptersByWorkParams

type CountChaptersByWorkParams struct {
	Since   time.Time
	WorkIds []uuid.UUID
}

type CountChaptersByWorkRow

type CountChaptersByWorkRow struct {
	WorkID uuid.UUID
	Total  int64
	Recent int64
}

type CountDownloadedByWorkRow

type CountDownloadedByWorkRow struct {
	WorkID     uuid.UUID
	Downloaded int64
}

type CountSourcesByPluginRow

type CountSourcesByPluginRow struct {
	PluginID string
	Listed   int64
}

type CreateAPIKeyParams

type CreateAPIKeyParams struct {
	UserID    uuid.UUID
	Name      string
	Prefix    string
	KeyHash   []byte
	Scopes    []string
	ExpiresAt *time.Time
}

type CreateInviteParams

type CreateInviteParams struct {
	TokenHash []byte
	Role      string
	Grants    []byte
	Note      string
	CreatedBy uuid.NullUUID
	ExpiresAt time.Time
}

type CreateJobRunParams

type CreateJobRunParams struct {
	JobID       string
	Status      string
	Trigger     string
	TriggeredBy string
	Params      []byte
	Message     string
	FinishedAt  *time.Time
}

type CreatePluginParams

type CreatePluginParams struct {
	ID            string
	Url           string
	ApiKey        string
	Info          []byte
	Health        string
	HealthMessage string
}

type CreateSessionParams

type CreateSessionParams struct {
	TokenHash []byte
	UserID    uuid.UUID
	CsrfToken string
	UserAgent string
	Ip        string
	ExpiresAt time.Time
}

type CreateStorageParams

type CreateStorageParams struct {
	ID        string
	Name      string
	Kind      string
	Config    []byte
	Secret    string
	IsDefault bool
}

type CreateUserParams

type CreateUserParams struct {
	Username             string
	DisplayName          string
	PasswordHash         string
	Role                 string
	MayAdd               bool
	MayDownload          bool
	MayManageMatches     bool
	ContentRatingCeiling string
	AllSources           bool
	AllowedSources       []string
}

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
}

type DeleteAssignmentParams

type DeleteAssignmentParams struct {
	TargetKind string
	TargetID   string
}

type DeleteBookmarksParams

type DeleteBookmarksParams struct {
	UserID     uuid.UUID
	ChapterIds []uuid.UUID
}

type DeleteImageRetrySettingParams

type DeleteImageRetrySettingParams struct {
	TargetKind string
	TargetID   string
}

type DeleteProgressParams

type DeleteProgressParams struct {
	UserID     uuid.UUID
	ChapterIds []uuid.UUID
}

type DeleteReaderSettingsParams

type DeleteReaderSettingsParams struct {
	UserID uuid.UUID
	Scope  string
}

type DeleteUserAPIKeyParams

type DeleteUserAPIKeyParams struct {
	ID     uuid.UUID
	UserID uuid.UUID
}

type DeleteUserSessionParams

type DeleteUserSessionParams struct {
	ID     uuid.UUID
	UserID uuid.UUID
}

type DeleteUserSessionsExceptParams

type DeleteUserSessionsExceptParams struct {
	UserID uuid.UUID
	Keep   uuid.UUID
}

type DemoteAttachedParams

type DemoteAttachedParams struct {
	WorkID   uuid.UUID
	SourceID string
}

type DropCandidatesParams

type DropCandidatesParams struct {
	WorkID   uuid.UUID
	SourceID string
}

type ExtendTaskLeaseParams

type ExtendTaskLeaseParams struct {
	LeaseUntil *time.Time
	ID         uuid.UUID
}

type FilesOnStorageParams

type FilesOnStorageParams struct {
	StorageID string
	Lim       int32
}

type FinishJobRunParams

type FinishJobRunParams struct {
	Status  string
	Message string
	Counts  []byte
	Notes   []byte
	ID      uuid.UUID
}

type FinishTaskParams

type FinishTaskParams struct {
	State     string
	LastError string
	Result    []byte
	ID        uuid.UUID
}

type GetAPIKeyByHashRow

type GetAPIKeyByHashRow struct {
	ApiKey ApiKey
	User   User
}

type GetImageRetrySettingParams

type GetImageRetrySettingParams struct {
	TargetKind string
	TargetID   string
}

type GetLibraryEntryParams

type GetLibraryEntryParams struct {
	UserID uuid.UUID
	WorkID uuid.UUID
}

type GetProgressParams

type GetProgressParams struct {
	UserID    uuid.UUID
	ChapterID uuid.UUID
}

type GetSessionByTokenHashRow

type GetSessionByTokenHashRow struct {
	Session Session
	User    User
}

type GetSourceRow

type GetSourceRow struct {
	Source        Source
	PluginEnabled bool
}

type HideHistoryParams

type HideHistoryParams struct {
	UserID uuid.UUID
	WorkID uuid.UUID
}

type HistoryCleared

type HistoryCleared struct {
	UserID uuid.UUID
	Before time.Time
}

type HistoryHidden

type HistoryHidden struct {
	UserID uuid.UUID
	WorkID uuid.UUID
	Before time.Time
}

type HistoryParams

type HistoryParams struct {
	Q             pgtype.Text
	Before        *time.Time
	BeforeChapter uuid.NullUUID
	Lim           int32
	UserID        uuid.UUID
	WorkID        uuid.NullUUID
	PerSeries     bool
}

type HistoryRow

type HistoryRow struct {
	Progress     Progress
	Chapter      Chapter
	WorkTitle    string
	WorkCoverUrl string
}

type HurryTaskParams

type HurryTaskParams struct {
	RunAfter  time.Time
	Priority  int32
	DedupeKey string
}

type ImageRetrySetting

type ImageRetrySetting struct {
	TargetKind string
	TargetID   string
	DelaysMs   []int32
	PluginID   string
	UpdatedAt  time.Time
}

type ImageRetrySettingsForParams

type ImageRetrySettingsForParams struct {
	SourceID   string
	PackageKey string
}

type InsertChapterFileParams

type InsertChapterFileParams struct {
	ChapterID     uuid.UUID
	StorageID     string
	Key           string
	Pages         int32
	Bytes         int64
	Sha256        string
	FromVariantID uuid.NullUUID
}

type InsertChapterParams

type InsertChapterParams struct {
	WorkID             uuid.UUID
	Number             *float64
	ExtraKey           string
	Volume             string
	Title              string
	PreferredVariantID uuid.NullUUID
	Reason             string
	Announce           bool
}

type InsertProfileParams

type InsertProfileParams struct {
	ID               string
	Name             string
	ProxyID          pgtype.Text
	SolverID         pgtype.Text
	RateRequests     int32
	RatePeriodMs     int32
	RateBurst        int32
	RateScope        string
	Concurrency      int32
	UserAgentMode    string
	UserAgent        string
	DohUrl           string
	Headers          []byte
	SharedCookieJar  string
	ConnectTimeoutMs int32
	ReadTimeoutMs    int32
	CallTimeoutMs    int32
	OwnerKind        string
	OwnerID          string
	OwnerPlugin      pgtype.Text
}

type InsertProxyParams

type InsertProxyParams struct {
	ID             string
	Name           string
	Url            string
	Username       string
	PasswordSealed string
	OwnerKind      string
	OwnerID        string
	OwnerPlugin    pgtype.Text
}

type InsertSolverParams

type InsertSolverParams struct {
	ID                 string
	Name               string
	Type               string
	Url                string
	SessionTtlSeconds  int32
	MaxTimeoutSeconds  int32
	AsResponseFallback bool
	OwnerKind          string
	OwnerID            string
	OwnerPlugin        pgtype.Text
}

type InsertTaskParams

type InsertTaskParams struct {
	Kind        string
	Payload     []byte
	DedupeKey   string
	LimitKey    string
	Priority    int32
	MaxAttempts int32
	RunAfter    time.Time
	CreatedBy   uuid.NullUUID
}

type Invite

type Invite struct {
	ID        uuid.UUID
	TokenHash []byte
	Role      string
	Grants    []byte
	Note      string
	CreatedBy uuid.NullUUID
	CreatedAt time.Time
	ExpiresAt time.Time
	UsedAt    *time.Time
	UsedBy    uuid.NullUUID
}

type JobRun

type JobRun struct {
	ID          uuid.UUID
	JobID       string
	Status      string
	Trigger     string
	TriggeredBy string
	Params      []byte
	Message     string
	Counts      []byte
	Notes       []byte
	Progress    []byte
	StartedAt   time.Time
	FinishedAt  *time.Time
}

type LibraryChaptersRow

type LibraryChaptersRow struct {
	ID         uuid.UUID
	WorkID     uuid.UUID
	Number     *float64
	Available  bool
	CreatedAt  time.Time
	UploadedAt *time.Time
}

type LibraryEntry

type LibraryEntry struct {
	UserID       uuid.UUID
	WorkID       uuid.UUID
	AddedAt      time.Time
	SeenAt       time.Time
	AutoDownload bool
}

type LibraryProgressParams

type LibraryProgressParams struct {
	UserID  uuid.UUID
	WorkIds []uuid.UUID
}

type LibraryWorksByEntriesParams

type LibraryWorksByEntriesParams struct {
	UserID   uuid.UUID
	EntryIds []string
}

type LibraryWorksByEntriesRow

type LibraryWorksByEntriesRow struct {
	ID          uuid.UUID
	MetaEntryID string
}

type ListBookmarksParams

type ListBookmarksParams struct {
	UserID uuid.UUID
	WorkID uuid.UUID
}

type ListDownloadTasksParams

type ListDownloadTasksParams struct {
	UserID   uuid.NullUUID
	State    pgtype.Text
	Before   *time.Time
	BeforeID uuid.NullUUID
	Lim      int32
}

type ListDownloadTasksRow

type ListDownloadTasksRow struct {
	Task          Task
	ChapterID     uuid.UUID
	ChapterNumber *float64
	ChapterTitle  string
	WorkID        uuid.UUID
	WorkTitle     string
}

type ListJobRunsParams

type ListJobRunsParams struct {
	JobID         string
	Status        pgtype.Text
	BeforeStarted *time.Time
	BeforeID      uuid.NullUUID
	Lim           int32
}

type ListLibraryParams

type ListLibraryParams struct {
	UserID     uuid.UUID
	Query      pgtype.Text
	AfterTitle pgtype.Text
	AfterID    uuid.NullUUID
	Lim        int32
}

type ListLibraryRow

type ListLibraryRow struct {
	Work         Work
	AddedAt      time.Time
	AutoDownload bool
}

type ListReaderSettingsParams

type ListReaderSettingsParams struct {
	UserID uuid.UUID
	Scopes []string
}

type ListSourcesRow

type ListSourcesRow struct {
	Source        Source
	PluginEnabled bool
}

type ListTasksParams

type ListTasksParams struct {
	Kind          pgtype.Text
	State         pgtype.Text
	BeforeCreated *time.Time
	BeforeID      uuid.NullUUID
	Lim           int32
}

type ListUsersParams

type ListUsersParams struct {
	After string
	Lim   int32
}

type MarkInviteUsedParams

type MarkInviteUsedParams struct {
	UsedBy uuid.NullUUID
	ID     uuid.UUID
}

type MarkLibrarySeenParams

type MarkLibrarySeenParams struct {
	UserID uuid.UUID
	WorkID uuid.UUID
}

type MarkSourceChaptersAbsentParams

type MarkSourceChaptersAbsentParams struct {
	SourceSeriesID uuid.UUID
	Listed         []string
}

type MarkSourcesAbsentParams

type MarkSourcesAbsentParams struct {
	PluginID string
	Listed   []string
}

type MoveChapterFileParams

type MoveChapterFileParams struct {
	StorageID string
	Key       string
	ID        uuid.UUID
}

type NetworkAssignment

type NetworkAssignment struct {
	TargetKind string
	TargetID   string
	ProfileID  pgtype.Text
	PluginID   pgtype.Text
	UpdatedAt  time.Time
}

type NetworkProfile

type NetworkProfile struct {
	ID               string
	Name             string
	ProxyID          pgtype.Text
	SolverID         pgtype.Text
	RateRequests     int32
	RatePeriodMs     int32
	RateBurst        int32
	RateScope        string
	Concurrency      int32
	UserAgentMode    string
	UserAgent        string
	DohUrl           string
	Headers          []byte
	SharedCookieJar  string
	ConnectTimeoutMs int32
	ReadTimeoutMs    int32
	CallTimeoutMs    int32
	OwnerKind        string
	OwnerID          string
	OwnerPlugin      pgtype.Text
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

type NetworkProxy

type NetworkProxy struct {
	ID             string
	Name           string
	Url            string
	Username       string
	PasswordSealed string
	CreatedAt      time.Time
	UpdatedAt      time.Time
	OwnerKind      string
	OwnerID        string
	OwnerPlugin    pgtype.Text
}

type NetworkPush

type NetworkPush struct {
	TargetKind string
	TargetID   string
	PluginID   pgtype.Text
	Hash       string
	Error      string
	PushedAt   time.Time
}

type NetworkSolver

type NetworkSolver struct {
	ID                 string
	Name               string
	Type               string
	Url                string
	SessionTtlSeconds  int32
	MaxTimeoutSeconds  int32
	AsResponseFallback bool
	CreatedAt          time.Time
	UpdatedAt          time.Time
	OwnerKind          string
	OwnerID            string
	OwnerPlugin        pgtype.Text
}

type NewChaptersForUserParams

type NewChaptersForUserParams struct {
	UserID  uuid.UUID
	WorkIds []uuid.UUID
}

type NewChaptersForUserRow

type NewChaptersForUserRow struct {
	WorkID uuid.UUID
	New    int64
}

type Plugin

type Plugin struct {
	ID            string
	Url           string
	ApiKey        string
	Config        string
	Enabled       bool
	Info          []byte
	Health        string
	HealthMessage string
	CheckedAt     *time.Time
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type Progress

type Progress struct {
	UserID    uuid.UUID
	ChapterID uuid.UUID
	WorkID    uuid.UUID
	Page      int32
	Pages     *int32
	Completed bool
	UpdatedAt time.Time
}

type PruneJobRunsParams

type PruneJobRunsParams struct {
	JobID string
	Keep  int32
}

type PutImageRetrySettingParams

type PutImageRetrySettingParams struct {
	TargetKind string
	TargetID   string
	DelaysMs   []int32
	PluginID   string
}

type PutPreferencesParams

type PutPreferencesParams struct {
	UserID      uuid.UUID
	Preferences []byte
}

type PutReaderSettingsParams

type PutReaderSettingsParams struct {
	UserID   uuid.UUID
	Scope    string
	Settings []byte
}

type PutSettingParams

type PutSettingParams struct {
	Key   string
	Value []byte
}

type Querier

type Querier interface {
	// Queued and running tasks of a kind whose payload has field = value.
	ActiveTasksOf(ctx context.Context, arg ActiveTasksOfParams) ([]Task, error)
	AddBookmarks(ctx context.Context, arg AddBookmarksParams) error
	AddLibraryEntry(ctx context.Context, arg AddLibraryEntryParams) (LibraryEntry, error)
	AssignVariants(ctx context.Context, arg AssignVariantsParams) error
	// Attached series of works someone follows: what scheduled update checks
	// look at.
	AttachedSeriesOfFollowedWorks(ctx context.Context) ([]SourceSeries, error)
	AttachedSourceIDsByWork(ctx context.Context, workIds []uuid.UUID) ([]AttachedSourceIDsByWorkRow, error)
	AttachedSourceSeries(ctx context.Context, workID uuid.UUID) ([]SourceSeries, error)
	AutoDownloadUsers(ctx context.Context, workID uuid.UUID) ([]uuid.UUID, error)
	CancelQueuedTask(ctx context.Context, id uuid.UUID) (Task, error)
	ChapterFileByKey(ctx context.Context, arg ChapterFileByKeyParams) (ChapterFile, error)
	ChapterVariants(ctx context.Context, chapterID uuid.UUID) ([]ChapterVariantsRow, error)
	// Due tasks of the given kinds, best first, locked for this transaction;
	// the caller picks the ones its limits allow and marks them running.
	ClaimCandidates(ctx context.Context, arg ClaimCandidatesParams) ([]Task, error)
	ClearDefaultStorage(ctx context.Context) error
	ClearHistory(ctx context.Context, userID uuid.UUID) error
	CountAttachedByWork(ctx context.Context, workIds []uuid.UUID) ([]CountAttachedByWorkRow, error)
	CountBookmarks(ctx context.Context, arg CountBookmarksParams) ([]CountBookmarksRow, error)
	CountChaptersByWork(ctx context.Context, arg CountChaptersByWorkParams) ([]CountChaptersByWorkRow, error)
	CountDownloadedByWork(ctx context.Context, workIds []uuid.UUID) ([]CountDownloadedByWorkRow, error)
	CountEnabledAdmins(ctx context.Context) (int64, error)
	CountFilesByStorage(ctx context.Context, storageID string) (int64, error)
	CountSourcesByPlugin(ctx context.Context) ([]CountSourcesByPluginRow, error)
	CountUsers(ctx context.Context) (int64, error)
	CreateAPIKey(ctx context.Context, arg CreateAPIKeyParams) (ApiKey, error)
	CreateInvite(ctx context.Context, arg CreateInviteParams) (Invite, error)
	CreateJobRun(ctx context.Context, arg CreateJobRunParams) (JobRun, error)
	CreatePlugin(ctx context.Context, arg CreatePluginParams) (Plugin, error)
	CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
	CreateStorage(ctx context.Context, arg CreateStorageParams) (Storage, error)
	CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
	DeleteAssignment(ctx context.Context, arg DeleteAssignmentParams) (int64, error)
	DeleteBookmarks(ctx context.Context, arg DeleteBookmarksParams) error
	DeleteChapterFile(ctx context.Context, id uuid.UUID) (int64, error)
	DeleteExpiredSessions(ctx context.Context) (int64, error)
	DeleteImageRetrySetting(ctx context.Context, arg DeleteImageRetrySettingParams) (int64, error)
	DeleteInvite(ctx context.Context, id uuid.UUID) (int64, error)
	DeletePlugin(ctx context.Context, id string) (int64, error)
	DeleteProfile(ctx context.Context, id string) (int64, error)
	DeleteProgress(ctx context.Context, arg DeleteProgressParams) error
	DeleteProxy(ctx context.Context, id string) (int64, error)
	DeleteReaderSettings(ctx context.Context, arg DeleteReaderSettingsParams) (int64, error)
	DeleteSession(ctx context.Context, id uuid.UUID) error
	DeleteSetting(ctx context.Context, key string) error
	DeleteSolver(ctx context.Context, id string) (int64, error)
	DeleteStorage(ctx context.Context, id string) (int64, error)
	DeleteUser(ctx context.Context, id uuid.UUID) (int64, error)
	DeleteUserAPIKey(ctx context.Context, arg DeleteUserAPIKeyParams) (int64, error)
	DeleteUserSession(ctx context.Context, arg DeleteUserSessionParams) (int64, error)
	DeleteUserSessions(ctx context.Context, userID uuid.UUID) error
	DeleteUserSessionsExcept(ctx context.Context, arg DeleteUserSessionsExceptParams) error
	// Before attaching another series of the same source.
	DemoteAttached(ctx context.Context, arg DemoteAttachedParams) error
	DownloadedChapterIDs(ctx context.Context, workID uuid.UUID) ([]uuid.UUID, error)
	// Candidates of a source are replaced on every matching run.
	DropCandidates(ctx context.Context, arg DropCandidatesParams) error
	ExtendTaskLease(ctx context.Context, arg ExtendTaskLeaseParams) error
	FailInterruptedJobRuns(ctx context.Context) (int64, error)
	FilesOnStorage(ctx context.Context, arg FilesOnStorageParams) ([]ChapterFile, error)
	FinishJobRun(ctx context.Context, arg FinishJobRunParams) (JobRun, error)
	FinishTask(ctx context.Context, arg FinishTaskParams) (Task, error)
	// Works someone follows, least recently refreshed first.
	FollowedWorksBySync(ctx context.Context, lim int32) ([]Work, error)
	GetAPIKeyByHash(ctx context.Context, keyHash []byte) (GetAPIKeyByHashRow, error)
	GetChapter(ctx context.Context, id uuid.UUID) (Chapter, error)
	GetChapterFile(ctx context.Context, chapterID uuid.UUID) (ChapterFile, error)
	GetDefaultStorage(ctx context.Context) (Storage, error)
	GetImageRetrySetting(ctx context.Context, arg GetImageRetrySettingParams) (ImageRetrySetting, error)
	GetJobRun(ctx context.Context, id uuid.UUID) (JobRun, error)
	GetLibraryEntry(ctx context.Context, arg GetLibraryEntryParams) (LibraryEntry, error)
	GetLiveTaskByDedupeKey(ctx context.Context, dedupeKey string) (Task, error)
	GetOpenInviteByTokenHash(ctx context.Context, tokenHash []byte) (Invite, error)
	GetOpenInviteByTokenHashForUpdate(ctx context.Context, tokenHash []byte) (Invite, error)
	GetPlugin(ctx context.Context, id string) (Plugin, error)
	GetPreferences(ctx context.Context, userID uuid.UUID) (UserPreference, error)
	GetProfile(ctx context.Context, id string) (NetworkProfile, error)
	GetProgress(ctx context.Context, arg GetProgressParams) (Progress, error)
	GetProxy(ctx context.Context, id string) (NetworkProxy, error)
	GetSessionByTokenHash(ctx context.Context, tokenHash []byte) (GetSessionByTokenHashRow, error)
	GetSetting(ctx context.Context, key string) ([]byte, error)
	GetSolver(ctx context.Context, id string) (NetworkSolver, error)
	GetSource(ctx context.Context, id string) (GetSourceRow, error)
	GetSourceSeries(ctx context.Context, id uuid.UUID) (SourceSeries, error)
	GetStorage(ctx context.Context, id string) (Storage, error)
	GetTask(ctx context.Context, id uuid.UUID) (Task, error)
	GetUser(ctx context.Context, id uuid.UUID) (User, error)
	GetUserByUsername(ctx context.Context, username string) (User, error)
	GetUserForUpdate(ctx context.Context, id uuid.UUID) (User, error)
	GetWork(ctx context.Context, id uuid.UUID) (Work, error)
	GetWorkByEntry(ctx context.Context, metaEntryID string) (Work, error)
	HideHistory(ctx context.Context, arg HideHistoryParams) error
	// A user's reading, newest first, without what they took out of view;
	// one entry per chapter, or per series (the latest chapter) with
	// per_series; narrowed to a series or by its title.
	History(ctx context.Context, arg HistoryParams) ([]HistoryRow, error)
	// Asking again for queued work brings it forward (e.g. a refresh while a
	// retry waits out its back-off).
	HurryTask(ctx context.Context, arg HurryTaskParams) (Task, error)
	// A source's own setting and its package's.
	ImageRetrySettingsFor(ctx context.Context, arg ImageRetrySettingsForParams) ([]ImageRetrySetting, error)
	InsertChapter(ctx context.Context, arg InsertChapterParams) (Chapter, error)
	InsertChapterFile(ctx context.Context, arg InsertChapterFileParams) (ChapterFile, error)
	InsertProfile(ctx context.Context, arg InsertProfileParams) (NetworkProfile, error)
	InsertProxy(ctx context.Context, arg InsertProxyParams) (NetworkProxy, error)
	InsertSolver(ctx context.Context, arg InsertSolverParams) (NetworkSolver, error)
	// Returns no row when a live task with the same dedupe key exists.
	InsertTask(ctx context.Context, arg InsertTaskParams) (Task, error)
	LastJobRuns(ctx context.Context) ([]JobRun, error)
	// The chapters of some works, with when their chosen copy was uploaded.
	LibraryChapters(ctx context.Context, workIds []uuid.UUID) ([]LibraryChaptersRow, error)
	LibraryProgress(ctx context.Context, arg LibraryProgressParams) ([]Progress, error)
	LibraryUserIDs(ctx context.Context, workID uuid.UUID) ([]uuid.UUID, error)
	// Every work in a user's library (content filters run in Go).
	LibraryWorks(ctx context.Context, userID uuid.UUID) ([]Work, error)
	// Which of these catalogue entries are in a user's library, as which work.
	LibraryWorksByEntries(ctx context.Context, arg LibraryWorksByEntriesParams) ([]LibraryWorksByEntriesRow, error)
	ListAPIKeysByUser(ctx context.Context, userID uuid.UUID) ([]ApiKey, error)
	ListAssignments(ctx context.Context) ([]NetworkAssignment, error)
	ListBookmarks(ctx context.Context, arg ListBookmarksParams) ([]uuid.UUID, error)
	ListChapters(ctx context.Context, workID uuid.UUID) ([]Chapter, error)
	// Download tasks with their chapter and work, newest first; users see the
	// ones they asked for, admins all.
	ListDownloadTasks(ctx context.Context, arg ListDownloadTasksParams) ([]ListDownloadTasksRow, error)
	ListJobRuns(ctx context.Context, arg ListJobRunsParams) ([]JobRun, error)
	// A user's library by title, after a (sort_title, id) cursor. Content
	// filters run in Go (they depend on the user's grants).
	ListLibrary(ctx context.Context, arg ListLibraryParams) ([]ListLibraryRow, error)
	ListOpenInvites(ctx context.Context) ([]Invite, error)
	ListPlugins(ctx context.Context) ([]Plugin, error)
	ListProfiles(ctx context.Context) ([]NetworkProfile, error)
	ListProxies(ctx context.Context) ([]NetworkProxy, error)
	ListPushes(ctx context.Context, targetKind string) ([]NetworkPush, error)
	ListReaderSettings(ctx context.Context, arg ListReaderSettingsParams) ([]ReaderSetting, error)
	ListSessionsByUser(ctx context.Context, userID uuid.UUID) ([]Session, error)
	ListSettings(ctx context.Context) ([]Setting, error)
	ListSolvers(ctx context.Context) ([]NetworkSolver, error)
	ListSourceChaptersBySeries(ctx context.Context, sourceSeriesID uuid.UUID) ([]SourceChapter, error)
	ListSourceSeries(ctx context.Context, workID uuid.UUID) ([]SourceSeries, error)
	ListSources(ctx context.Context) ([]ListSourcesRow, error)
	ListStorages(ctx context.Context) ([]Storage, error)
	ListTasks(ctx context.Context, arg ListTasksParams) ([]Task, error)
	ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
	ListWorkSourceMatches(ctx context.Context, workID uuid.UUID) ([]WorkSourceMatch, error)
	// Serialises changes that check "is there another admin?" or "is this the
	// first account?" within one transaction.
	LockAccounts(ctx context.Context) error
	LockWork(ctx context.Context, id uuid.UUID) error
	MarkInviteUsed(ctx context.Context, arg MarkInviteUsedParams) error
	MarkLibrarySeen(ctx context.Context, arg MarkLibrarySeenParams) (int64, error)
	MarkSourceChaptersAbsent(ctx context.Context, arg MarkSourceChaptersAbsentParams) error
	MarkSourcesAbsent(ctx context.Context, arg MarkSourcesAbsentParams) error
	MoveChapterFile(ctx context.Context, arg MoveChapterFileParams) error
	// Chapters found after each library entry was last seen.
	NewChaptersForUser(ctx context.Context, arg NewChaptersForUserParams) ([]NewChaptersForUserRow, error)
	PruneFinishedTasks(ctx context.Context, before *time.Time) (int64, error)
	PruneJobRuns(ctx context.Context, arg PruneJobRunsParams) (int64, error)
	PutImageRetrySetting(ctx context.Context, arg PutImageRetrySettingParams) (ImageRetrySetting, error)
	PutPreferences(ctx context.Context, arg PutPreferencesParams) (UserPreference, error)
	PutReaderSettings(ctx context.Context, arg PutReaderSettingsParams) (ReaderSetting, error)
	PutSetting(ctx context.Context, arg PutSettingParams) error
	RemoveLibraryEntry(ctx context.Context, arg RemoveLibraryEntryParams) (int64, error)
	// Running tasks whose lease ran out (the server stopped) go back to the
	// queue.
	RequeueExpiredTasks(ctx context.Context) (int64, error)
	// Retry by hand: a failed or cancelled task runs again with fresh attempts.
	RequeueTask(ctx context.Context, id uuid.UUID) (Task, error)
	RetryTaskLater(ctx context.Context, arg RetryTaskLaterParams) (Task, error)
	SetAutoDownload(ctx context.Context, arg SetAutoDownloadParams) (int64, error)
	SetChapterPin(ctx context.Context, arg SetChapterPinParams) error
	SetDefaultStorage(ctx context.Context, id string) (int64, error)
	SetJobRunProgress(ctx context.Context, arg SetJobRunProgressParams) error
	SetPluginConfig(ctx context.Context, arg SetPluginConfigParams) error
	SetPluginState(ctx context.Context, arg SetPluginStateParams) (Plugin, error)
	SetSeriesChecked(ctx context.Context, arg SetSeriesCheckedParams) error
	SetSourceEnabled(ctx context.Context, arg SetSourceEnabledParams) (int64, error)
	SetSourcePriority(ctx context.Context, arg SetSourcePriorityParams) (int64, error)
	SetSourceSeriesState(ctx context.Context, arg SetSourceSeriesStateParams) (SourceSeries, error)
	SetTaskProgress(ctx context.Context, arg SetTaskProgressParams) error
	// Why a plugin's absent sources are absent: "language" for those its
	// installed packages still provide in a language turned off.
	SetUnavailableReasons(ctx context.Context, arg SetUnavailableReasonsParams) error
	SetUserPassword(ctx context.Context, arg SetUserPasswordParams) error
	StartTask(ctx context.Context, arg StartTaskParams) (Task, error)
	TaskStats(ctx context.Context) ([]TaskStatsRow, error)
	TouchAPIKey(ctx context.Context, id uuid.UUID) error
	TouchSession(ctx context.Context, arg TouchSessionParams) error
	TouchUserLogin(ctx context.Context, id uuid.UUID) error
	// Back to the queue without counting the attempt (the server stopped).
	UnclaimTask(ctx context.Context, id uuid.UUID) (Task, error)
	UpdateChapter(ctx context.Context, arg UpdateChapterParams) error
	// How the chapter checks of these works' attached series stand.
	UpdateChecksOf(ctx context.Context, workIds []uuid.UUID) (UpdateChecksOfRow, error)
	UpdatePlugin(ctx context.Context, arg UpdatePluginParams) (Plugin, error)
	UpdateProfile(ctx context.Context, arg UpdateProfileParams) (NetworkProfile, error)
	UpdateProxy(ctx context.Context, arg UpdateProxyParams) (NetworkProxy, error)
	UpdateSolver(ctx context.Context, arg UpdateSolverParams) (NetworkSolver, error)
	UpdateStorage(ctx context.Context, arg UpdateStorageParams) (Storage, error)
	UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
	UpdateWorkDisplay(ctx context.Context, arg UpdateWorkDisplayParams) (Work, error)
	// Chapters that appeared in these works of a user's library since they
	// added each, newest first, with the user's progress and the chapter's
	// download.
	Updates(ctx context.Context, arg UpdatesParams) ([]UpdatesRow, error)
	UpsertAssignment(ctx context.Context, arg UpsertAssignmentParams) (NetworkAssignment, error)
	UpsertProgress(ctx context.Context, arg UpsertProgressParams) (Progress, error)
	UpsertPush(ctx context.Context, arg UpsertPushParams) error
	UpsertSource(ctx context.Context, arg UpsertSourceParams) error
	// A variant new to a series that was listed before is announced.
	UpsertSourceChapter(ctx context.Context, arg UpsertSourceChapterParams) error
	// Records a series found for a work. An attached or rejected series keeps
	// its state when matching finds it again.
	UpsertSourceSeries(ctx context.Context, arg UpsertSourceSeriesParams) (SourceSeries, error)
	UpsertWork(ctx context.Context, arg UpsertWorkParams) (UpsertWorkRow, error)
	UpsertWorkSourceMatch(ctx context.Context, arg UpsertWorkSourceMatchParams) error
	WorkProgress(ctx context.Context, arg WorkProgressParams) ([]Progress, error)
	// Present chapters of a work's attached series, with what decides the
	// preferred variant.
	WorkVariants(ctx context.Context, workID uuid.UUID) ([]WorkVariantsRow, error)
	// Works with a series attached on any of these sources.
	WorksOnSources(ctx context.Context, sourceIds []string) ([]uuid.UUID, error)
	WorksWithAttachedSeries(ctx context.Context) ([]uuid.UUID, error)
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) ActiveTasksOf

func (q *Queries) ActiveTasksOf(ctx context.Context, arg ActiveTasksOfParams) ([]Task, error)

Queued and running tasks of a kind whose payload has field = value.

func (*Queries) AddBookmarks

func (q *Queries) AddBookmarks(ctx context.Context, arg AddBookmarksParams) error

func (*Queries) AddLibraryEntry

func (q *Queries) AddLibraryEntry(ctx context.Context, arg AddLibraryEntryParams) (LibraryEntry, error)

func (*Queries) AssignVariants

func (q *Queries) AssignVariants(ctx context.Context, arg AssignVariantsParams) error

func (*Queries) AttachedSeriesOfFollowedWorks

func (q *Queries) AttachedSeriesOfFollowedWorks(ctx context.Context) ([]SourceSeries, error)

Attached series of works someone follows: what scheduled update checks look at.

func (*Queries) AttachedSourceIDsByWork

func (q *Queries) AttachedSourceIDsByWork(ctx context.Context, workIds []uuid.UUID) ([]AttachedSourceIDsByWorkRow, error)

func (*Queries) AttachedSourceSeries

func (q *Queries) AttachedSourceSeries(ctx context.Context, workID uuid.UUID) ([]SourceSeries, error)

func (*Queries) AutoDownloadUsers

func (q *Queries) AutoDownloadUsers(ctx context.Context, workID uuid.UUID) ([]uuid.UUID, error)

func (*Queries) CancelQueuedTask

func (q *Queries) CancelQueuedTask(ctx context.Context, id uuid.UUID) (Task, error)

func (*Queries) ChapterFileByKey

func (q *Queries) ChapterFileByKey(ctx context.Context, arg ChapterFileByKeyParams) (ChapterFile, error)

func (*Queries) ChapterVariants

func (q *Queries) ChapterVariants(ctx context.Context, chapterID uuid.UUID) ([]ChapterVariantsRow, error)

func (*Queries) ClaimCandidates

func (q *Queries) ClaimCandidates(ctx context.Context, arg ClaimCandidatesParams) ([]Task, error)

Due tasks of the given kinds, best first, locked for this transaction; the caller picks the ones its limits allow and marks them running.

func (*Queries) ClearDefaultStorage

func (q *Queries) ClearDefaultStorage(ctx context.Context) error

func (*Queries) ClearHistory

func (q *Queries) ClearHistory(ctx context.Context, userID uuid.UUID) error

func (*Queries) CountAttachedByWork

func (q *Queries) CountAttachedByWork(ctx context.Context, workIds []uuid.UUID) ([]CountAttachedByWorkRow, error)

func (*Queries) CountBookmarks

func (q *Queries) CountBookmarks(ctx context.Context, arg CountBookmarksParams) ([]CountBookmarksRow, error)

func (*Queries) CountChaptersByWork

func (q *Queries) CountChaptersByWork(ctx context.Context, arg CountChaptersByWorkParams) ([]CountChaptersByWorkRow, error)

func (*Queries) CountDownloadedByWork

func (q *Queries) CountDownloadedByWork(ctx context.Context, workIds []uuid.UUID) ([]CountDownloadedByWorkRow, error)

func (*Queries) CountEnabledAdmins

func (q *Queries) CountEnabledAdmins(ctx context.Context) (int64, error)

func (*Queries) CountFilesByStorage

func (q *Queries) CountFilesByStorage(ctx context.Context, storageID string) (int64, error)

func (*Queries) CountSourcesByPlugin

func (q *Queries) CountSourcesByPlugin(ctx context.Context) ([]CountSourcesByPluginRow, error)

func (*Queries) CountUsers

func (q *Queries) CountUsers(ctx context.Context) (int64, error)

func (*Queries) CreateAPIKey

func (q *Queries) CreateAPIKey(ctx context.Context, arg CreateAPIKeyParams) (ApiKey, error)

func (*Queries) CreateInvite

func (q *Queries) CreateInvite(ctx context.Context, arg CreateInviteParams) (Invite, error)

func (*Queries) CreateJobRun

func (q *Queries) CreateJobRun(ctx context.Context, arg CreateJobRunParams) (JobRun, error)

func (*Queries) CreatePlugin

func (q *Queries) CreatePlugin(ctx context.Context, arg CreatePluginParams) (Plugin, error)

func (*Queries) CreateSession

func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)

func (*Queries) CreateStorage

func (q *Queries) CreateStorage(ctx context.Context, arg CreateStorageParams) (Storage, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)

func (*Queries) DeleteAssignment

func (q *Queries) DeleteAssignment(ctx context.Context, arg DeleteAssignmentParams) (int64, error)

func (*Queries) DeleteBookmarks

func (q *Queries) DeleteBookmarks(ctx context.Context, arg DeleteBookmarksParams) error

func (*Queries) DeleteChapterFile

func (q *Queries) DeleteChapterFile(ctx context.Context, id uuid.UUID) (int64, error)

func (*Queries) DeleteExpiredSessions

func (q *Queries) DeleteExpiredSessions(ctx context.Context) (int64, error)

func (*Queries) DeleteImageRetrySetting

func (q *Queries) DeleteImageRetrySetting(ctx context.Context, arg DeleteImageRetrySettingParams) (int64, error)

func (*Queries) DeleteInvite

func (q *Queries) DeleteInvite(ctx context.Context, id uuid.UUID) (int64, error)

func (*Queries) DeletePlugin

func (q *Queries) DeletePlugin(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteProfile

func (q *Queries) DeleteProfile(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteProgress

func (q *Queries) DeleteProgress(ctx context.Context, arg DeleteProgressParams) error

func (*Queries) DeleteProxy

func (q *Queries) DeleteProxy(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteReaderSettings

func (q *Queries) DeleteReaderSettings(ctx context.Context, arg DeleteReaderSettingsParams) (int64, error)

func (*Queries) DeleteSession

func (q *Queries) DeleteSession(ctx context.Context, id uuid.UUID) error

func (*Queries) DeleteSetting

func (q *Queries) DeleteSetting(ctx context.Context, key string) error

func (*Queries) DeleteSolver

func (q *Queries) DeleteSolver(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteStorage

func (q *Queries) DeleteStorage(ctx context.Context, id string) (int64, error)

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, id uuid.UUID) (int64, error)

func (*Queries) DeleteUserAPIKey

func (q *Queries) DeleteUserAPIKey(ctx context.Context, arg DeleteUserAPIKeyParams) (int64, error)

func (*Queries) DeleteUserSession

func (q *Queries) DeleteUserSession(ctx context.Context, arg DeleteUserSessionParams) (int64, error)

func (*Queries) DeleteUserSessions

func (q *Queries) DeleteUserSessions(ctx context.Context, userID uuid.UUID) error

func (*Queries) DeleteUserSessionsExcept

func (q *Queries) DeleteUserSessionsExcept(ctx context.Context, arg DeleteUserSessionsExceptParams) error

func (*Queries) DemoteAttached

func (q *Queries) DemoteAttached(ctx context.Context, arg DemoteAttachedParams) error

Before attaching another series of the same source.

func (*Queries) DownloadedChapterIDs

func (q *Queries) DownloadedChapterIDs(ctx context.Context, workID uuid.UUID) ([]uuid.UUID, error)

func (*Queries) DropCandidates

func (q *Queries) DropCandidates(ctx context.Context, arg DropCandidatesParams) error

Candidates of a source are replaced on every matching run.

func (*Queries) ExtendTaskLease

func (q *Queries) ExtendTaskLease(ctx context.Context, arg ExtendTaskLeaseParams) error

func (*Queries) FailInterruptedJobRuns

func (q *Queries) FailInterruptedJobRuns(ctx context.Context) (int64, error)

func (*Queries) FilesOnStorage

func (q *Queries) FilesOnStorage(ctx context.Context, arg FilesOnStorageParams) ([]ChapterFile, error)

func (*Queries) FinishJobRun

func (q *Queries) FinishJobRun(ctx context.Context, arg FinishJobRunParams) (JobRun, error)

func (*Queries) FinishTask

func (q *Queries) FinishTask(ctx context.Context, arg FinishTaskParams) (Task, error)

func (*Queries) FollowedWorksBySync

func (q *Queries) FollowedWorksBySync(ctx context.Context, lim int32) ([]Work, error)

Works someone follows, least recently refreshed first.

func (*Queries) GetAPIKeyByHash

func (q *Queries) GetAPIKeyByHash(ctx context.Context, keyHash []byte) (GetAPIKeyByHashRow, error)

func (*Queries) GetChapter

func (q *Queries) GetChapter(ctx context.Context, id uuid.UUID) (Chapter, error)

func (*Queries) GetChapterFile

func (q *Queries) GetChapterFile(ctx context.Context, chapterID uuid.UUID) (ChapterFile, error)

func (*Queries) GetDefaultStorage

func (q *Queries) GetDefaultStorage(ctx context.Context) (Storage, error)

func (*Queries) GetImageRetrySetting

func (q *Queries) GetImageRetrySetting(ctx context.Context, arg GetImageRetrySettingParams) (ImageRetrySetting, error)

func (*Queries) GetJobRun

func (q *Queries) GetJobRun(ctx context.Context, id uuid.UUID) (JobRun, error)

func (*Queries) GetLibraryEntry

func (q *Queries) GetLibraryEntry(ctx context.Context, arg GetLibraryEntryParams) (LibraryEntry, error)

func (*Queries) GetLiveTaskByDedupeKey

func (q *Queries) GetLiveTaskByDedupeKey(ctx context.Context, dedupeKey string) (Task, error)

func (*Queries) GetOpenInviteByTokenHash

func (q *Queries) GetOpenInviteByTokenHash(ctx context.Context, tokenHash []byte) (Invite, error)

func (*Queries) GetOpenInviteByTokenHashForUpdate

func (q *Queries) GetOpenInviteByTokenHashForUpdate(ctx context.Context, tokenHash []byte) (Invite, error)

func (*Queries) GetPlugin

func (q *Queries) GetPlugin(ctx context.Context, id string) (Plugin, error)

func (*Queries) GetPreferences

func (q *Queries) GetPreferences(ctx context.Context, userID uuid.UUID) (UserPreference, error)

func (*Queries) GetProfile

func (q *Queries) GetProfile(ctx context.Context, id string) (NetworkProfile, error)

func (*Queries) GetProgress

func (q *Queries) GetProgress(ctx context.Context, arg GetProgressParams) (Progress, error)

func (*Queries) GetProxy

func (q *Queries) GetProxy(ctx context.Context, id string) (NetworkProxy, error)

func (*Queries) GetSessionByTokenHash

func (q *Queries) GetSessionByTokenHash(ctx context.Context, tokenHash []byte) (GetSessionByTokenHashRow, error)

func (*Queries) GetSetting

func (q *Queries) GetSetting(ctx context.Context, key string) ([]byte, error)

func (*Queries) GetSolver

func (q *Queries) GetSolver(ctx context.Context, id string) (NetworkSolver, error)

func (*Queries) GetSource

func (q *Queries) GetSource(ctx context.Context, id string) (GetSourceRow, error)

func (*Queries) GetSourceSeries

func (q *Queries) GetSourceSeries(ctx context.Context, id uuid.UUID) (SourceSeries, error)

func (*Queries) GetStorage

func (q *Queries) GetStorage(ctx context.Context, id string) (Storage, error)

func (*Queries) GetTask

func (q *Queries) GetTask(ctx context.Context, id uuid.UUID) (Task, error)

func (*Queries) GetUser

func (q *Queries) GetUser(ctx context.Context, id uuid.UUID) (User, error)

func (*Queries) GetUserByUsername

func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error)

func (*Queries) GetUserForUpdate

func (q *Queries) GetUserForUpdate(ctx context.Context, id uuid.UUID) (User, error)

func (*Queries) GetWork

func (q *Queries) GetWork(ctx context.Context, id uuid.UUID) (Work, error)

func (*Queries) GetWorkByEntry

func (q *Queries) GetWorkByEntry(ctx context.Context, metaEntryID string) (Work, error)

func (*Queries) HideHistory

func (q *Queries) HideHistory(ctx context.Context, arg HideHistoryParams) error

func (*Queries) History

func (q *Queries) History(ctx context.Context, arg HistoryParams) ([]HistoryRow, error)

A user's reading, newest first, without what they took out of view; one entry per chapter, or per series (the latest chapter) with per_series; narrowed to a series or by its title.

func (*Queries) HurryTask

func (q *Queries) HurryTask(ctx context.Context, arg HurryTaskParams) (Task, error)

Asking again for queued work brings it forward (e.g. a refresh while a retry waits out its back-off).

func (*Queries) ImageRetrySettingsFor

func (q *Queries) ImageRetrySettingsFor(ctx context.Context, arg ImageRetrySettingsForParams) ([]ImageRetrySetting, error)

A source's own setting and its package's.

func (*Queries) InsertChapter

func (q *Queries) InsertChapter(ctx context.Context, arg InsertChapterParams) (Chapter, error)

func (*Queries) InsertChapterFile

func (q *Queries) InsertChapterFile(ctx context.Context, arg InsertChapterFileParams) (ChapterFile, error)

func (*Queries) InsertProfile

func (q *Queries) InsertProfile(ctx context.Context, arg InsertProfileParams) (NetworkProfile, error)

func (*Queries) InsertProxy

func (q *Queries) InsertProxy(ctx context.Context, arg InsertProxyParams) (NetworkProxy, error)

func (*Queries) InsertSolver

func (q *Queries) InsertSolver(ctx context.Context, arg InsertSolverParams) (NetworkSolver, error)

func (*Queries) InsertTask

func (q *Queries) InsertTask(ctx context.Context, arg InsertTaskParams) (Task, error)

Returns no row when a live task with the same dedupe key exists.

func (*Queries) LastJobRuns

func (q *Queries) LastJobRuns(ctx context.Context) ([]JobRun, error)

func (*Queries) LibraryChapters

func (q *Queries) LibraryChapters(ctx context.Context, workIds []uuid.UUID) ([]LibraryChaptersRow, error)

The chapters of some works, with when their chosen copy was uploaded.

func (*Queries) LibraryProgress

func (q *Queries) LibraryProgress(ctx context.Context, arg LibraryProgressParams) ([]Progress, error)

func (*Queries) LibraryUserIDs

func (q *Queries) LibraryUserIDs(ctx context.Context, workID uuid.UUID) ([]uuid.UUID, error)

func (*Queries) LibraryWorks

func (q *Queries) LibraryWorks(ctx context.Context, userID uuid.UUID) ([]Work, error)

Every work in a user's library (content filters run in Go).

func (*Queries) LibraryWorksByEntries

func (q *Queries) LibraryWorksByEntries(ctx context.Context, arg LibraryWorksByEntriesParams) ([]LibraryWorksByEntriesRow, error)

Which of these catalogue entries are in a user's library, as which work.

func (*Queries) ListAPIKeysByUser

func (q *Queries) ListAPIKeysByUser(ctx context.Context, userID uuid.UUID) ([]ApiKey, error)

func (*Queries) ListAssignments

func (q *Queries) ListAssignments(ctx context.Context) ([]NetworkAssignment, error)

func (*Queries) ListBookmarks

func (q *Queries) ListBookmarks(ctx context.Context, arg ListBookmarksParams) ([]uuid.UUID, error)

func (*Queries) ListChapters

func (q *Queries) ListChapters(ctx context.Context, workID uuid.UUID) ([]Chapter, error)

func (*Queries) ListDownloadTasks

func (q *Queries) ListDownloadTasks(ctx context.Context, arg ListDownloadTasksParams) ([]ListDownloadTasksRow, error)

Download tasks with their chapter and work, newest first; users see the ones they asked for, admins all.

func (*Queries) ListJobRuns

func (q *Queries) ListJobRuns(ctx context.Context, arg ListJobRunsParams) ([]JobRun, error)

func (*Queries) ListLibrary

func (q *Queries) ListLibrary(ctx context.Context, arg ListLibraryParams) ([]ListLibraryRow, error)

A user's library by title, after a (sort_title, id) cursor. Content filters run in Go (they depend on the user's grants).

func (*Queries) ListOpenInvites

func (q *Queries) ListOpenInvites(ctx context.Context) ([]Invite, error)

func (*Queries) ListPlugins

func (q *Queries) ListPlugins(ctx context.Context) ([]Plugin, error)

func (*Queries) ListProfiles

func (q *Queries) ListProfiles(ctx context.Context) ([]NetworkProfile, error)

func (*Queries) ListProxies

func (q *Queries) ListProxies(ctx context.Context) ([]NetworkProxy, error)

func (*Queries) ListPushes

func (q *Queries) ListPushes(ctx context.Context, targetKind string) ([]NetworkPush, error)

func (*Queries) ListReaderSettings

func (q *Queries) ListReaderSettings(ctx context.Context, arg ListReaderSettingsParams) ([]ReaderSetting, error)

func (*Queries) ListSessionsByUser

func (q *Queries) ListSessionsByUser(ctx context.Context, userID uuid.UUID) ([]Session, error)

func (*Queries) ListSettings

func (q *Queries) ListSettings(ctx context.Context) ([]Setting, error)

func (*Queries) ListSolvers

func (q *Queries) ListSolvers(ctx context.Context) ([]NetworkSolver, error)

func (*Queries) ListSourceChaptersBySeries

func (q *Queries) ListSourceChaptersBySeries(ctx context.Context, sourceSeriesID uuid.UUID) ([]SourceChapter, error)

func (*Queries) ListSourceSeries

func (q *Queries) ListSourceSeries(ctx context.Context, workID uuid.UUID) ([]SourceSeries, error)

func (*Queries) ListSources

func (q *Queries) ListSources(ctx context.Context) ([]ListSourcesRow, error)

func (*Queries) ListStorages

func (q *Queries) ListStorages(ctx context.Context) ([]Storage, error)

func (*Queries) ListTasks

func (q *Queries) ListTasks(ctx context.Context, arg ListTasksParams) ([]Task, error)

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)

func (*Queries) ListWorkSourceMatches

func (q *Queries) ListWorkSourceMatches(ctx context.Context, workID uuid.UUID) ([]WorkSourceMatch, error)

func (*Queries) LockAccounts

func (q *Queries) LockAccounts(ctx context.Context) error

Serialises changes that check "is there another admin?" or "is this the first account?" within one transaction.

func (*Queries) LockWork

func (q *Queries) LockWork(ctx context.Context, id uuid.UUID) error

func (*Queries) MarkInviteUsed

func (q *Queries) MarkInviteUsed(ctx context.Context, arg MarkInviteUsedParams) error

func (*Queries) MarkLibrarySeen

func (q *Queries) MarkLibrarySeen(ctx context.Context, arg MarkLibrarySeenParams) (int64, error)

func (*Queries) MarkSourceChaptersAbsent

func (q *Queries) MarkSourceChaptersAbsent(ctx context.Context, arg MarkSourceChaptersAbsentParams) error

func (*Queries) MarkSourcesAbsent

func (q *Queries) MarkSourcesAbsent(ctx context.Context, arg MarkSourcesAbsentParams) error

func (*Queries) MoveChapterFile

func (q *Queries) MoveChapterFile(ctx context.Context, arg MoveChapterFileParams) error

func (*Queries) NewChaptersForUser

func (q *Queries) NewChaptersForUser(ctx context.Context, arg NewChaptersForUserParams) ([]NewChaptersForUserRow, error)

Chapters found after each library entry was last seen.

func (*Queries) PruneFinishedTasks

func (q *Queries) PruneFinishedTasks(ctx context.Context, before *time.Time) (int64, error)

func (*Queries) PruneJobRuns

func (q *Queries) PruneJobRuns(ctx context.Context, arg PruneJobRunsParams) (int64, error)

func (*Queries) PutImageRetrySetting

func (q *Queries) PutImageRetrySetting(ctx context.Context, arg PutImageRetrySettingParams) (ImageRetrySetting, error)

func (*Queries) PutPreferences

func (q *Queries) PutPreferences(ctx context.Context, arg PutPreferencesParams) (UserPreference, error)

func (*Queries) PutReaderSettings

func (q *Queries) PutReaderSettings(ctx context.Context, arg PutReaderSettingsParams) (ReaderSetting, error)

func (*Queries) PutSetting

func (q *Queries) PutSetting(ctx context.Context, arg PutSettingParams) error

func (*Queries) RemoveLibraryEntry

func (q *Queries) RemoveLibraryEntry(ctx context.Context, arg RemoveLibraryEntryParams) (int64, error)

func (*Queries) RequeueExpiredTasks

func (q *Queries) RequeueExpiredTasks(ctx context.Context) (int64, error)

Running tasks whose lease ran out (the server stopped) go back to the queue.

func (*Queries) RequeueTask

func (q *Queries) RequeueTask(ctx context.Context, id uuid.UUID) (Task, error)

Retry by hand: a failed or cancelled task runs again with fresh attempts.

func (*Queries) RetryTaskLater

func (q *Queries) RetryTaskLater(ctx context.Context, arg RetryTaskLaterParams) (Task, error)

func (*Queries) SetAutoDownload

func (q *Queries) SetAutoDownload(ctx context.Context, arg SetAutoDownloadParams) (int64, error)

func (*Queries) SetChapterPin

func (q *Queries) SetChapterPin(ctx context.Context, arg SetChapterPinParams) error

func (*Queries) SetDefaultStorage

func (q *Queries) SetDefaultStorage(ctx context.Context, id string) (int64, error)

func (*Queries) SetJobRunProgress

func (q *Queries) SetJobRunProgress(ctx context.Context, arg SetJobRunProgressParams) error

func (*Queries) SetPluginConfig

func (q *Queries) SetPluginConfig(ctx context.Context, arg SetPluginConfigParams) error

func (*Queries) SetPluginState

func (q *Queries) SetPluginState(ctx context.Context, arg SetPluginStateParams) (Plugin, error)

func (*Queries) SetSeriesChecked

func (q *Queries) SetSeriesChecked(ctx context.Context, arg SetSeriesCheckedParams) error

func (*Queries) SetSourceEnabled

func (q *Queries) SetSourceEnabled(ctx context.Context, arg SetSourceEnabledParams) (int64, error)

func (*Queries) SetSourcePriority

func (q *Queries) SetSourcePriority(ctx context.Context, arg SetSourcePriorityParams) (int64, error)

func (*Queries) SetSourceSeriesState

func (q *Queries) SetSourceSeriesState(ctx context.Context, arg SetSourceSeriesStateParams) (SourceSeries, error)

func (*Queries) SetTaskProgress

func (q *Queries) SetTaskProgress(ctx context.Context, arg SetTaskProgressParams) error

func (*Queries) SetUnavailableReasons

func (q *Queries) SetUnavailableReasons(ctx context.Context, arg SetUnavailableReasonsParams) error

Why a plugin's absent sources are absent: "language" for those its installed packages still provide in a language turned off.

func (*Queries) SetUserPassword

func (q *Queries) SetUserPassword(ctx context.Context, arg SetUserPasswordParams) error

func (*Queries) StartTask

func (q *Queries) StartTask(ctx context.Context, arg StartTaskParams) (Task, error)

func (*Queries) TaskStats

func (q *Queries) TaskStats(ctx context.Context) ([]TaskStatsRow, error)

func (*Queries) TouchAPIKey

func (q *Queries) TouchAPIKey(ctx context.Context, id uuid.UUID) error

func (*Queries) TouchSession

func (q *Queries) TouchSession(ctx context.Context, arg TouchSessionParams) error

func (*Queries) TouchUserLogin

func (q *Queries) TouchUserLogin(ctx context.Context, id uuid.UUID) error

func (*Queries) UnclaimTask

func (q *Queries) UnclaimTask(ctx context.Context, id uuid.UUID) (Task, error)

Back to the queue without counting the attempt (the server stopped).

func (*Queries) UpdateChapter

func (q *Queries) UpdateChapter(ctx context.Context, arg UpdateChapterParams) error

func (*Queries) UpdateChecksOf

func (q *Queries) UpdateChecksOf(ctx context.Context, workIds []uuid.UUID) (UpdateChecksOfRow, error)

How the chapter checks of these works' attached series stand.

func (*Queries) UpdatePlugin

func (q *Queries) UpdatePlugin(ctx context.Context, arg UpdatePluginParams) (Plugin, error)

func (*Queries) UpdateProfile

func (q *Queries) UpdateProfile(ctx context.Context, arg UpdateProfileParams) (NetworkProfile, error)

func (*Queries) UpdateProxy

func (q *Queries) UpdateProxy(ctx context.Context, arg UpdateProxyParams) (NetworkProxy, error)

func (*Queries) UpdateSolver

func (q *Queries) UpdateSolver(ctx context.Context, arg UpdateSolverParams) (NetworkSolver, error)

func (*Queries) UpdateStorage

func (q *Queries) UpdateStorage(ctx context.Context, arg UpdateStorageParams) (Storage, error)

func (*Queries) UpdateUser

func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)

func (*Queries) UpdateWorkDisplay

func (q *Queries) UpdateWorkDisplay(ctx context.Context, arg UpdateWorkDisplayParams) (Work, error)

func (*Queries) Updates

func (q *Queries) Updates(ctx context.Context, arg UpdatesParams) ([]UpdatesRow, error)

Chapters that appeared in these works of a user's library since they added each, newest first, with the user's progress and the chapter's download.

func (*Queries) UpsertAssignment

func (q *Queries) UpsertAssignment(ctx context.Context, arg UpsertAssignmentParams) (NetworkAssignment, error)

func (*Queries) UpsertProgress

func (q *Queries) UpsertProgress(ctx context.Context, arg UpsertProgressParams) (Progress, error)

func (*Queries) UpsertPush

func (q *Queries) UpsertPush(ctx context.Context, arg UpsertPushParams) error

func (*Queries) UpsertSource

func (q *Queries) UpsertSource(ctx context.Context, arg UpsertSourceParams) error

func (*Queries) UpsertSourceChapter

func (q *Queries) UpsertSourceChapter(ctx context.Context, arg UpsertSourceChapterParams) error

A variant new to a series that was listed before is announced.

func (*Queries) UpsertSourceSeries

func (q *Queries) UpsertSourceSeries(ctx context.Context, arg UpsertSourceSeriesParams) (SourceSeries, error)

Records a series found for a work. An attached or rejected series keeps its state when matching finds it again.

func (*Queries) UpsertWork

func (q *Queries) UpsertWork(ctx context.Context, arg UpsertWorkParams) (UpsertWorkRow, error)

func (*Queries) UpsertWorkSourceMatch

func (q *Queries) UpsertWorkSourceMatch(ctx context.Context, arg UpsertWorkSourceMatchParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

func (*Queries) WorkProgress

func (q *Queries) WorkProgress(ctx context.Context, arg WorkProgressParams) ([]Progress, error)

func (*Queries) WorkVariants

func (q *Queries) WorkVariants(ctx context.Context, workID uuid.UUID) ([]WorkVariantsRow, error)

Present chapters of a work's attached series, with what decides the preferred variant.

func (*Queries) WorksOnSources

func (q *Queries) WorksOnSources(ctx context.Context, sourceIds []string) ([]uuid.UUID, error)

Works with a series attached on any of these sources.

func (*Queries) WorksWithAttachedSeries

func (q *Queries) WorksWithAttachedSeries(ctx context.Context) ([]uuid.UUID, error)

type ReaderSetting

type ReaderSetting struct {
	UserID    uuid.UUID
	Scope     string
	Settings  []byte
	UpdatedAt time.Time
}

type RemoveLibraryEntryParams

type RemoveLibraryEntryParams struct {
	UserID uuid.UUID
	WorkID uuid.UUID
}

type RetryTaskLaterParams

type RetryTaskLaterParams struct {
	LastError string
	RunAfter  time.Time
	ID        uuid.UUID
}

type Session

type Session struct {
	ID         uuid.UUID
	TokenHash  []byte
	UserID     uuid.UUID
	CsrfToken  string
	UserAgent  string
	Ip         string
	CreatedAt  time.Time
	LastSeenAt time.Time
	ExpiresAt  time.Time
}

type SetAutoDownloadParams

type SetAutoDownloadParams struct {
	AutoDownload bool
	UserID       uuid.UUID
	WorkID       uuid.UUID
}

type SetChapterPinParams

type SetChapterPinParams struct {
	PinnedVariantID uuid.NullUUID
	ID              uuid.UUID
}

type SetJobRunProgressParams

type SetJobRunProgressParams struct {
	Progress []byte
	Counts   []byte
	Notes    []byte
	ID       uuid.UUID
}

type SetPluginConfigParams

type SetPluginConfigParams struct {
	Config string
	ID     string
}

type SetPluginStateParams

type SetPluginStateParams struct {
	Info          []byte
	Health        string
	HealthMessage string
	ID            string
}

type SetSeriesCheckedParams

type SetSeriesCheckedParams struct {
	CheckError string
	ID         uuid.UUID
}

type SetSourceEnabledParams

type SetSourceEnabledParams struct {
	Enabled bool
	ID      string
}

type SetSourcePriorityParams

type SetSourcePriorityParams struct {
	Priority int32
	ID       uuid.UUID
	WorkID   uuid.UUID
}

type SetSourceSeriesStateParams

type SetSourceSeriesStateParams struct {
	State  string
	Origin string
	ID     uuid.UUID
}

type SetTaskProgressParams

type SetTaskProgressParams struct {
	Progress []byte
	ID       uuid.UUID
}

type SetUnavailableReasonsParams

type SetUnavailableReasonsParams struct {
	LanguageOff []string
	PluginID    string
}

type SetUserPasswordParams

type SetUserPasswordParams struct {
	PasswordHash string
	ID           uuid.UUID
}

type Setting

type Setting struct {
	Key       string
	Value     []byte
	UpdatedAt time.Time
}

type Source

type Source struct {
	ID                   string
	PluginID             string
	SourceID             string
	Name                 string
	Lang                 string
	ContentRating        string
	IconUrl              string
	HomeUrl              string
	Capabilities         []string
	Health               string
	HealthReason         string
	HealthMessage        string
	HealthCheckedAt      *time.Time
	Enabled              bool
	Present              bool
	CreatedAt            time.Time
	UpdatedAt            time.Time
	PackageID            string
	PackageName          string
	UnavailableReason    string
	HealthChecksDisabled bool
}

type SourceChapter

type SourceChapter struct {
	ID             uuid.UUID
	SourceSeriesID uuid.UUID
	Key            string
	Name           string
	Number         *float64
	Volume         string
	Scanlator      string
	Lang           string
	Url            string
	UploadedAt     *time.Time
	Position       int32
	Present        bool
	ChapterID      uuid.NullUUID
	FirstSeenAt    time.Time
	LastSeenAt     time.Time
	Announce       bool
}

type SourceSeries

type SourceSeries struct {
	ID         uuid.UUID
	WorkID     uuid.UUID
	SourceID   string
	Key        string
	Title      string
	Url        string
	CoverRef   string
	State      string
	Origin     string
	Score      float32
	Evidence   []byte
	Priority   int32
	CreatedAt  time.Time
	UpdatedAt  time.Time
	CheckedAt  *time.Time
	CheckError string
	ListedAt   *time.Time
}

type StartTaskParams

type StartTaskParams struct {
	LeaseUntil *time.Time
	ID         uuid.UUID
}

type Storage

type Storage struct {
	ID        string
	Name      string
	Kind      string
	Config    []byte
	Secret    string
	IsDefault bool
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Task

type Task struct {
	ID          uuid.UUID
	Kind        string
	Payload     []byte
	DedupeKey   string
	LimitKey    string
	Priority    int32
	State       string
	Attempts    int32
	MaxAttempts int32
	RunAfter    time.Time
	LeaseUntil  *time.Time
	LastError   string
	Progress    []byte
	Result      []byte
	CreatedBy   uuid.NullUUID
	CreatedAt   time.Time
	StartedAt   *time.Time
	FinishedAt  *time.Time
	UpdatedAt   time.Time
}

type TaskStatsRow

type TaskStatsRow struct {
	Kind  string
	State string
	N     int64
}

type TouchSessionParams

type TouchSessionParams struct {
	ExpiresAt time.Time
	ID        uuid.UUID
}

type UpdateChapterParams

type UpdateChapterParams struct {
	Volume             string
	Title              string
	PreferredVariantID uuid.NullUUID
	Reason             string
	Available          bool
	ID                 uuid.UUID
}

type UpdateChecksOfRow

type UpdateChecksOfRow struct {
	LastCheckedAt interface{}
	Failing       int64
	Checking      int64
}

type UpdatePluginParams

type UpdatePluginParams struct {
	Url     string
	ApiKey  string
	Enabled bool
	ID      string
}

type UpdateProfileParams

type UpdateProfileParams struct {
	Name             string
	ProxyID          pgtype.Text
	SolverID         pgtype.Text
	RateRequests     int32
	RatePeriodMs     int32
	RateBurst        int32
	RateScope        string
	Concurrency      int32
	UserAgentMode    string
	UserAgent        string
	DohUrl           string
	Headers          []byte
	SharedCookieJar  string
	ConnectTimeoutMs int32
	ReadTimeoutMs    int32
	CallTimeoutMs    int32
	ID               string
}

type UpdateProxyParams

type UpdateProxyParams struct {
	Name           string
	Url            string
	Username       string
	PasswordSealed string
	ID             string
}

type UpdateSolverParams

type UpdateSolverParams struct {
	Name               string
	Type               string
	Url                string
	SessionTtlSeconds  int32
	MaxTimeoutSeconds  int32
	AsResponseFallback bool
	ID                 string
}

type UpdateStorageParams

type UpdateStorageParams struct {
	Name   string
	Config []byte
	Secret string
	ID     string
}

type UpdateUserParams

type UpdateUserParams struct {
	DisplayName          string
	Role                 string
	Disabled             bool
	MayAdd               bool
	MayDownload          bool
	MayManageMatches     bool
	ContentRatingCeiling string
	AllSources           bool
	AllowedSources       []string
	ID                   uuid.UUID
}

type UpdateWorkDisplayParams

type UpdateWorkDisplayParams struct {
	MetaEntryID      string
	Title            string
	SortTitle        string
	Type             string
	Status           string
	ContentRating    string
	Year             *int32
	OriginalLanguage string
	CoverUrl         string
	ID               uuid.UUID
}

type UpdatesParams

type UpdatesParams struct {
	UserID   uuid.UUID
	WorkIds  []uuid.UUID
	Before   *time.Time
	BeforeID uuid.NullUUID
	Lim      int32
}

type UpdatesRow

type UpdatesRow struct {
	Chapter       Chapter
	WorkTitle     string
	WorkCoverUrl  string
	New           bool
	ProgressPage  *int32
	ProgressPages *int32
	Completed     bool
	Downloaded    bool
	DownloadState string
}

type UpsertAssignmentParams

type UpsertAssignmentParams struct {
	TargetKind string
	TargetID   string
	ProfileID  pgtype.Text
	PluginID   pgtype.Text
}

type UpsertProgressParams

type UpsertProgressParams struct {
	UserID    uuid.UUID
	ChapterID uuid.UUID
	WorkID    uuid.UUID
	Page      int32
	Pages     *int32
	Completed bool
}

type UpsertPushParams

type UpsertPushParams struct {
	TargetKind string
	TargetID   string
	PluginID   pgtype.Text
	Hash       string
	Error      string
}

type UpsertSourceChapterParams

type UpsertSourceChapterParams struct {
	SourceSeriesID uuid.UUID
	Key            string
	Name           string
	Number         *float64
	Volume         string
	Scanlator      string
	Lang           string
	Url            string
	UploadedAt     *time.Time
	Position       int32
	Announce       bool
}

type UpsertSourceParams

type UpsertSourceParams struct {
	ID                   string
	PluginID             string
	SourceID             string
	Name                 string
	Lang                 string
	ContentRating        string
	IconUrl              string
	HomeUrl              string
	Capabilities         []string
	Health               string
	HealthReason         string
	HealthMessage        string
	HealthCheckedAt      *time.Time
	PackageID            string
	PackageName          string
	HealthChecksDisabled bool
}

type UpsertSourceSeriesParams

type UpsertSourceSeriesParams struct {
	WorkID   uuid.UUID
	SourceID string
	Key      string
	Title    string
	Url      string
	CoverRef string
	State    string
	Origin   string
	Score    float32
	Evidence []byte
}

type UpsertWorkParams

type UpsertWorkParams struct {
	MetaEntryID      string
	Title            string
	SortTitle        string
	Type             string
	Status           string
	ContentRating    string
	Year             *int32
	OriginalLanguage string
	CoverUrl         string
}

type UpsertWorkRow

type UpsertWorkRow struct {
	ID               uuid.UUID
	MetaEntryID      string
	Title            string
	SortTitle        string
	Type             string
	Status           string
	ContentRating    string
	Year             *int32
	OriginalLanguage string
	CoverUrl         string
	MetaSyncedAt     time.Time
	CreatedAt        time.Time
	UpdatedAt        time.Time
	Inserted         bool
}

type UpsertWorkSourceMatchParams

type UpsertWorkSourceMatchParams struct {
	WorkID   uuid.UUID
	SourceID string
	Status   string
	Message  string
	Queries  []string
}

type User

type User struct {
	ID                   uuid.UUID
	Username             string
	DisplayName          string
	PasswordHash         string
	Role                 string
	Disabled             bool
	MayAdd               bool
	MayDownload          bool
	MayManageMatches     bool
	ContentRatingCeiling string
	AllSources           bool
	AllowedSources       []string
	CreatedAt            time.Time
	UpdatedAt            time.Time
	PasswordChangedAt    time.Time
	LastLoginAt          *time.Time
}

type UserPreference

type UserPreference struct {
	UserID      uuid.UUID
	Preferences []byte
	UpdatedAt   time.Time
}

type Work

type Work struct {
	ID               uuid.UUID
	MetaEntryID      string
	Title            string
	SortTitle        string
	Type             string
	Status           string
	ContentRating    string
	Year             *int32
	OriginalLanguage string
	CoverUrl         string
	MetaSyncedAt     time.Time
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

type WorkProgressParams

type WorkProgressParams struct {
	UserID uuid.UUID
	WorkID uuid.UUID
}

type WorkSourceMatch

type WorkSourceMatch struct {
	WorkID    uuid.UUID
	SourceID  string
	Status    string
	Message   string
	Queries   []string
	CheckedAt time.Time
}

type WorkVariantsRow

type WorkVariantsRow struct {
	SourceChapter  SourceChapter
	SourceID       string
	SeriesPriority int32
	SourceHealth   string
	SourceName     string
	SourceLang     string
	SourceUsable   bool
}

Jump to

Keyboard shortcuts

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