Documentation ¶
Index ¶
- Variables
- type CategoryServiceMock
- func (cs *CategoryServiceMock) Create(insertCategory dto.InsertCategory) (*models.Category, error)
- func (cs *CategoryServiceMock) Delete(id primitive.ObjectID) error
- func (cs *CategoryServiceMock) GetAll(filter string, page int64, pageSize int64) ([]models.Category, error)
- func (cs *CategoryServiceMock) GetById(id primitive.ObjectID) (*models.Category, error)
- func (cs *CategoryServiceMock) GetFreeCategory() *models.Category
- func (cs *CategoryServiceMock) GetVideosByCategoryId(id primitive.ObjectID) ([]models.Video, error)
- func (cs *CategoryServiceMock) Update(id primitive.ObjectID, newData dto.InsertCategory) (*models.Category, error)
- type VideoServiceMock
- func (vs *VideoServiceMock) Create(video dto.InsertVideo) (*models.Video, error)
- func (vs *VideoServiceMock) Delete(id primitive.ObjectID) error
- func (vs *VideoServiceMock) GetAll(filter string, page int64, pageSize int64) ([]models.Video, error)
- func (vs *VideoServiceMock) GetAllFreeVideos() ([]models.Video, error)
- func (vs *VideoServiceMock) GetByID(id primitive.ObjectID) (*models.Video, error)
- func (vs *VideoServiceMock) Update(id primitive.ObjectID, newData dto.InsertVideo) (*models.Video, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var CategoryServiceMockCreate func(insertCategory dto.InsertCategory) (*models.Category, error)
View Source
var CategoryServiceMockDelete func(id primitive.ObjectID) error
View Source
var CategoryServiceMockGetAll func(filter string, page int64, pageSize int64) ([]models.Category, error)
View Source
var CategoryServiceMockGetFreeCategory func() *models.Category
View Source
var CategoryServiceMockGetVideosByCategoryId func(id primitive.ObjectID) ([]models.Video, error)
View Source
var CategoryServiceMockUpdate func(id primitive.ObjectID, insertCategory dto.InsertCategory) (*models.Category, error)
View Source
var VideoServiceMockCreate func(video dto.InsertVideo) (*models.Video, error)
View Source
var VideoServiceMockDelete func(id primitive.ObjectID) error
View Source
var VideoServiceMockGetAll func(filter string, page int64, pageSize int64) ([]models.Video, error)
View Source
var VideoServiceMockGetAllFreeVideos func() ([]models.Video, error)
View Source
var VideoServiceMockUpdate func(id primitive.ObjectID, newData dto.InsertVideo) (*models.Video, error)
Functions ¶
This section is empty.
Types ¶
type CategoryServiceMock ¶
type CategoryServiceMock struct{}
func (*CategoryServiceMock) Create ¶
func (cs *CategoryServiceMock) Create(insertCategory dto.InsertCategory) (*models.Category, error)
func (*CategoryServiceMock) Delete ¶
func (cs *CategoryServiceMock) Delete(id primitive.ObjectID) error
func (*CategoryServiceMock) GetFreeCategory ¶
func (cs *CategoryServiceMock) GetFreeCategory() *models.Category
func (*CategoryServiceMock) GetVideosByCategoryId ¶
func (*CategoryServiceMock) Update ¶
func (cs *CategoryServiceMock) Update(id primitive.ObjectID, newData dto.InsertCategory) (*models.Category, error)
type VideoServiceMock ¶
type VideoServiceMock struct{}
func (*VideoServiceMock) Create ¶
func (vs *VideoServiceMock) Create(video dto.InsertVideo) (*models.Video, error)
func (*VideoServiceMock) GetAllFreeVideos ¶
func (vs *VideoServiceMock) GetAllFreeVideos() ([]models.Video, error)
func (*VideoServiceMock) Update ¶
func (vs *VideoServiceMock) Update(id primitive.ObjectID, newData dto.InsertVideo) (*models.Video, error)
Click to show internal directories.
Click to hide internal directories.