mocks

package
v0.0.0-...-5a72114 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAdvertRepository

type MockAdvertRepository struct {
	// contains filtered or unexported fields
}

MockAdvertRepository is a mock of AdvertRepository interface.

func NewMockAdvertRepository

func NewMockAdvertRepository(ctrl *gomock.Controller) *MockAdvertRepository

NewMockAdvertRepository creates a new mock instance.

func (*MockAdvertRepository) Add

func (m *MockAdvertRepository) Add(advert *entity.Advert) (*entity.Advert, error)

Add mocks base method.

func (*MockAdvertRepository) AddToSaved

func (m *MockAdvertRepository) AddToSaved(advertId, userId uuid.UUID) error

AddToSaved mocks base method.

func (*MockAdvertRepository) AddViewed

func (m *MockAdvertRepository) AddViewed(userId, advertId uuid.UUID) error

AddViewed mocks base method.

func (*MockAdvertRepository) BeginTransaction

func (m *MockAdvertRepository) BeginTransaction() (pgx.Tx, error)

BeginTransaction mocks base method.

func (*MockAdvertRepository) CheckIfExists

func (m *MockAdvertRepository) CheckIfExists(advertId uuid.UUID) (bool, error)

CheckIfExists mocks base method.

func (*MockAdvertRepository) Count

func (m *MockAdvertRepository) Count() (int, error)

Count mocks base method.

func (*MockAdvertRepository) DeleteById

func (m *MockAdvertRepository) DeleteById(advertId uuid.UUID) error

DeleteById mocks base method.

func (*MockAdvertRepository) DeleteFromSaved

func (m *MockAdvertRepository) DeleteFromSaved(userId, advertId uuid.UUID) error

DeleteFromSaved mocks base method.

func (*MockAdvertRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAdvertRepository) Get

func (m *MockAdvertRepository) Get(limit, offset int, userId uuid.UUID) ([]*entity.Advert, error)

Get mocks base method.

func (*MockAdvertRepository) GetByCartId

func (m *MockAdvertRepository) GetByCartId(cartId, userId uuid.UUID) ([]*entity.Advert, error)

GetByCartId mocks base method.

func (*MockAdvertRepository) GetByCategoryId

func (m *MockAdvertRepository) GetByCategoryId(categoryId, userId uuid.UUID) ([]*entity.Advert, error)

GetByCategoryId mocks base method.

func (*MockAdvertRepository) GetById

func (m *MockAdvertRepository) GetById(advertId, userId uuid.UUID) (*entity.Advert, error)

GetById mocks base method.

func (*MockAdvertRepository) GetBySellerId

func (m *MockAdvertRepository) GetBySellerId(sellerId, userId uuid.UUID) ([]*entity.Advert, error)

GetBySellerId mocks base method.

func (*MockAdvertRepository) GetByUserId

func (m *MockAdvertRepository) GetByUserId(sellerId, userId uuid.UUID) ([]*entity.Advert, error)

GetByUserId mocks base method.

func (*MockAdvertRepository) GetSavedByUserId

func (m *MockAdvertRepository) GetSavedByUserId(userId uuid.UUID) ([]*entity.Advert, error)

GetSavedByUserId mocks base method.

func (*MockAdvertRepository) PromoteAdvert

func (m *MockAdvertRepository) PromoteAdvert(advertID uuid.UUID) (*entity.Advert, error)

PromoteAdvert mocks base method.

func (*MockAdvertRepository) Search

func (m *MockAdvertRepository) Search(query string, limit, offset int, userId uuid.UUID) ([]*entity.Advert, error)

Search mocks base method.

func (*MockAdvertRepository) Update

func (m *MockAdvertRepository) Update(advert *entity.Advert) error

Update mocks base method.

func (*MockAdvertRepository) UpdateStatus

func (m *MockAdvertRepository) UpdateStatus(tx pgx.Tx, advertId uuid.UUID, status entity.AdvertStatus) error

UpdateStatus mocks base method.

func (*MockAdvertRepository) UploadImage

func (m *MockAdvertRepository) UploadImage(advertId, imageId uuid.UUID) error

UploadImage mocks base method.

type MockAdvertRepositoryMockRecorder

type MockAdvertRepositoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockAdvertRepositoryMockRecorder is the mock recorder for MockAdvertRepository.

func (*MockAdvertRepositoryMockRecorder) Add

func (mr *MockAdvertRepositoryMockRecorder) Add(advert interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockAdvertRepositoryMockRecorder) AddToSaved

