crew

package
v0.0.0-...-2fe0e47 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICrewRepo

type ICrewRepo interface {
	GetFilmDirectors(filmId uint64) ([]models.CrewItem, error)
	GetFilmScenarists(filmId uint64) ([]models.CrewItem, error)
	GetFilmCharacters(filmId uint64) ([]models.Character, error)
	GetActor(actorId uint64) (*models.CrewItem, error)
	FindActor(name string, birthDate string, films []string, career []string, country string, first, limit uint64) ([]models.Character, error)
	GetFavoriteActors(userId uint64, start uint64, end uint64) ([]models.Character, error)
	CheckActor(userId uint64, actorId uint64) (bool, error)
	AddFavoriteActor(userId uint64, actorId uint64) error
	RemoveFavoriteActor(userId uint64, actorId uint64) error
	AddFilm(actors []uint64, filmId uint64) error
}

type RepoPostgre

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

func GetCrewRepo

func GetCrewRepo(config *configs.DbDsnCfg, lg *slog.Logger) (*RepoPostgre, error)

func (*RepoPostgre) AddFavoriteActor

func (repo *RepoPostgre) AddFavoriteActor(userId uint64, actorId uint64) error

func (*RepoPostgre) AddFilm

func (repo *RepoPostgre) AddFilm(actors []uint64, filmId uint64) error

func (*RepoPostgre) CheckActor

func (repo *RepoPostgre) CheckActor(userId uint64, actorId uint64) (bool, error)

func (*RepoPostgre) FindActor

func (repo *RepoPostgre) FindActor(name string, birthDate string, films []string, career []string, country string, first, limit uint64) ([]models.Character, error)

func (*RepoPostgre) GetActor

func (repo *RepoPostgre) GetActor(actorId uint64) (*models.CrewItem, error)

func (*RepoPostgre) GetFavoriteActors

func (repo *RepoPostgre) GetFavoriteActors(userId uint64, start uint64, end uint64) ([]models.Character, error)

func (*RepoPostgre) GetFilmCharacters

func (repo *RepoPostgre) GetFilmCharacters(filmId uint64) ([]models.Character, error)

func (*RepoPostgre) GetFilmDirectors

func (repo *RepoPostgre) GetFilmDirectors(filmId uint64) ([]models.CrewItem, error)

func (*RepoPostgre) GetFilmScenarists

func (repo *RepoPostgre) GetFilmScenarists(filmId uint64) ([]models.CrewItem, error)

func (*RepoPostgre) RemoveFavoriteActor

func (repo *RepoPostgre) RemoveFavoriteActor(userId uint64, actorId uint64) error

Jump to

Keyboard shortcuts

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