Documentation ¶
Index ¶
- type App
- func (_m *App) ChangeAdStatus(adId int64, userId int64, published bool) (ads.Ad, error)
- func (_m *App) CreateAd(title string, text string, userId int64) (ads.Ad, error)
- func (_m *App) CreateUser(name string, email string) (users.User, error)
- func (_m *App) DeleteAd(adId int64, userId int64) error
- func (_m *App) DeleteUser(userId int64) error
- func (_m *App) GetAd(adId int64) (ads.Ad, error)
- func (_m *App) GetUser(userId int64) (users.User, error)
- func (_m *App) ListAds(pubFilter bool, userFilter int64, timeFilter time.Time) ([]ads.Ad, error)
- func (_m *App) SearchAds(pattern string) ([]ads.Ad, error)
- func (_m *App) UpdateAd(adId int64, userId int64, title string, text string) (ads.Ad, error)
- func (_m *App) UpdateUser(userId int64, name string, email string) (users.User, error)
- type Repository
- func (_m *Repository) Add(e interface{}) error
- func (_m *Repository) CheckIdExist(id int64) bool
- func (_m *Repository) Delete(id int64) error
- func (_m *Repository) Get(id int64) (interface{}, error)
- func (_m *Repository) GetArray() []interface{}
- func (_m *Repository) GetNextId() int64
- func (_m *Repository) Update(id int64, ad interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
App is an autogenerated mock type for the App type
func NewApp ¶
func NewApp(t mockConstructorTestingTNewApp) *App
NewApp creates a new instance of App. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*App) ChangeAdStatus ¶
ChangeAdStatus provides a mock function with given fields: adId, userId, published
func (*App) CreateUser ¶
CreateUser provides a mock function with given fields: name, email
func (*App) DeleteUser ¶
DeleteUser provides a mock function with given fields: userId
func (*App) ListAds ¶
ListAds provides a mock function with given fields: pubFilter, userFilter, timeFilter
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository(t mockConstructorTestingTNewRepository) *Repository
NewRepository creates a new instance of Repository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Repository) Add ¶
func (_m *Repository) Add(e interface{}) error
Add provides a mock function with given fields: e
func (*Repository) CheckIdExist ¶
func (_m *Repository) CheckIdExist(id int64) bool
CheckIdExist provides a mock function with given fields: id
func (*Repository) Delete ¶
func (_m *Repository) Delete(id int64) error
Delete provides a mock function with given fields: id
func (*Repository) Get ¶
func (_m *Repository) Get(id int64) (interface{}, error)
Get provides a mock function with given fields: id
func (*Repository) GetArray ¶
func (_m *Repository) GetArray() []interface{}
GetArray provides a mock function with given fields:
func (*Repository) GetNextId ¶
func (_m *Repository) GetNextId() int64
GetNextId provides a mock function with given fields:
func (*Repository) Update ¶
func (_m *Repository) Update(id int64, ad interface{}) error
Update provides a mock function with given fields: id, ad