# Functions
AddListener adds a listener to the registry.
BanUser bans a user by setting the Banned field to true.
ChapterExists checks if a chapter already exists.
Close closes the database connection.
CountUsers returns the total number of users.
CreateAccessToken generates a new access token with a 15-minute expiry.
CreateChapter adds a new chapter if it does not already exist.
CreateLibrary adds a new Library to the database.
CreateManga adds a new Manga to the database.
CreateRefreshToken generates a new refresh token with a 7-day expiry.
CreateUser creates a new user with hashed password and default role.
DeleteChapter removes a specific chapter.
DeleteChaptersByMangaSlug removes all chapters for a specific manga.
DeleteLibrary removes a Library and its associated mangas.
DeleteManga removes a Manga and its associated chapters.
DeleteMangasByLibrarySlug removes all mangas associated with a specific library.
DemoteUser demotes a user to the previous role in the hierarchy.
FindUserByUsername retrieves a user by their username.
GenerateNewRefreshToken creates a new refresh token and updates the user's version.
GenerateRandomKey creates a new random key of the specified length.
GetAdjacentChapters finds the previous and next chapters based on the current chapter slug.
GetBestMatchMangadexManga returns the best match manga based on the title.
GetChapter retrieves a specific chapter by its slug.
GetChapters retrieves all chapters for a specific manga, sorted by name.
GetKey retrieves the JWT key from the database.
GetLibraries retrieves all Libraries from the database.
GetLibrary retrieves a single Library by slug.
GetManga retrieves a single Manga by slug.
GetMangadexManga fetches manga details by ID from the MangaDex API.
GetMangadexMangas searches for mangas based on the title and returns a list of matches.
GetUsers retrieves all Users from the database.
IncrementRefreshTokenVersion increments the refresh token version for a user.
Initialize connects to the BoltDB database and creates necessary buckets.
LibraryExists checks if a Library exists by slug.
MangaCount counts the number of mangas based on filter criteria.
MangaExists checks if a Manga exists by slug.
NotifyListeners notifies all registered listeners with a given notification.
PromoteUser promotes a user to the next role in the hierarchy.
RefreshAccessToken generates a new access token from a valid refresh token.
SearchLibraries finds Libraries matching the keyword and applies pagination and sorting.
SearchMangas filters, sorts, and paginates mangas based on provided criteria.
StoreKey saves the JWT key to the database.
UnbanUser unbans a user by setting the Banned field to false.
UpdateChapter modifies an existing chapter.
UpdateLibrary modifies an existing Library.
UpdateManga modifies an existing Manga.
UpdateUserRole updates the role of a user.
ValidateToken validates a token and returns its claims.
# Variables
ListenerRegistry is a registry of listeners interested in notifications.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
ListMangaResponse represents the JSON response for a list of mangas.
No description provided by the author
MangaAttributes represents the attributes of a manga in MangaDetail.
MangaDetail represents details of a manga item in the "data" array of MangaResponse.
Notification represents a notification object.
Relationship represents the relationship details in MangaDetail.
SingleMangaResponse represents the JSON response for a single manga.
Tag represents a tag in MangaAttributes.
No description provided by the author
# Interfaces
Listener defines the interface for objects that want to listen to notifications.