Documentation
¶
Index ¶
- func GetKeys(m map[int]int) []int
- func Pepper_Pass(password string) []byte
- type CartService
- func (cs *CartService) AddProductToCart(ctx context.Context, pid int, quantity int) error
- func (cs *CartService) Checkout(ctx context.Context) error
- func (cs *CartService) ClearCart(ctx context.Context) error
- func (cs *CartService) GetCart(ctx context.Context) (*entity.Cart, error)
- func (cs *CartService) ModifyCart(ctx context.Context, pid int, quantity int) (cart *entity.Cart, err error)
- func (cs *CartService) RemoveProductFromCart(ctx context.Context, pid int) error
- func (cs *CartService) Total(ctx context.Context) (int, error)
- type DB
- type InventoryService
- func (is *InventoryService) AddStockToInventory(ctx context.Context, id int, quantity int) error
- func (is *InventoryService) GetAllStocksFromInventory(ctx context.Context) ([]*entity.Stock, error)
- func (is *InventoryService) GetStockFromInventory(ctx context.Context, id int) (*entity.Stock, error)
- func (is *InventoryService) RemoveStockFromInventory(ctx context.Context, id int) error
- func (is *InventoryService) UpdateStockInInventory(ctx context.Context, id int, quantity int) error
- type OrderService
- func (os *OrderService) CreateOrder(ctx context.Context, products []entity.Stock, total int) (*entity.Order, error)
- func (os *OrderService) DeleteOrder(ctx context.Context, id int) error
- func (os *OrderService) GetAllOrders(ctx context.Context) ([]entity.Order, error)
- func (os *OrderService) GetOrder(ctx context.Context, id int) (*entity.Order, error)
- func (os *OrderService) GetOrders(ctx context.Context, ids []int) ([]entity.Order, error)
- func (os *OrderService) GetOrdersOfUser(ctx context.Context, uid int) ([]entity.Order, error)
- type ProductService
- func (ps *ProductService) CreateProduct(ctx context.Context, name string, description string, price int, seller string, ...) (*entity.Product, error)
- func (ps *ProductService) DeleteProduct(ctx context.Context, id int) error
- func (ps *ProductService) GetAllProducts(ctx context.Context) ([]entity.Product, error)
- func (ps *ProductService) GetProduct(ctx context.Context, id int) (*entity.Product, error)
- func (ps *ProductService) GetProducts(ctx context.Context, ids []int) ([]entity.Product, error)
- func (ps *ProductService) UpdateProduct(ctx context.Context, update entity.Product) (*entity.Product, error)
- type Tx
- type UserService
- func (us *UserService) AuthenticateUser(ctx context.Context, email string, password string) (*entity.User, error)
- func (us *UserService) CreateUser(ctx context.Context, name string, email string, password string) (*entity.User, error)
- func (us *UserService) GetUserByEmail(ctx context.Context, email string) (*entity.User, error)
- func (us *UserService) GetUserByID(ctx context.Context, id int) (*entity.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Pepper_Pass ¶
Types ¶
type CartService ¶
type CartService struct {
// contains filtered or unexported fields
}
func NewCartService ¶
func NewCartService(db *DB) *CartService
func (*CartService) AddProductToCart ¶
func (*CartService) ModifyCart ¶
func (*CartService) RemoveProductFromCart ¶
func (cs *CartService) RemoveProductFromCart(ctx context.Context, pid int) error
type InventoryService ¶
type InventoryService struct {
// contains filtered or unexported fields
}
func NewInventoryService ¶
func NewInventoryService(db *DB) *InventoryService
func (*InventoryService) AddStockToInventory ¶
func (*InventoryService) GetAllStocksFromInventory ¶
func (*InventoryService) GetStockFromInventory ¶
func (*InventoryService) RemoveStockFromInventory ¶
func (is *InventoryService) RemoveStockFromInventory(ctx context.Context, id int) error
func (*InventoryService) UpdateStockInInventory ¶
type OrderService ¶
type OrderService struct {
// contains filtered or unexported fields
}
func NewOrderService ¶
func NewOrderService(db *DB) *OrderService
func (*OrderService) CreateOrder ¶
func (*OrderService) DeleteOrder ¶
func (os *OrderService) DeleteOrder(ctx context.Context, id int) error
func (*OrderService) GetAllOrders ¶
func (*OrderService) GetOrdersOfUser ¶
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
func NewProductService ¶
func NewProductService(db *DB) *ProductService
func (*ProductService) CreateProduct ¶
func (*ProductService) DeleteProduct ¶
func (ps *ProductService) DeleteProduct(ctx context.Context, id int) error
func (*ProductService) GetAllProducts ¶
func (*ProductService) GetProduct ¶
func (*ProductService) GetProducts ¶
func (*ProductService) UpdateProduct ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(db *DB) *UserService
func (*UserService) AuthenticateUser ¶
func (*UserService) CreateUser ¶
func (*UserService) GetUserByEmail ¶
func (*UserService) GetUserByID ¶
Click to show internal directories.
Click to hide internal directories.