Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoodsService ¶
type GoodsService struct { Worker freedom.Worker GoodsRepo *repository.GoodsRepository EventTransaction *domainevent.EventTransaction //事务组件 }
GoodsService .
type OrderService ¶
type OrderService struct { Worker freedom.Worker GoodsRepo *repository.GoodsRepository OrderRepo *repository.OrderRepository EventTransaction *domainevent.EventTransaction //事务组件 }
OrderService .
func (*OrderService) Get ¶
func (srv *OrderService) Get(ID, userID int) (result vo.OrderRep, e error)
Get .
func (*OrderService) GetAll ¶
func (srv *OrderService) GetAll(userID int) (result []vo.OrderRep, e error)
GetAll .
func (*OrderService) Shop ¶ added in v1.8.6
func (srv *OrderService) Shop(goodsID, num, userID int) (e error)
Shop 这不是一个正确的示例,只是为展示领域事件和Kafka的结合, 请参考fshop的聚合根.
Directories ¶
Path | Synopsis |
---|---|
Package po generated by 'freedom new-po' Package po generated by 'freedom new-po'
|
Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' |
Package vo code generated by 'freedom new-project infra-example'
|
Package vo code generated by 'freedom new-project infra-example' |
Click to show internal directories.
Click to hide internal directories.