mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderRepository

type OrderRepository struct {
	mock.Mock
}

OrderRepository is an autogenerated mock type for the OrderRepository type

func (*OrderRepository) Create

Create provides a mock function with given fields: ctx, param

func (*OrderRepository) CreateOrderItems

func (_m *OrderRepository) CreateOrderItems(ctx context.Context, orderId int64, items []*entity.CreateOrderItemParam) error

CreateOrderItems provides a mock function with given fields: ctx, orderId, items

func (*OrderRepository) GetAllOrders

func (_m *OrderRepository) GetAllOrders(ctx context.Context) ([]*entity.Order, error)

GetAllOrders provides a mock function with given fields: ctx

func (*OrderRepository) GetAnnualIncome

func (_m *OrderRepository) GetAnnualIncome(ctx context.Context) ([]*entity.AnnualIncome, error)

GetAnnualIncome provides a mock function with given fields: ctx

func (*OrderRepository) GetDailyOrderCount

func (_m *OrderRepository) GetDailyOrderCount(ctx context.Context) (int, error)

GetDailyOrderCount provides a mock function with given fields: ctx

func (*OrderRepository) GetLastDayIncome

func (_m *OrderRepository) GetLastDayIncome(ctx context.Context) (int, error)

GetLastDayIncome provides a mock function with given fields: ctx

func (*OrderRepository) GetLastMonthIncome

func (_m *OrderRepository) GetLastMonthIncome(ctx context.Context) (int, error)

GetLastMonthIncome provides a mock function with given fields: ctx

func (*OrderRepository) GetOrderItemsByID

func (_m *OrderRepository) GetOrderItemsByID(ctx context.Context, ID int64) ([]*entity.OrderItem, error)

GetOrderItemsByID provides a mock function with given fields: ctx, ID

func (*OrderRepository) GetTotalOrderCount

func (_m *OrderRepository) GetTotalOrderCount(ctx context.Context) (int, error)

GetTotalOrderCount provides a mock function with given fields: ctx

type OrderUsecase

type OrderUsecase struct {
	mock.Mock
}

OrderUsecase is an autogenerated mock type for the OrderUsecase type

func (*OrderUsecase) Create

func (_m *OrderUsecase) Create(ctx context.Context, param entity.CreateOrderParam) (*entity.Order, error)

Create provides a mock function with given fields: ctx, param

func (*OrderUsecase) GetAllOrders

func (_m *OrderUsecase) GetAllOrders(ctx context.Context) ([]*entity.Order, error)

GetAllOrders provides a mock function with given fields: ctx

func (*OrderUsecase) GetAnnualIncome

func (_m *OrderUsecase) GetAnnualIncome(ctx context.Context) ([]*entity.AnnualIncome, error)

GetAnnualIncome provides a mock function with given fields: ctx

func (*OrderUsecase) GetDailyOrderCount

func (_m *OrderUsecase) GetDailyOrderCount(ctx context.Context) (int, error)

GetDailyOrderCount provides a mock function with given fields: ctx

func (*OrderUsecase) GetLastDayIncome

func (_m *OrderUsecase) GetLastDayIncome(ctx context.Context) (int, error)

GetLastDayIncome provides a mock function with given fields: ctx

func (*OrderUsecase) GetLastMonthIncome

func (_m *OrderUsecase) GetLastMonthIncome(ctx context.Context) (int, error)

GetLastMonthIncome provides a mock function with given fields: ctx

func (*OrderUsecase) GetOrderItems

func (_m *OrderUsecase) GetOrderItems(ctx context.Context, orderID int64) ([]*entity.OrderItem, error)

GetOrderItems provides a mock function with given fields: ctx, orderID

func (*OrderUsecase) GetTotalOrderCount

func (_m *OrderUsecase) GetTotalOrderCount(ctx context.Context) (int, error)

GetTotalOrderCount provides a mock function with given fields: ctx

type ProductRepository

type ProductRepository struct {
	mock.Mock
}

ProductRepository is an autogenerated mock type for the ProductRepository type

func (*ProductRepository) Create

Create provides a mock function with given fields: ctx, param

func (*ProductRepository) DecrementProductByIDs

func (_m *ProductRepository) DecrementProductByIDs(ctx context.Context, IDDecrementMap map[int64]int) error

DecrementProductByIDs provides a mock function with given fields: ctx, IDDecrementMap

func (*ProductRepository) DeleteByID

func (_m *ProductRepository) DeleteByID(ctx context.Context, ID int64) (bool, error)

DeleteByID provides a mock function with given fields: ctx, ID

func (*ProductRepository) GetAllProducts

func (_m *ProductRepository) GetAllProducts(ctx context.Context) ([]*entity.Product, error)

GetAllProducts provides a mock function with given fields: ctx

func (*ProductRepository) GetBestSellerProducts

func (_m *ProductRepository) GetBestSellerProducts(ctx context.Context) ([]*entity.ProductSale, error)

GetBestSellerProducts provides a mock function with given fields: ctx

func (*ProductRepository) GetProductByCode

func (_m *ProductRepository) GetProductByCode(ctx context.Context, code string) (*entity.Product, error)

GetProductByCode provides a mock function with given fields: ctx, code

func (*ProductRepository) GetProductByID

func (_m *ProductRepository) GetProductByID(ctx context.Context, ID int64) (*entity.Product, error)

GetProductByID provides a mock function with given fields: ctx, ID

func (*ProductRepository) GetProductsByIDs

