Documentation ¶
Overview ¶
Package db provides products database functionality
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbImpl ¶
type DbImpl struct {
// contains filtered or unexported fields
}
DbImpl is a memory mocked abstraction of a database, real case scenarios should provide an api for external databases
func (*DbImpl) GetAllProducts ¶
GetAllProducts return all the products present in the db
type MemDbImpl ¶
type MemDbImpl struct {
// contains filtered or unexported fields
}
func NewMemDbImpl ¶
func NewMemDbImpl() *MemDbImpl
func (*MemDbImpl) DeleteBasket ¶
type PromotionDb ¶
type PromotionDb struct {
// contains filtered or unexported fields
}
func NewPromotionsDb ¶
func NewPromotionsDb() PromotionDb
func (*PromotionDb) GetStrategies ¶
func (pdb *PromotionDb) GetStrategies() []model.DiscountCalculator
Click to show internal directories.
Click to hide internal directories.