Documentation
¶
Index ¶
Constants ¶
View Source
const ( ItemTypeLuxury = "LUXURY" ItemTypeNormal = "NORMAL" )
Variables ¶
View Source
var (
PriceCheckRule = `` /* 507-byte string literal not displayed */
)
View Source
var ( Purchases = []*Purchase{ &Purchase{ PurchaseDate: time.Date(2019, time.January, 4, 13, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.January, 17, 15, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.February, 12, 7, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.February, 24, 3, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.March, 22, 22, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.March, 24, 17, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.March, 15, 14, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.March, 25, 10, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.March, 19, 13, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.June, 6, 21, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, &Purchase{ PurchaseDate: time.Date(2019, time.June, 19, 22, 0, 0, 0, time.Local), ItemType: ItemTypeLuxury, Price: 100000, }, } )
Functions ¶
This section is empty.
Types ¶
type CashFlow ¶
type CashFlowCalculator ¶
type CashFlowCalculator struct {
}
func (*CashFlowCalculator) CalculatePurchases ¶
func (cf *CashFlowCalculator) CalculatePurchases()
type ItemCart ¶
type ItemCart struct {
Items []*Item
}
func (*ItemCart) CountItemWithPriceAboveWithNoDiscount ¶
func (*ItemCart) GiveDiscountForItemPriceAbove ¶
func (*ItemCart) ShowDiscount ¶
func (cart *ItemCart) ShowDiscount()
type ItemPriceChecker ¶
type ItemPriceChecker struct {
}
func (*ItemPriceChecker) CheckCart ¶
func (cf *ItemPriceChecker) CheckCart()
func (*ItemPriceChecker) CheckPrices ¶
func (cf *ItemPriceChecker) CheckPrices()
Click to show internal directories.
Click to hide internal directories.