mocks

package
v0.0.0-...-266b4ff Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService struct {
	mock.Mock
}

AuthService is an autogenerated mock type for the AuthService type

func NewAuthService

func NewAuthService(t interface {
	mock.TestingT
	Cleanup(func())
}) *AuthService

NewAuthService creates a new instance of AuthService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*AuthService) Hash

func (_m *AuthService) Hash(s string) (string, error)

Hash provides a mock function with given fields: s

func (*AuthService) VerifyPassword

func (_m *AuthService) VerifyPassword(userPassword string, providedPassword string) bool

VerifyPassword provides a mock function with given fields: userPassword, providedPassword

type CartService

type CartService struct {
	mock.Mock
}

CartService is an autogenerated mock type for the CartService type

func NewCartService

func NewCartService(t interface {
	mock.TestingT
	Cleanup(func())
}) *CartService

NewCartService creates a new instance of CartService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*CartService) AddItem

func (_m *CartService) AddItem(userID string, itemID string, quantity int64) error

AddItem provides a mock function with given fields: userID, itemID, quantity

func (*CartService) GetItemsList

func (_m *CartService) GetItemsList(userID string) ([]entity.Cart, error)

GetItemsList provides a mock function with given fields: userID

func (*CartService) RemoveItem

func (_m *CartService) RemoveItem(userID string, itemID string) error

RemoveItem provides a mock function with given fields: userID, itemID

func (*CartService) RemoveItems

func (_m *CartService) RemoveItems(cartItems []entity.Cart) error

RemoveItems provides a mock function with given fields: cartItems

func (*CartService) UpdateUserItem

func (_m *CartService) UpdateUserItem(userID string, itemID string, quantity int64) error

UpdateUserItem provides a mock function with given fields: userID, itemID, quantity

type MenuService struct {
	mock.Mock
}

MenuService is an autogenerated mock type for the MenuService type

func NewMenuService

func NewMenuService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MenuService

NewMenuService creates a new instance of MenuService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (_m *MenuService) GetItem(itemID string) (*entity.Menu, error)

GetItem provides a mock function with given fields: itemID

func (_m *MenuService) GetRestaurantMenu(id int, limit int, offset int) (*utils.Pagination, error)

GetRestaurantMenu provides a mock function with given fields: id, limit, offset

type OrderService

type OrderService struct {
	mock.Mock
}

OrderService is an autogenerated mock type for the OrderService type

func NewOrderService

func NewOrderService(t interface {
	mock.TestingT
	Cleanup(func())
}) *OrderService

NewOrderService creates a new instance of OrderService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*OrderService) CalculateTotalOrderPrice

func (_m *OrderService) CalculateTotalOrderPrice(carts []entity.Cart) float64

CalculateTotalOrderPrice provides a mock function with given fields: carts

func (*OrderService) CreateOrder

func (_m *OrderService) CreateOrder(userID string) error

CreateOrder provides a mock function with given fields: userID

func (*OrderService) GetOrderHistory

func (_m *OrderService) GetOrderHistory(userID string) ([]entity.Order, error)

GetOrderHistory provides a mock function with given fields: userID

func (*OrderService) UpdateOrderStatusDelivered

func (_m *OrderService) UpdateOrderStatusDelivered(userID string, orderID string) error

UpdateOrderStatusDelivered provides a mock function with given fields: userID, orderID

func (*OrderService) UpdateOrderStatusShipped

func (_m *OrderService) UpdateOrderStatusShipped(userID string, orderID string) error

UpdateOrderStatusShipped provides a mock function with given fields: userID, orderID

type RestaurantService

type RestaurantService struct {
	mock.Mock
}

RestaurantService is an autogenerated mock type for the RestaurantService type

func NewRestaurantService

func NewRestaurantService(t interface {
	mock.TestingT
	Cleanup(func())
}) *RestaurantService

NewRestaurantService creates a new instance of RestaurantService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*RestaurantService) CreateRestaurant

func (_m *RestaurantService) CreateRestaurant(restaurant entity.Restaurant) error

CreateRestaurant provides a mock function with given fields: restaurant

func (*RestaurantService) DeleteRestaurant

func (_m *RestaurantService) DeleteRestaurant(id int64) error

DeleteRestaurant provides a mock function with given fields: id

func (*RestaurantService) FilterRestaurants

func (_m *RestaurantService) FilterRestaurants(category string, zip string, priceRange string) ([]entity.Restaurant, error)

FilterRestaurants provides a mock function with given fields: category, zip, priceRange

func (*RestaurantService) UpdateRestaurant

func (_m *RestaurantService) UpdateRestaurant(restaurant entity.Restaurant) error

UpdateRestaurant provides a mock function with given fields: restaurant

type TokenService

type TokenService struct {
	mock.Mock
}

TokenService is an autogenerated mock type for the TokenService type

func NewTokenService

func NewTokenService(t interface {
	mock.TestingT
	Cleanup(func())
}) *TokenService

NewTokenService creates a new instance of TokenService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*TokenService) ExtractEmailFromToken

func (_m *TokenService) ExtractEmailFromToken(requestToken string, secret string) (string, error)

ExtractEmailFromToken provides a mock function with given fields: requestToken, secret

func (*TokenService) GenerateToken

func (_m *TokenService) GenerateToken(email string) (string, error)

GenerateToken provides a mock function with given fields: email

func (*TokenService) VerifyToken

func (_m *TokenService) VerifyToken(tokenString string) error

VerifyToken provides a mock function with given fields: tokenString

type UserService

type UserService struct {
	mock.Mock
}

UserService is an autogenerated mock type for the UserService type

func NewUserService

func NewUserService(t interface {
	mock.TestingT
	Cleanup(func())
}) *UserService

NewUserService creates a new instance of UserService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*UserService) CreateUser

func (_m *UserService) CreateUser(user entity.User) (*entity.User, error)

CreateUser provides a mock function with given fields: user

func (*UserService) GenerateTokenResponse

func (_m *UserService) GenerateTokenResponse(email string, password string) (string, error)

GenerateTokenResponse provides a mock function with given fields: email, password

func (*UserService) GetUserByEmail

func (_m *UserService) GetUserByEmail(email string) (*entity.User, error)

GetUserByEmail provides a mock function with given fields: email

func (*UserService) GetUserByID

func (_m *UserService) GetUserByID(id string) (*entity.User, error)

GetUserByID provides a mock function with given fields: id

func (*UserService) VerifyUser

func (_m *UserService) VerifyUser(user entity.User) (bool, error)

VerifyUser provides a mock function with given fields: user

Jump to

Keyboard shortcuts

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