Documentation
¶
Overview ¶
Package service is a generated GoMock package.
Index ¶
- type ArticleService
- func (_i *ArticleService) All() (articles []*response.Article, err error)
- func (_i *ArticleService) Destroy(id uint64) error
- func (_i *ArticleService) Show(id uint64) (article *response.Article, err error)
- func (_i *ArticleService) Store(req request.ArticleRequest) (err error)
- func (_i *ArticleService) Update(id uint64, req request.ArticleRequest) (err error)
- type IArticleService
- type MockIArticleService
- func (m *MockIArticleService) All() ([]*response.Article, error)
- func (m *MockIArticleService) Destroy(arg0 uint64) error
- func (m *MockIArticleService) EXPECT() *MockIArticleServiceMockRecorder
- func (m *MockIArticleService) Show(arg0 uint64) (*response.Article, error)
- func (m *MockIArticleService) Store(arg0 request.ArticleRequest) error
- func (m *MockIArticleService) Update(arg0 uint64, arg1 request.ArticleRequest) error
- type MockIArticleServiceMockRecorder
- func (mr *MockIArticleServiceMockRecorder) All() *gomock.Call
- func (mr *MockIArticleServiceMockRecorder) Destroy(arg0 interface{}) *gomock.Call
- func (mr *MockIArticleServiceMockRecorder) Show(arg0 interface{}) *gomock.Call
- func (mr *MockIArticleServiceMockRecorder) Store(arg0 interface{}) *gomock.Call
- func (mr *MockIArticleServiceMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleService ¶
type ArticleService struct {
Repo *repository.ArticleRepository
}
ArticleService
func NewArticleService ¶
func NewArticleService(repo *repository.ArticleRepository) *ArticleService
init ArticleService
func (*ArticleService) All ¶
func (_i *ArticleService) All() (articles []*response.Article, err error)
implement interface of ArticleService
func (*ArticleService) Destroy ¶
func (_i *ArticleService) Destroy(id uint64) error
func (*ArticleService) Show ¶
func (_i *ArticleService) Show(id uint64) (article *response.Article, err error)
func (*ArticleService) Store ¶
func (_i *ArticleService) Store(req request.ArticleRequest) (err error)
func (*ArticleService) Update ¶
func (_i *ArticleService) Update(id uint64, req request.ArticleRequest) (err error)
type IArticleService ¶
type IArticleService interface { All() (articles []*response.Article, err error) Show(id uint64) (article *response.Article, err error) Store(req request.ArticleRequest) (err error) Update(id uint64, req request.ArticleRequest) (err error) Destroy(id uint64) error }
define interface of IArticleService
type MockIArticleService ¶
type MockIArticleService struct {
// contains filtered or unexported fields
}
MockIArticleService is a mock of IArticleService interface.
func NewMockIArticleService ¶
func NewMockIArticleService(ctrl *gomock.Controller) *MockIArticleService
NewMockIArticleService creates a new mock instance.
func (*MockIArticleService) All ¶
func (m *MockIArticleService) All() ([]*response.Article, error)
All mocks base method.
func (*MockIArticleService) Destroy ¶
func (m *MockIArticleService) Destroy(arg0 uint64) error
Destroy mocks base method.
func (*MockIArticleService) EXPECT ¶
func (m *MockIArticleService) EXPECT() *MockIArticleServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIArticleService) Show ¶
func (m *MockIArticleService) Show(arg0 uint64) (*response.Article, error)
Show mocks base method.
func (*MockIArticleService) Store ¶
func (m *MockIArticleService) Store(arg0 request.ArticleRequest) error
Store mocks base method.
func (*MockIArticleService) Update ¶
func (m *MockIArticleService) Update(arg0 uint64, arg1 request.ArticleRequest) error
Update mocks base method.
type MockIArticleServiceMockRecorder ¶
type MockIArticleServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockIArticleServiceMockRecorder is the mock recorder for MockIArticleService.
func (*MockIArticleServiceMockRecorder) All ¶
func (mr *MockIArticleServiceMockRecorder) All() *gomock.Call
All indicates an expected call of All.
func (*MockIArticleServiceMockRecorder) Destroy ¶
func (mr *MockIArticleServiceMockRecorder) Destroy(arg0 interface{}) *gomock.Call
Destroy indicates an expected call of Destroy.
func (*MockIArticleServiceMockRecorder) Show ¶
func (mr *MockIArticleServiceMockRecorder) Show(arg0 interface{}) *gomock.Call
Show indicates an expected call of Show.
func (*MockIArticleServiceMockRecorder) Store ¶
func (mr *MockIArticleServiceMockRecorder) Store(arg0 interface{}) *gomock.Call
Store indicates an expected call of Store.
func (*MockIArticleServiceMockRecorder) Update ¶
func (mr *MockIArticleServiceMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call
Update indicates an expected call of Update.