func (mr *MockAdvertRepositoryMockRecorder) AddToSaved(advertId, userId interface{}) *gomock.Call

AddToSaved indicates an expected call of AddToSaved.

func (*MockAdvertRepositoryMockRecorder) AddViewed

func (mr *MockAdvertRepositoryMockRecorder) AddViewed(userId, advertId interface{}) *gomock.Call

AddViewed indicates an expected call of AddViewed.

func (*MockAdvertRepositoryMockRecorder) BeginTransaction

func (mr *MockAdvertRepositoryMockRecorder) BeginTransaction() *gomock.Call

BeginTransaction indicates an expected call of BeginTransaction.

func (*MockAdvertRepositoryMockRecorder) CheckIfExists

func (mr *MockAdvertRepositoryMockRecorder) CheckIfExists(advertId interface{}) *gomock.Call

CheckIfExists indicates an expected call of CheckIfExists.

func (*MockAdvertRepositoryMockRecorder) Count

Count indicates an expected call of Count.

func (*MockAdvertRepositoryMockRecorder) DeleteById

func (mr *MockAdvertRepositoryMockRecorder) DeleteById(advertId interface{}) *gomock.Call

DeleteById indicates an expected call of DeleteById.

func (*MockAdvertRepositoryMockRecorder) DeleteFromSaved

func (mr *MockAdvertRepositoryMockRecorder) DeleteFromSaved(userId, advertId interface{}) *gomock.Call

DeleteFromSaved indicates an expected call of DeleteFromSaved.

func (*MockAdvertRepositoryMockRecorder) Get

func (mr *MockAdvertRepositoryMockRecorder) Get(limit, offset, userId interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockAdvertRepositoryMockRecorder) GetByCartId

func (mr *MockAdvertRepositoryMockRecorder) GetByCartId(cartId, userId interface{}) *gomock.Call

GetByCartId indicates an expected call of GetByCartId.

func (*MockAdvertRepositoryMockRecorder) GetByCategoryId

func (mr *MockAdvertRepositoryMockRecorder) GetByCategoryId(categoryId, userId interface{}) *gomock.Call

GetByCategoryId indicates an expected call of GetByCategoryId.

func (*MockAdvertRepositoryMockRecorder) GetById

func (mr *MockAdvertRepositoryMockRecorder) GetById(advertId, userId interface{}) *gomock.Call

GetById indicates an expected call of GetById.

func (*MockAdvertRepositoryMockRecorder) GetBySellerId

func (mr *MockAdvertRepositoryMockRecorder) GetBySellerId(sellerId, userId interface{}) *gomock.Call

GetBySellerId indicates an expected call of GetBySellerId.

func (*MockAdvertRepositoryMockRecorder) GetByUserId

func (mr *MockAdvertRepositoryMockRecorder) GetByUserId(sellerId, userId interface{}) *gomock.Call

GetByUserId indicates an expected call of GetByUserId.

func (*MockAdvertRepositoryMockRecorder) GetSavedByUserId

func (mr *MockAdvertRepositoryMockRecorder) GetSavedByUserId(userId interface{}) *gomock.Call

GetSavedByUserId indicates an expected call of GetSavedByUserId.

func (*MockAdvertRepositoryMockRecorder) PromoteAdvert

func (mr *MockAdvertRepositoryMockRecorder) PromoteAdvert(advertID interface{}) *gomock.Call

PromoteAdvert indicates an expected call of PromoteAdvert.

func (*MockAdvertRepositoryMockRecorder) Search

func (mr *MockAdvertRepositoryMockRecorder) Search(query, limit, offset, userId interface{}) *gomock.Call

Search indicates an expected call of Search.

func (*MockAdvertRepositoryMockRecorder) Update

func (mr *MockAdvertRepositoryMockRecorder) Update(advert interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockAdvertRepositoryMockRecorder) UpdateStatus

func (mr *MockAdvertRepositoryMockRecorder) UpdateStatus(tx, advertId, status interface{}) *gomock.Call

UpdateStatus indicates an expected call of UpdateStatus.

func (*MockAdvertRepositoryMockRecorder) UploadImage

func (mr *MockAdvertRepositoryMockRecorder) UploadImage(advertId, imageId interface{}) *gomock.Call

UploadImage indicates an expected call of UploadImage.

type MockCart

type MockCart struct {
	// contains filtered or unexported fields
}

MockCart is a mock of Cart interface.

