Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SerializeShoppingCart ¶
func SerializeShoppingCart(s *ShoppingCart) []byte
Types ¶
type ContactRequest ¶
type ShoppingCart ¶
type ShoppingCart struct {
Items map[string]*ShoppingCartItem `json:"items"`
}
func NewShoppingCart ¶
func NewShoppingCart() *ShoppingCart
func UnserializeShoppingCart ¶
func UnserializeShoppingCart(jsonData []byte) *ShoppingCart
func (*ShoppingCart) AddItem ¶
func (s *ShoppingCart) AddItem(sku string)
func (*ShoppingCart) IsEmpty ¶
func (s *ShoppingCart) IsEmpty() bool
func (*ShoppingCart) ItemTotal ¶
func (s *ShoppingCart) ItemTotal() int
func (*ShoppingCart) RemoveItem ¶
func (s *ShoppingCart) RemoveItem(sku string) bool
func (*ShoppingCart) UpdateItemQuantity ¶
func (s *ShoppingCart) UpdateItemQuantity(sku string, quantity int) bool
type ShoppingCartItem ¶
Click to show internal directories.
Click to hide internal directories.