Documentation
¶
Index ¶
- type HttpApi
- func (h *HttpApi) AddItem(writer http.ResponseWriter, request *http.Request) (err error)
- func (h *HttpApi) Checkout(writer http.ResponseWriter, request *http.Request) (err error)
- func (h *HttpApi) DeleteItem(writer http.ResponseWriter, request *http.Request) (err error)
- func (h *HttpApi) DeleteItemsByUserID(writer http.ResponseWriter, request *http.Request) (err error)
- func (h *HttpApi) GetCart(writer http.ResponseWriter, request *http.Request) (err error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpApi ¶
type HttpApi struct {
// contains filtered or unexported fields
}
func NewCartHttpApi ¶
func (*HttpApi) DeleteItem ¶
func (*HttpApi) DeleteItemsByUserID ¶
type Service ¶
type Service interface { AddItem(ctx context.Context, userID int64, skuID int64, count uint16) error DeleteItem(ctx context.Context, userID int64, skuID int64) error DeleteItemsByUserID(ctx context.Context, userID int64) error GetCart(ctx context.Context, userID int64) (*models.Cart, error) Checkout(ctx context.Context, userID int64) (orderID int64, err error) }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.