mock

package
v0.0.0-...-0366d43 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceMocks

type InterfaceMocks struct {
	Logger       *MockLogger
	CustomerRepo *MockCustomerRepository
	SellerRepo   *MockSellerRepository
	ProductRepo  *MockProductRepository
	OrderRepo    *MockOrderRepository
}

func NewInterfaceMocks

func NewInterfaceMocks(t *testing.T) *InterfaceMocks

NewInterfaceMocks create an *InterfaceMocks with their mocked interfaces initialized

type MockCustomerRepository

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

MockCustomerRepository is a mock of CustomerRepository interface.

func NewMockCustomerRepository

func NewMockCustomerRepository(ctrl *gomock.Controller) *MockCustomerRepository

NewMockCustomerRepository creates a new mock instance.

func (*MockCustomerRepository) Create

func (m *MockCustomerRepository) Create(ctx context.Context, customer model.Customer) (int64, error)

Create mocks base method.

func (*MockCustomerRepository) Delete

func (m *MockCustomerRepository) Delete(ctx context.Context, id int64) (bool, error)

Delete mocks base method.

func (*MockCustomerRepository) EXPECT

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

func (*MockCustomerRepository) FindByEmail

func (m *MockCustomerRepository) FindByEmail(ctx context.Context, email string) (*model.Customer, error)

FindByEmail mocks base method.

func (*MockCustomerRepository) FindById

func (m *MockCustomerRepository) FindById(ctx context.Context, id int64) (*model.Customer, error)

FindById mocks base method.

func (*MockCustomerRepository) Update

func (m *MockCustomerRepository) Update(ctx context.Context, customer model.Customer) (bool, error)

Update mocks base method.

type MockCustomerRepositoryMockRecorder

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

MockCustomerRepositoryMockRecorder is the mock recorder for MockCustomerRepository.

func (*MockCustomerRepositoryMockRecorder) Create

func (mr *MockCustomerRepositoryMockRecorder) Create(ctx, customer interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockCustomerRepositoryMockRecorder) Delete

func (mr *MockCustomerRepositoryMockRecorder) Delete(ctx, id interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockCustomerRepositoryMockRecorder) FindByEmail

func (mr *MockCustomerRepositoryMockRecorder) FindByEmail(ctx, email interface{}) *gomock.Call

FindByEmail indicates an expected call of FindByEmail.

func (*MockCustomerRepositoryMockRecorder) FindById

func (mr *MockCustomerRepositoryMockRecorder) FindById(ctx, id interface{}) *gomock.Call

FindById indicates an expected call of FindById.

func (*MockCustomerRepositoryMockRecorder) Update

