Documentation ¶
Index ¶
- type MovieService
- func (m *MovieService) Create(mv *Movie) (*Movie, error)
- func (m *MovieService) Delete(id int) (bool, error)
- func (m *MovieService) GetAll() (*MovieList, error)
- func (m *MovieService) GetAllMoviesWithPagination(pag Pagination) (*Pagination, error)
- func (m *MovieService) Migrate()
- func (m *MovieService) Update(mv *Movie, id int) (*Movie, error)
- func (m *MovieService) Upload(file *multipart.File) (int, string, error)
- type UserService
- type UserServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MovieService ¶
type MovieService struct {
MovieRepo *MovieRepository
}
func NewMovieService ¶
func NewMovieService(c *MovieRepository) *MovieService
func (*MovieService) Create ¶
func (m *MovieService) Create(mv *Movie) (*Movie, error)
func (*MovieService) GetAll ¶
func (m *MovieService) GetAll() (*MovieList, error)
GetAll returns all categories
func (*MovieService) GetAllMoviesWithPagination ¶
func (m *MovieService) GetAllMoviesWithPagination(pag Pagination) (*Pagination, error)
func (*MovieService) Migrate ¶
func (m *MovieService) Migrate()
func (*MovieService) Update ¶
func (m *MovieService) Update(mv *Movie, id int) (*Movie, error)
type UserService ¶
type UserService struct {
UserRepo UserRepositoryInterface
}
func NewUserService ¶
func NewUserService(u UserRepositoryInterface) *UserService
func (*UserService) CheckUser ¶
func (u *UserService) CheckUser(user *User) (bool, error)
CheckUser helps to identify user is registered before or not
func (*UserService) Login ¶
func (u *UserService) Login(email string, password string) (*User, error)
Login helps user to enter system after checking e-mail,password
func (*UserService) Migrate ¶
func (u *UserService) Migrate()
func (*UserService) Save ¶
func (u *UserService) Save(user *User) (*User, error)
Save helps to create user after check verify e-mail,password
Click to show internal directories.
Click to hide internal directories.