package
0.0.0-20250119090130-f94e68edf1eb
Repository: https://github.com/k4sper1love/watchlist-api.git
Documentation: pkg.go.dev

# Functions

AddCollection inserts a new collection into the collections table.
AddCollectionFilm adds a film to a collection.
AddFilm inserts a new film into the database and returns its ID, creation, and update timestamps.
AddPermission inserts a new permission into the permissions table.
AddUserByTelegramID inserts a new user with telegram_id and username into the database.
AddUserPermissions adds multiple permissions for a specific user.
AddUserWithCredentials inserts a new user with a username and password into the database.
No description provided by the author
DeleteCollection removes a collection by its ID.
DeleteCollectionFilm removes a film from a collection by collection ID and film ID.
DeleteFilm removes a film by its ID.
DeletePermissions deletes permission codes.
DeleteUser removes a user from the database by their ID.
GetCollection retrieves a collection by its ID.
GetCollectionFilm retrieves the association of a film in a collection by collection ID and film ID.
GetCollectionFilms retrieves all films in a collection with optional pagination and sorting.
GetCollections retrieves collections for a user with optional filtering and pagination.
No description provided by the author
GetFilm retrieves a film by its ID.
GetFilms retrieves films for a specific user based on filters and pagination.
GetIdFromRefreshToken retrieves the user ID associated with a refresh token.
GetUserById retrieves a user by their ID.
GetUserByTelegramID retrieves a user by their telegram ID.
GetUserByUsername retrieves a user by their username.
GetUserPermissions retrieves all permission codes for a specific user.
GetUsers retrieves all users from the database.
IsRefreshTokenRevoked checks if a refresh token has been revoked.
No description provided by the author
OpenDB opens a PostgreSQL database connection and applies any pending migrations.
No description provided by the author
RevokeRefreshToken marks a refresh token as revoked in the database.
SaveRefreshToken stores a refresh token, its associated user ID, and its expiration time in the database.
UpdateCollection updates an existing collection's details.
UpdateCollectionFilm updates the association of a film in a collection.
UpdateFilm updates the details of an existing film.
UpdateUser updates a user's details based on their ID and version.

# Type aliases

Permissions represents a slice of permission codes.