func (mr *MockCustomerRepositoryMockRecorder) Update(ctx, customer interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockLogger

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

MockLogger is a mock of Logger interface.

func NewMockLogger

func NewMockLogger(ctrl *gomock.Controller) *MockLogger

NewMockLogger creates a new mock instance.

func (*MockLogger) Debug

func (m *MockLogger) Debug(arg0 ...interface{})

Debug mocks base method.

func (*MockLogger) Debugf

func (m *MockLogger) Debugf(arg0 string, arg1 ...interface{})

Debugf mocks base method.

func (*MockLogger) EXPECT

func (m *MockLogger) EXPECT() *MockLoggerMockRecorder

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

func (*MockLogger) Error

func (m *MockLogger) Error(arg0 ...interface{})

Error mocks base method.

func (*MockLogger) Errorf

func (m *MockLogger) Errorf(arg0 string, arg1 ...interface{})

Errorf mocks base method.

func (*MockLogger) Fatal

func (m *MockLogger) Fatal(arg0 ...interface{})

Fatal mocks base method.

func (*MockLogger) Fatalf

func (m *MockLogger) Fatalf(arg0 string, arg1 ...interface{})

Fatalf mocks base method.

func (*MockLogger) Info

func (m *MockLogger) Info(arg0 ...interface{})

Info mocks base method.

func (*MockLogger) Infof

func (m *MockLogger) Infof(arg0 string, arg1 ...interface{})

Infof mocks base method.

func (*MockLogger) Panic

func (m *MockLogger) Panic(arg0 ...interface{})

Panic mocks base method.

func (*MockLogger) Panicf

func (m *MockLogger) Panicf(arg0 string, arg1 ...interface{})

Panicf mocks base method.

func (*MockLogger) Print

func (m *MockLogger) Print(arg0 ...interface{})

Print mocks base method.

func (*MockLogger) Printf

func (m *MockLogger) Printf(arg0 string, arg1 ...interface{})

Printf mocks base method.

func (*MockLogger) Warn

func (m *MockLogger) Warn(arg0 ...interface{})

Warn mocks base method.

func (*MockLogger) Warnf

func (m *MockLogger) Warnf(arg0 string, arg1 ...interface{})

Warnf mocks base method.

func (*MockLogger) WithFields

func (m *MockLogger) WithFields(arg0 map[string]interface{}) model.Logger

WithFields mocks base method.

type MockLoggerMockRecorder

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

MockLoggerMockRecorder is the mock recorder for MockLogger.

func (*MockLoggerMockRecorder) Debug

func (mr *MockLoggerMockRecorder) Debug(arg0 ...interface{}) *gomock.Call

Debug indicates an expected call of Debug.

func (*MockLoggerMockRecorder) Debugf

func (mr *MockLoggerMockRecorder) Debugf(arg0 interface{}, arg1 ...interface{}) *gomock.Call

Debugf indicates an expected call of Debugf.

func (*MockLoggerMockRecorder) Error

func (mr *MockLoggerMockRecorder) Error(arg0 ...interface{}) *gomock.Call

Error indicates an expected call of Error.

func (*MockLoggerMockRecorder) Errorf

func (mr *MockLoggerMockRecorder) Errorf(arg0 interface{}, arg1 ...interface{}) *gomock.Call

Errorf indicates an expected call of Errorf.

func (*MockLoggerMockRecorder) Fatal

func (mr *MockLoggerMockRecorder) Fatal(arg0 ...interface{}) *gomock.Call

Fatal indicates an expected call of Fatal.

func (*MockLoggerMockRecorder) Fatalf

func (mr *MockLoggerMockRecorder) Fatalf(arg0 interface{}, arg1 ...interface{}) *gomock.Call

Fatalf indicates an expected call of Fatalf.

func (*MockLoggerMockRecorder) Info

func (mr *MockLoggerMockRecorder) Info(arg0 ...interface{}) *gomock.Call

Info indicates an expected call of Info.

func (*MockLoggerMockRecorder) Infof

func (mr *MockLoggerMockRecorder) Infof(arg0 interface{}, arg1 ...interface{}) *gomock.Call

Infof indicates an expected call of Infof.

func (*MockLoggerMockRecorder) Panic

func (mr *MockLoggerMockRecorder) Panic(arg0 ...interface{}) *gomock.Call

Panic indicates an expected call of Panic.

func (*MockLoggerMockRecorder) Panicf

func (mr *MockLoggerMockRecorder) Panicf(arg0 interface{}, arg1 ...interface{}) *gomock.Call

Panicf indicates an expected call of Panicf.

func (*MockLoggerMockRecorder) Print

func (mr *MockLoggerMockRecorder) Print(arg0 ...interface{}) *gomock.Call

Print indicates an expected call of Print.

func (*MockLoggerMockRecorder) Printf

func (mr *MockLoggerMockRecorder) Printf(arg0 interface{}, arg1 ...interface{}) *gomock.Call

Printf indicates an expected call of Printf.

func (*MockLoggerMockRecorder) Warn

func (mr *MockLoggerMockRecorder) Warn(arg0 ...interface{}) *gomock.Call

Warn indicates an expected call of Warn.

func (*MockLoggerMockRecorder) Warnf

func (mr *MockLoggerMockRecorder) Warnf(arg0 interface{}, arg1 ...interface{}) *gomock.Call

Warnf indicates an expected call of Warnf.

func (*MockLoggerMockRecorder) WithFields

func (mr *MockLoggerMockRecorder) WithFields(arg0 interface{}) *gomock.Call

WithFields indicates an expected call of WithFields.

type MockOrderRepository

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

MockOrderRepository is a mock of OrderRepository interface.

func NewMockOrderRepository

func NewMockOrderRepository(ctrl *gomock.Controller) *MockOrderRepository

NewMockOrderRepository creates a new mock instance.

func (*MockOrderRepository) Create

func (m *MockOrderRepository) Create(ctx context.Context, order model.Order) (int64, error)

Create mocks base method.

func (*MockOrderRepository) EXPECT

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

func (*MockOrderRepository) FindById

func (m *MockOrderRepository) FindById(ctx context.Context, id int64) (*model.Order, error)

FindById mocks base method.

func (*MockOrderRepository) Update

func (m *MockOrderRepository) Update(ctx context.Context, order model.Order) (bool, error)

Update mocks base method.

type MockOrderRepositoryMockRecorder

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

MockOrderRepositoryMockRecorder is the mock recorder for MockOrderRepository.

func (*MockOrderRepositoryMockRecorder) Create

func (mr *MockOrderRepositoryMockRecorder) Create(ctx, order interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockOrderRepositoryMockRecorder) FindById

func (mr *MockOrderRepositoryMockRecorder) FindById(ctx, id interface{}) *gomock.Call

FindById indicates an expected call of FindById.

func (*MockOrderRepositoryMockRecorder) Update

func (mr *MockOrderRepositoryMockRecorder) Update(ctx, order interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockProductRepository

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

MockProductRepository is a mock of ProductRepository interface.

func NewMockProductRepository

func NewMockProductRepository(ctrl *gomock.Controller) *MockProductRepository

NewMockProductRepository creates a new mock instance.

func (*MockProductRepository) Create

func (m *MockProductRepository) Create(ctx context.Context, product model.Product) (int64, error)

Create mocks base method.

func (*MockProductRepository) Delete

func (m *MockProductRepository) Delete(ctx context.Context, id int64) (bool, error)

Delete mocks base method.

func (*MockProductRepository) DeleteAllBySellerId

func (m *MockProductRepository) DeleteAllBySellerId(ctx context.Context, sellerId int64) (bool, error)

DeleteAllBySellerId mocks base method.

func (*MockProductRepository) EXPECT

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

func (*MockProductRepository) FindAllBySellerId

func (m *MockProductRepository) FindAllBySellerId(ctx context.Context, sellerId int64) ([]model.Product, error)

FindAllBySellerId mocks base method.

func (*MockProductRepository) FindById

func (m *MockProductRepository) FindById(ctx context.Context, id int64) (*model.Product, error)

FindById mocks base method.

func (*MockProductRepository) Search

Search mocks base method.

func (*MockProductRepository) Update

func (m *MockProductRepository) Update(ctx context.Context, product model.Product) (bool, error)

Update mocks base method.

type MockProductRepositoryMockRecorder

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

MockProductRepositoryMockRecorder is the mock recorder for MockProductRepository.

func (*MockProductRepositoryMockRecorder) Create

func (mr *MockProductRepositoryMockRecorder) Create(ctx, product interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockProductRepositoryMockRecorder) Delete

func (mr *MockProductRepositoryMockRecorder) Delete(ctx, id interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockProductRepositoryMockRecorder) DeleteAllBySellerId

func (mr *MockProductRepositoryMockRecorder) DeleteAllBySellerId(ctx, sellerId interface{}) *gomock.Call

DeleteAllBySellerId indicates an expected call of DeleteAllBySellerId.

func (*MockProductRepositoryMockRecorder) FindAllBySellerId

func (mr *MockProductRepositoryMockRecorder) FindAllBySellerId(ctx, sellerId interface{}) *gomock.Call

FindAllBySellerId indicates an expected call of FindAllBySellerId.

func (*MockProductRepositoryMockRecorder) FindById

func (mr *MockProductRepositoryMockRecorder) FindById(ctx, id interface{}) *gomock.Call

FindById indicates an expected call of FindById.

func (*MockProductRepositoryMockRecorder) Search

func (mr *MockProductRepositoryMockRecorder) Search(ctx, filters, pagingReq interface{}) *gomock.Call

Search indicates an expected call of Search.

func (*MockProductRepositoryMockRecorder) Update

func (mr *MockProductRepositoryMockRecorder) Update(ctx, product interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockSellerRepository

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

MockSellerRepository is a mock of SellerRepository interface.

func NewMockSellerRepository

func NewMockSellerRepository(ctrl *gomock.Controller) *MockSellerRepository

NewMockSellerRepository creates a new mock instance.

func (*MockSellerRepository) Create

func (m *MockSellerRepository) Create(ctx context.Context, seller model.Seller) (int64, error)

Create mocks base method.

func (*MockSellerRepository) Delete

func (m *MockSellerRepository) Delete(ctx context.Context, id int64) (bool, error)

Delete mocks base method.

func (*MockSellerRepository) EXPECT

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

func (*MockSellerRepository) FindById

func (m *MockSellerRepository) FindById(ctx context.Context, id int64) (*model.Seller, error)

FindById mocks base method.

func (*MockSellerRepository) FindByName

func (m *MockSellerRepository) FindByName(ctx context.Context, name string) (*model.Seller, error)

FindByName mocks base method.

func (*MockSellerRepository) Update

func (m *MockSellerRepository) Update(ctx context.Context, seller model.Seller) (bool, error)

Update mocks base method.

type MockSellerRepositoryMockRecorder

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

MockSellerRepositoryMockRecorder is the mock recorder for MockSellerRepository.

func (*MockSellerRepositoryMockRecorder) Create

func (mr *MockSellerRepositoryMockRecorder) Create(ctx, seller interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockSellerRepositoryMockRecorder) Delete

func (mr *MockSellerRepositoryMockRecorder) Delete(ctx, id interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockSellerRepositoryMockRecorder) FindById

func (mr *MockSellerRepositoryMockRecorder) FindById(ctx, id interface{}) *gomock.Call

FindById indicates an expected call of FindById.

func (*MockSellerRepositoryMockRecorder) FindByName

func (mr *MockSellerRepositoryMockRecorder) FindByName(ctx, name interface{}) *gomock.Call

FindByName indicates an expected call of FindByName.

func (*MockSellerRepositoryMockRecorder) Update

func (mr *MockSellerRepositoryMockRecorder) Update(ctx, seller interface{}) *gomock.Call

Update indicates an expected call of Update.

Jump to

Keyboard shortcuts

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