Documentation ¶
Overview ¶
cart.
payment verification and transaction management.
product listing.
user login and resgistration.
Index ¶
- type CartService
- type CheckoutService
- type DefaultCartService
- type DefaultCheckoutService
- type DefaultLogService
- type DefaultProductService
- func (s *DefaultProductService) AddProduct(product models.Product) error
- func (s *DefaultProductService) FetchAllProducts() ([]models.Product, error)
- func (s *DefaultProductService) GetProductByID(productID string) (*models.Product, error)
- func (s *DefaultProductService) SearchProducts(keyword string) ([]models.Product, error)
- type DefaultUserService
- type LogService
- type ProductService
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CartService ¶
type CartService interface { GetCartByUserID(userID string) (*models.Cart, error) ClearCart(userID string) error }
func NewCartService ¶
func NewCartService(repo repositories.CartRepository) CartService
type CheckoutService ¶
type CheckoutService interface { ProcessCheckout(checkout models.Checkout) error CreateCheckout(checkout models.Checkout) error }
func NewCheckoutService ¶
func NewCheckoutService(repo repositories.CheckoutRepository) CheckoutService
type DefaultCartService ¶
type DefaultCartService struct {
Repo repositories.CartRepository
}
func (*DefaultCartService) ClearCart ¶
func (s *DefaultCartService) ClearCart(userID string) error
func (*DefaultCartService) GetCartByUserID ¶
func (s *DefaultCartService) GetCartByUserID(userID string) (*models.Cart, error)
type DefaultCheckoutService ¶
type DefaultCheckoutService struct {
Repo repositories.CheckoutRepository
}
func (*DefaultCheckoutService) CreateCheckout ¶
func (s *DefaultCheckoutService) CreateCheckout(checkout models.Checkout) error
func (*DefaultCheckoutService) ProcessCheckout ¶
func (s *DefaultCheckoutService) ProcessCheckout(checkout models.Checkout) error
type DefaultLogService ¶
type DefaultLogService struct {
Repo repositories.LogRepository
}
func NewLogService ¶
func NewLogService(repo repositories.LogRepository) *DefaultLogService
func (*DefaultLogService) LogAttack ¶
func (s *DefaultLogService) LogAttack(attackType, details, ip string) error
type DefaultProductService ¶
type DefaultProductService struct {
Repo repositories.ProductRepository
}
func NewProductService ¶
func NewProductService(repo repositories.ProductRepository) *DefaultProductService
func (*DefaultProductService) AddProduct ¶
func (s *DefaultProductService) AddProduct(product models.Product) error
func (*DefaultProductService) FetchAllProducts ¶
func (s *DefaultProductService) FetchAllProducts() ([]models.Product, error)
func (*DefaultProductService) GetProductByID ¶
func (s *DefaultProductService) GetProductByID(productID string) (*models.Product, error)
func (*DefaultProductService) SearchProducts ¶
func (s *DefaultProductService) SearchProducts(keyword string) ([]models.Product, error)
type DefaultUserService ¶
type DefaultUserService struct {
Repo repositories.UserRepository
}
type LogService ¶
type ProductService ¶
Click to show internal directories.
Click to hide internal directories.