repo

package
v0.0.0-...-f828b04 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllGenres

func AllGenres() ([]*models.Genre, error)

func AllMovies

func AllMovies(genre ...int) ([]*models.Movie, error)

func Authenticate

func Authenticate(email, password string) (int, string, error)

Authenticate authenticates a user

func CreateDbPool

func CreateDbPool(dsn string) (*sql.DB, error)

func DeleteMovie

func DeleteMovie(id int) error

func GetMovieByID

func GetMovieByID(id int) (*models.Movie, error)

func GetMovieByIDForEdit

func GetMovieByIDForEdit(id int) (*models.Movie, []*models.Genre, error)

func GetUserByID

func GetUserByID(id int) (models.User, error)

GetUserByID returns a user by ID

func InsertMovie

func InsertMovie(movie *models.Movie) (int, error)

func UpdateMovie

func UpdateMovie(movie *models.Movie) error

func UpdateMovieGenres

func UpdateMovieGenres(id int, genreIDs []int) error

func UpdateUser

func UpdateUser(u models.User) error

UpdateUser updates a user

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