func NewMockCart

func NewMockCart(ctrl *gomock.Controller) *MockCart

NewMockCart creates a new mock instance.

func (*MockCart) AddAdvert

func (m *MockCart) AddAdvert(cartID, AdvertID uuid.UUID) error

AddAdvert mocks base method.

func (*MockCart) Create

func (m *MockCart) Create(userID uuid.UUID) (uuid.UUID, error)

Create mocks base method.

func (*MockCart) DeleteAdvert

func (m *MockCart) DeleteAdvert(cartID, AdvertID uuid.UUID) error

DeleteAdvert mocks base method.

func (*MockCart) EXPECT

func (m *MockCart) EXPECT() *MockCartMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCart) GetAdvertsByCartId

func (m *MockCart) GetAdvertsByCartId(cartID uuid.UUID) ([]entity.Advert, error)

GetAdvertsByCartId mocks base method.

func (*MockCart) GetById

func (m *MockCart) GetById(cartID uuid.UUID) (entity.Cart, error)

GetById mocks base method.

func (*MockCart) GetByUserId

func (m *MockCart) GetByUserId(userID uuid.UUID) (entity.Cart, error)

GetByUserId mocks base method.

func (*MockCart) UpdateStatus

func (m *MockCart) UpdateStatus(tx pgx.Tx, cartID uuid.UUID, status entity.CartStatus) error

UpdateStatus mocks base method.

type MockCartMockRecorder

type MockCartMockRecorder struct {
	// contains filtered or unexported fields
}

MockCartMockRecorder is the mock recorder for MockCart.

func (*MockCartMockRecorder) AddAdvert

func (mr *MockCartMockRecorder) AddAdvert(cartID, AdvertID interface{}) *gomock.Call

AddAdvert indicates an expected call of AddAdvert.

func (*MockCartMockRecorder) Create

func (mr *MockCartMockRecorder) Create(userID interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockCartMockRecorder) DeleteAdvert

func (mr *MockCartMockRecorder) DeleteAdvert(cartID, AdvertID interface{}) *gomock.Call

DeleteAdvert indicates an expected call of DeleteAdvert.

func (*MockCartMockRecorder) GetAdvertsByCartId

func (mr *MockCartMockRecorder) GetAdvertsByCartId(cartID interface{}) *gomock.Call

GetAdvertsByCartId indicates an expected call of GetAdvertsByCartId.

func (*MockCartMockRecorder) GetById

func (mr *MockCartMockRecorder) GetById(cartID interface{}) *gomock.Call

GetById indicates an expected call of GetById.

func (*MockCartMockRecorder) GetByUserId

func (mr *MockCartMockRecorder) GetByUserId(userID interface{}) *gomock.Call

GetByUserId indicates an expected call of GetByUserId.

func (*MockCartMockRecorder) UpdateStatus

func (mr *MockCartMockRecorder) UpdateStatus(tx, cartID, status interface{}) *gomock.Call

UpdateStatus indicates an expected call of UpdateStatus.

type MockCategoryRepository

type MockCategoryRepository struct {
	// contains filtered or unexported fields
}

MockCategoryRepository is a mock of CategoryRepository interface.

func NewMockCategoryRepository

func NewMockCategoryRepository(ctrl *gomock.Controller) *MockCategoryRepository

NewMockCategoryRepository creates a new mock instance.

func (*MockCategoryRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCategoryRepository) Get

Get mocks base method.

type MockCategoryRepositoryMockRecorder

type MockCategoryRepositoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockCategoryRepositoryMockRecorder is the mock recorder for MockCategoryRepository.

func (*MockCategoryRepositoryMockRecorder) Get

Get indicates an expected call of Get.

type MockPurchaseRepository

type MockPurchaseRepository struct {
	// contains filtered or unexported fields
}

MockPurchaseRepository is a mock of PurchaseRepository interface.

func NewMockPurchaseRepository

func NewMockPurchaseRepository(ctrl *gomock.Controller) *MockPurchaseRepository

NewMockPurchaseRepository creates a new mock instance.

func (*MockPurchaseRepository) Add

func (m *MockPurchaseRepository) Add(tx pgx.Tx, purchase *entity.Purchase) (*entity.Purchase, error)

Add mocks base method.

func (*MockPurchaseRepository) BeginTransaction

func (m *MockPurchaseRepository) BeginTransaction() (pgx.Tx, error)

BeginTransaction mocks base method.

