Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMoviesService ¶
func NewMoviesService(logger *logrus.Logger, repo MoviesRepository, picturesCfg PicturesUrlConfig) *moviesService
Types ¶
type MoviesRepository ¶
type MoviesRepository interface { GetMovie(ctx context.Context, movieId int32) (models.RepositoryMovie, error) GetMoviePreview(ctx context.Context, movieId int32) (models.RepositoryMoviePreview, error) GetMoviesPreview(ctx context.Context, Filter models.MoviesFilter, limit, offset uint32) ([]models.RepositoryMoviePreview, error) GetMoviesPreviewByIDs(ctx context.Context, ids []string) ([]models.RepositoryMoviePreview, error) GetAgeRatings(ctx context.Context) ([]string, error) GetGenres(ctx context.Context, movieId int32) ([]string, error) GetAllGenres(ctx context.Context) ([]models.Genre, error) GetCountries(ctx context.Context, movieId int32) ([]string, error) GetAllCountries(ctx context.Context) ([]models.Country, error) }
type MoviesService ¶
type MoviesService interface { GetMovie(ctx context.Context, id int32) (models.Movie, error) GetMoviesPreview(ctx context.Context, filter models.MoviesFilter, limit, offset uint32) ([]models.MoviePreview, error) GetMoviesPreviewByIDs(ctx context.Context, ids []string) ([]models.MoviePreview, error) GetAgeRatings(ctx context.Context) ([]string, error) GetGenres(ctx context.Context) ([]models.Genre, error) GetCountries(ctx context.Context) ([]models.Country, error) }
type PicturesUrlConfig ¶
type PicturesUrlConfig struct { BaseUrl string `yaml:"base_url" env:"BASE_URL"` PostersCategory string `yaml:"posters_category" env:"POSTERS_CATEGORY"` PreviewPostersCategory string `yaml:"preview_posters_category" env:"PREVIEW_POSTERS_CATEGORY"` BackgroundsCategory string `yaml:"backgrounds_category" env:"BACKGROUNDS_CATEGORY"` }
Click to show internal directories.
Click to hide internal directories.