func (_m *ProductRepository) GetProductsByIDs(ctx context.Context, IDs ...int64) ([]*entity.Product, error)

GetProductsByIDs provides a mock function with given fields: ctx, IDs

func (*ProductRepository) UpdateByID

func (_m *ProductRepository) UpdateByID(ctx context.Context, ID int64, param entity.UpdateProductParam) (bool, error)

UpdateByID provides a mock function with given fields: ctx, ID, param

type ProductUsecase

type ProductUsecase struct {
	mock.Mock
}

ProductUsecase is an autogenerated mock type for the ProductUsecase type

func (*ProductUsecase) CreateProduct

func (_m *ProductUsecase) CreateProduct(ctx context.Context, param entity.CreateProductParam) (*entity.Product, error)

CreateProduct provides a mock function with given fields: ctx, param

func (*ProductUsecase) DeleteProduct

func (_m *ProductUsecase) DeleteProduct(ctx context.Context, ID int64) (bool, error)

DeleteProduct provides a mock function with given fields: ctx, ID

func (*ProductUsecase) GetAllProducts

func (_m *ProductUsecase) GetAllProducts(ctx context.Context) ([]*entity.Product, error)

GetAllProducts provides a mock function with given fields: ctx

func (*ProductUsecase) GetBestSellerProducts

func (_m *ProductUsecase) GetBestSellerProducts(ctx context.Context) ([]*entity.ProductSale, error)

GetBestSellerProducts provides a mock function with given fields: ctx

func (*ProductUsecase) GetProductByCode

func (_m *ProductUsecase) GetProductByCode(ctx context.Context, code string) (*entity.Product, error)

GetProductByCode provides a mock function with given fields: ctx, code

func (*ProductUsecase) GetProductByID

func (_m *ProductUsecase) GetProductByID(ctx context.Context, ID int64) (*entity.Product, error)

GetProductByID provides a mock function with given fields: ctx, ID

func (*ProductUsecase) UpdateProduct

func (_m *ProductUsecase) UpdateProduct(ctx context.Context, ID int64, param entity.UpdateProductParam) (bool, error)

UpdateProduct provides a mock function with given fields: ctx, ID, param

type Storage

type Storage struct {
	mock.Mock
}

Storage is an autogenerated mock type for the Storage type

func (*Storage) Save

func (_m *Storage) Save(file *multipart.FileHeader, dir string, filename string) (string, error)

Save provides a mock function with given fields: file, dir, filename

type UnitOfWork

type UnitOfWork struct {
	mock.Mock
}

UnitOfWork is an autogenerated mock type for the UnitOfWork type

func (*UnitOfWork) Begin

func (_m *UnitOfWork) Begin(ctx context.Context) (context.Context, error)

Begin provides a mock function with given fields: ctx

func (*UnitOfWork) Commit

func (_m *UnitOfWork) Commit(ctx context.Context) error

Commit provides a mock function with given fields: ctx

func (*UnitOfWork) Rollback

func (_m *UnitOfWork) Rollback(ctx context.Context) error

Rollback provides a mock function with given fields: ctx

type UserRepository

type UserRepository struct {
	mock.Mock
}

UserRepository is an autogenerated mock type for the UserRepository type

func (*UserRepository) GetUserByEmail

func (_m *UserRepository) GetUserByEmail(ctx context.Context, email string) (*entity.User, error)

GetUserByEmail provides a mock function with given fields: ctx, email

func (*UserRepository) GetUserByID

func (_m *UserRepository) GetUserByID(ctx context.Context, ID int64) (*entity.User, error)

GetUserByID provides a mock function with given fields: ctx, ID

func (*UserRepository) UpdateByID

func (_m *UserRepository) UpdateByID(ctx context.Context, ID int64, param entity.UpdateUserParam) (bool, error)

UpdateByID provides a mock function with given fields: ctx, ID, param

func (*UserRepository) UpdatePasswordByID

func (_m *UserRepository) UpdatePasswordByID(ctx context.Context, ID int64, password string) (bool, error)

UpdatePasswordByID provides a mock function with given fields: ctx, ID, password

type UserUsecase

type UserUsecase struct {
	mock.Mock
}

UserUsecase is an autogenerated mock type for the UserUsecase type

func (*UserUsecase) GetUserByCredential

func (_m *UserUsecase) GetUserByCredential(ctx context.Context, credential entity.UserCredential) (*entity.User, error)

GetUserByCredential provides a mock function with given fields: ctx, credential

func (*UserUsecase) GetUserByID

func (_m *UserUsecase) GetUserByID(ctx context.Context, ID int64) (*entity.User, error)

GetUserByID provides a mock function with given fields: ctx, ID

func (*UserUsecase) SaveUserPhoto

func (_m *UserUsecase) SaveUserPhoto(ctx context.Context, user *entity.User, file *multipart.FileHeader) (string, error)

SaveUserPhoto provides a mock function with given fields: ctx, user, file

func (*UserUsecase) UpdateUser

func (_m *UserUsecase) UpdateUser(ctx context.Context, ID int64, param entity.UpdateUserParam) (bool, error)

UpdateUser provides a mock function with given fields: ctx, ID, param

func (*UserUsecase) UpdateUserPassword

func (_m *UserUsecase) UpdateUserPassword(ctx context.Context, ID int64, password string) (bool, error)

UpdateUserPassword provides a mock function with given fields: ctx, ID, password

Jump to

Keyboard shortcuts

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