func (*MockPurchaseRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPurchaseRepository) GetByUserId

func (m *MockPurchaseRepository) GetByUserId(userID uuid.UUID) ([]*entity.Purchase, error)

GetByUserId mocks base method.

type MockPurchaseRepositoryMockRecorder

type MockPurchaseRepositoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockPurchaseRepositoryMockRecorder is the mock recorder for MockPurchaseRepository.

func (*MockPurchaseRepositoryMockRecorder) Add

func (mr *MockPurchaseRepositoryMockRecorder) Add(tx, purchase interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockPurchaseRepositoryMockRecorder) BeginTransaction

func (mr *MockPurchaseRepositoryMockRecorder) BeginTransaction() *gomock.Call

BeginTransaction indicates an expected call of BeginTransaction.

func (*MockPurchaseRepositoryMockRecorder) GetByUserId

func (mr *MockPurchaseRepositoryMockRecorder) GetByUserId(userID interface{}) *gomock.Call

GetByUserId indicates an expected call of GetByUserId.

type MockSeller

type MockSeller struct {
	// contains filtered or unexported fields
}

MockSeller is a mock of Seller interface.

func NewMockSeller

func NewMockSeller(ctrl *gomock.Controller) *MockSeller

NewMockSeller creates a new mock instance.

func (*MockSeller) Add

func (m *MockSeller) Add(tx pgx.Tx, userID uuid.UUID) (uuid.UUID, error)

Add mocks base method.

func (*MockSeller) EXPECT

func (m *MockSeller) EXPECT() *MockSellerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSeller) GetById

func (m *MockSeller) GetById(sellerID uuid.UUID) (*entity.Seller, error)

GetById mocks base method.

func (*MockSeller) GetByUserId

func (m *MockSeller) GetByUserId(userID uuid.UUID) (*entity.Seller, error)

GetByUserId mocks base method.

type MockSellerMockRecorder

type MockSellerMockRecorder struct {
	// contains filtered or unexported fields
}

MockSellerMockRecorder is the mock recorder for MockSeller.

func (*MockSellerMockRecorder) Add

func (mr *MockSellerMockRecorder) Add(tx, userID interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockSellerMockRecorder) GetById

func (mr *MockSellerMockRecorder) GetById(sellerID interface{}) *gomock.Call

GetById indicates an expected call of GetById.

func (*MockSellerMockRecorder) GetByUserId

func (mr *MockSellerMockRecorder) GetByUserId(userID interface{}) *gomock.Call

GetByUserId indicates an expected call of GetByUserId.

type MockSession

type MockSession struct {
	// contains filtered or unexported fields
}

MockSession is a mock of Session interface

func NewMockSession

func NewMockSession(ctrl *gomock.Controller) *MockSession

func (*MockSession) Create

func (m *MockSession) Create(userID uuid.UUID) (string, error)

func (*MockSession) Delete

func (m *MockSession) Delete(sessionID string) error

func (*MockSession) EXPECT

func (m *MockSession) EXPECT() *MockSessionMockRecorder

func (*MockSession) Get

func (m *MockSession) Get(sessionID string) (uuid.UUID, error)

type MockSessionMockRecorder

type MockSessionMockRecorder struct {
	// contains filtered or unexported fields
}

func (*MockSessionMockRecorder) Create

func (mr *MockSessionMockRecorder) Create(userID interface{}) *gomock.Call

func (*MockSessionMockRecorder) Delete

func (mr *MockSessionMockRecorder) Delete(sessionID interface{}) *gomock.Call

func (*MockSessionMockRecorder) Get

func (mr *MockSessionMockRecorder) Get(sessionID interface{}) *gomock.Call

type MockStaticRepository

type MockStaticRepository struct {
	// contains filtered or unexported fields
}

MockStaticRepository is a mock of StaticRepository interface.

func NewMockStaticRepository

func NewMockStaticRepository(ctrl *gomock.Controller) *MockStaticRepository

NewMockStaticRepository creates a new mock instance.

func (*MockStaticRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStaticRepository) Get

func (m *MockStaticRepository) Get(staticID uuid.UUID) (string, error)

Get mocks base method.

func (*MockStaticRepository) GetMaxSize

func (m *MockStaticRepository) GetMaxSize() int

GetMaxSize mocks base method.

func (*MockStaticRepository) Upload

func (m *MockStaticRepository) Upload(path, filename string, data []byte) (uuid.UUID, error)

Upload mocks base method.

