service

package
v0.0.0-...-b15666a Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 3 Imported by: 0

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"`
}

Directories

Path Synopsis
Package mock_service is a generated GoMock package.
Package mock_service is a generated GoMock package.

Jump to

Keyboard shortcuts

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