Documentation
¶
Index ¶
- type OrderRepository
- func (_m *OrderRepository) Create(ctx context.Context, param entity.CreateOrderParam) (*entity.Order, error)
- func (_m *OrderRepository) CreateOrderItems(ctx context.Context, orderId int64, items []*entity.CreateOrderItemParam) error
- func (_m *OrderRepository) GetAllOrders(ctx context.Context) ([]*entity.Order, error)
- func (_m *OrderRepository) GetAnnualIncome(ctx context.Context) ([]*entity.AnnualIncome, error)
- func (_m *OrderRepository) GetDailyOrderCount(ctx context.Context) (int, error)
- func (_m *OrderRepository) GetLastDayIncome(ctx context.Context) (int, error)
- func (_m *OrderRepository) GetLastMonthIncome(ctx context.Context) (int, error)
- func (_m *OrderRepository) GetOrderItemsByID(ctx context.Context, ID int64) ([]*entity.OrderItem, error)
- func (_m *OrderRepository) GetTotalOrderCount(ctx context.Context) (int, error)
- type OrderUsecase
- func (_m *OrderUsecase) Create(ctx context.Context, param entity.CreateOrderParam) (*entity.Order, error)
- func (_m *OrderUsecase) GetAllOrders(ctx context.Context) ([]*entity.Order, error)
- func (_m *OrderUsecase) GetAnnualIncome(ctx context.Context) ([]*entity.AnnualIncome, error)
- func (_m *OrderUsecase) GetDailyOrderCount(ctx context.Context) (int, error)
- func (_m *OrderUsecase) GetLastDayIncome(ctx context.Context) (int, error)
- func (_m *OrderUsecase) GetLastMonthIncome(ctx context.Context) (int, error)
- func (_m *OrderUsecase) GetOrderItems(ctx context.Context, orderID int64) ([]*entity.OrderItem, error)
- func (_m *OrderUsecase) GetTotalOrderCount(ctx context.Context) (int, error)
- type ProductRepository
- func (_m *ProductRepository) Create(ctx context.Context, param entity.CreateProductParam) (*entity.Product, error)
- func (_m *ProductRepository) DecrementProductByIDs(ctx context.Context, IDDecrementMap map[int64]int) error
- func (_m *ProductRepository) DeleteByID(ctx context.Context, ID int64) (bool, error)
- func (_m *ProductRepository) GetAllProducts(ctx context.Context) ([]*entity.Product, error)
- func (_m *ProductRepository) GetBestSellerProducts(ctx context.Context) ([]*entity.ProductSale, error)
- func (_m *ProductRepository) GetProductByCode(ctx context.Context, code string) (*entity.Product, error)
- func (_m *ProductRepository) GetProductByID(ctx context.Context, ID int64) (*entity.Product, error)
- func (_m *ProductRepository) GetProductsByIDs(ctx context.Context, IDs ...int64) ([]*entity.Product, error)
- func (_m *ProductRepository) UpdateByID(ctx context.Context, ID int64, param entity.UpdateProductParam) (bool, error)
- type ProductUsecase
- func (_m *ProductUsecase) CreateProduct(ctx context.Context, param entity.CreateProductParam) (*entity.Product, error)
- func (_m *ProductUsecase) DeleteProduct(ctx context.Context, ID int64) (bool, error)
- func (_m *ProductUsecase) GetAllProducts(ctx context.Context) ([]*entity.Product, error)
- func (_m *ProductUsecase) GetBestSellerProducts(ctx context.Context) ([]*entity.ProductSale, error)
- func (_m *ProductUsecase) GetProductByCode(ctx context.Context, code string) (*entity.Product, error)
- func (_m *ProductUsecase) GetProductByID(ctx context.Context, ID int64) (*entity.Product, error)
- func (_m *ProductUsecase) UpdateProduct(ctx context.Context, ID int64, param entity.UpdateProductParam) (bool, error)
- type Storage
- type UnitOfWork
- type UserRepository
- func (_m *UserRepository) GetUserByEmail(ctx context.Context, email string) (*entity.User, error)
- func (_m *UserRepository) GetUserByID(ctx context.Context, ID int64) (*entity.User, error)
- func (_m *UserRepository) UpdateByID(ctx context.Context, ID int64, param entity.UpdateUserParam) (bool, error)
- func (_m *UserRepository) UpdatePasswordByID(ctx context.Context, ID int64, password string) (bool, error)
- type UserUsecase
- func (_m *UserUsecase) GetUserByCredential(ctx context.Context, credential entity.UserCredential) (*entity.User, error)
- func (_m *UserUsecase) GetUserByID(ctx context.Context, ID int64) (*entity.User, error)
- func (_m *UserUsecase) SaveUserPhoto(ctx context.Context, user *entity.User, file *multipart.FileHeader) (string, error)
- func (_m *UserUsecase) UpdateUser(ctx context.Context, ID int64, param entity.UpdateUserParam) (bool, error)
- func (_m *UserUsecase) UpdateUserPassword(ctx context.Context, ID int64, password string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderRepository ¶
OrderRepository is an autogenerated mock type for the OrderRepository type
func (*OrderRepository) Create ¶
func (_m *OrderRepository) Create(ctx context.Context, param entity.CreateOrderParam) (*entity.Order, error)
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 ¶
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 ¶
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 ¶
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 ¶
ProductRepository is an autogenerated mock type for the ProductRepository type
func (*ProductRepository) Create ¶
func (_m *ProductRepository) Create(ctx context.Context, param entity.CreateProductParam) (*entity.Product, error)
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 ¶
DeleteByID provides a mock function with given fields: ctx, ID
func (*ProductRepository) GetAllProducts ¶
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 ¶
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 ¶
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 ¶
DeleteProduct provides a mock function with given fields: ctx, ID
func (*ProductUsecase) GetAllProducts ¶
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 ¶
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 UnitOfWork ¶
UnitOfWork is an autogenerated mock type for the UnitOfWork type
type UserRepository ¶
UserRepository is an autogenerated mock type for the UserRepository type
func (*UserRepository) GetUserByEmail ¶
GetUserByEmail provides a mock function with given fields: ctx, email
func (*UserRepository) GetUserByID ¶
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 ¶
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 ¶
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