type MockStaticRepositoryMockRecorder

type MockStaticRepositoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockStaticRepositoryMockRecorder is the mock recorder for MockStaticRepository.

func (*MockStaticRepositoryMockRecorder) Get

func (mr *MockStaticRepositoryMockRecorder) Get(staticID interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockStaticRepositoryMockRecorder) GetMaxSize

func (mr *MockStaticRepositoryMockRecorder) GetMaxSize() *gomock.Call

GetMaxSize indicates an expected call of GetMaxSize.

func (*MockStaticRepositoryMockRecorder) Upload

func (mr *MockStaticRepositoryMockRecorder) Upload(path, filename, data interface{}) *gomock.Call

Upload indicates an expected call of Upload.

type MockUser

type MockUser struct {
	// contains filtered or unexported fields
}

MockUser is a mock of User interface.

func NewMockUser

func NewMockUser(ctrl *gomock.Controller) *MockUser

NewMockUser creates a new mock instance.

func (*MockUser) Add

func (m *MockUser) Add(tx pgx.Tx, email string, hash, salt []byte) (uuid.UUID, error)

Add mocks base method.

func (*MockUser) BeginTransaction

func (m *MockUser) BeginTransaction() (pgx.Tx, error)

BeginTransaction mocks base method.

func (*MockUser) CheckIfExists

func (m *MockUser) CheckIfExists(userId uuid.UUID) (bool, error)

CheckIfExists mocks base method.

func (*MockUser) Delete

func (m *MockUser) Delete(userID uuid.UUID) error

Delete mocks base method.

func (*MockUser) EXPECT

func (m *MockUser) EXPECT() *MockUserMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUser) GetByEmail

func (m *MockUser) GetByEmail(email string) (*entity.User, error)

GetByEmail mocks base method.

func (*MockUser) GetById

func (m *MockUser) GetById(userId uuid.UUID) (*entity.User, error)

GetById mocks base method.

func (*MockUser) Update

func (m *MockUser) Update(user *entity.User) error

Update mocks base method.

func (*MockUser) UploadImage

func (m *MockUser) UploadImage(userID, imageId uuid.UUID) error

UploadImage mocks base method.

type MockUserMockRecorder

type MockUserMockRecorder struct {
	// contains filtered or unexported fields
}

MockUserMockRecorder is the mock recorder for MockUser.

func (*MockUserMockRecorder) Add

func (mr *MockUserMockRecorder) Add(tx, email, hash, salt interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockUserMockRecorder) BeginTransaction

func (mr *MockUserMockRecorder) BeginTransaction() *gomock.Call

BeginTransaction indicates an expected call of BeginTransaction.

func (*MockUserMockRecorder) CheckIfExists

func (mr *MockUserMockRecorder) CheckIfExists(userId interface{}) *gomock.Call

CheckIfExists indicates an expected call of CheckIfExists.

func (*MockUserMockRecorder) Delete

func (mr *MockUserMockRecorder) Delete(userID interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockUserMockRecorder) GetByEmail

func (mr *MockUserMockRecorder) GetByEmail(email interface{}) *gomock.Call

GetByEmail indicates an expected call of GetByEmail.

func (*MockUserMockRecorder) GetById

func (mr *MockUserMockRecorder) GetById(userId interface{}) *gomock.Call

GetById indicates an expected call of GetById.

func (*MockUserMockRecorder) Update

func (mr *MockUserMockRecorder) Update(user interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockUserMockRecorder) UploadImage

func (mr *MockUserMockRecorder) UploadImage(userID, imageId interface{}) *gomock.Call

UploadImage indicates an expected call of UploadImage.

type PgxMockAdapter

type PgxMockAdapter struct {
	// contains filtered or unexported fields
}

func NewPgxMockAdapter

func NewPgxMockAdapter(mock pgxmock.PgxPoolIface) *PgxMockAdapter

func (*PgxMockAdapter) Begin

func (p *PgxMockAdapter) Begin(ctx context.Context) (pgx.Tx, error)

func (*PgxMockAdapter) Exec

func (p *PgxMockAdapter) Exec(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error)

func (*PgxMockAdapter) Query

func (p *PgxMockAdapter) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)

func (*PgxMockAdapter) QueryRow

func (p *PgxMockAdapter) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row

type SessionRepository

type SessionRepository interface {
	Create(userID uuid.UUID) (string, error)
	Delete(sessionID string) error
}

Jump to

Keyboard shortcuts

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