mocks

package
v0.0.0-...-e5cd8ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	mock.Mock
}

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

func (_m *App) ChangeAdStatus(adId int64, userId int64, published bool) (ads.Ad, error)

ChangeAdStatus provides a mock function with given fields: adId, userId, published

func (*App) CreateAd

func (_m *App) CreateAd(title string, text string, userId int64) (ads.Ad, error)

CreateAd provides a mock function with given fields: title, text, userId

func (*App) CreateUser

func (_m *App) CreateUser(name string, email string) (users.User, error)

CreateUser provides a mock function with given fields: name, email

func (*App) DeleteAd

func (_m *App) DeleteAd(adId int64, userId int64) error

DeleteAd provides a mock function with given fields: adId, userId

func (*App) DeleteUser

func (_m *App) DeleteUser(userId int64) error

DeleteUser provides a mock function with given fields: userId

func (*App) GetAd

func (_m *App) GetAd(adId int64) (ads.Ad, error)

GetAd provides a mock function with given fields: adId

func (*App) GetUser

func (_m *App) GetUser(userId int64) (users.User, error)

GetUser provides a mock function with given fields: userId

func (*App) ListAds

func (_m *App) ListAds(pubFilter bool, userFilter int64, timeFilter time.Time) ([]ads.Ad, error)

ListAds provides a mock function with given fields: pubFilter, userFilter, timeFilter

func (*App) SearchAds

func (_m *App) SearchAds(pattern string) ([]ads.Ad, error)

SearchAds provides a mock function with given fields: pattern

func (*App) UpdateAd

func (_m *App) UpdateAd(adId int64, userId int64, title string, text string) (ads.Ad, error)

UpdateAd provides a mock function with given fields: adId, userId, title, text

func (*App) UpdateUser

func (_m *App) UpdateUser(userId int64, name string, email string) (users.User, error)

UpdateUser provides a mock function with given fields: userId, name, email

type Repository

type Repository struct {
	mock.Mock
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL