Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MovieService ¶
type MovieService interface { GetAll() []datamodels.Movie GetByID(id uint64) (datamodels.Movie, bool) DeleteByID(id uint64) bool UpdatePosterAndGenreByID(id uint64, poster string, genre string) (datamodels.Movie, error) }
MovieService handles some of the CRUID operations of the movie datamodel. It depends on a movie repository for its actions. It's here to decouple the data source from the higher level compoments. As a result a different repository type can be used with the same logic without any aditional changes. It's an interface and it's used as interface everywhere because we may need to change or try an experimental different domain logic at the future.
func NewMovieService ¶
func NewMovieService(repo repositories.MovieRepository) MovieService
NewMovieService returns the default movie service.
Click to show internal directories.
Click to hide internal directories.