Documentation ¶
Index ¶
- type AddCouponCommand
- type AddSaleItemCommand
- func (c *AddSaleItemCommand) Act(ctx context.Context, container dddfirework.RootContainer, ...) error
- func (c *AddSaleItemCommand) Build(ctx context.Context, h dddfirework.DomainBuilder) (roots []dddfirework.IEntity, err error)
- func (c *AddSaleItemCommand) Init(ctx context.Context) ([]string, error)
- type CreateOrderCommand
- type CreateOrderResult
- type DeleteOrderCommand
- type UpdateOrderCommand
- func (c *UpdateOrderCommand) Act(ctx context.Context, container dddfirework.RootContainer, ...) error
- func (c *UpdateOrderCommand) Build(ctx context.Context, builder dddfirework.DomainBuilder) (roots []dddfirework.IEntity, err error)
- func (c *UpdateOrderCommand) Init(ctx context.Context) (lockIDs []string, err error)
- type UpdateOrderOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCouponCommand ¶
func NewAddCouponCommand ¶
func NewAddCouponCommand(orderID string, coupon *sale.Coupon) *AddCouponCommand
func (*AddCouponCommand) Act ¶
func (c *AddCouponCommand) Act(ctx context.Context, container ddd.RootContainer, roots ...ddd.IEntity) error
func (*AddCouponCommand) Build ¶
func (c *AddCouponCommand) Build(ctx context.Context, builder ddd.DomainBuilder) (roots []ddd.IEntity, err error)
type AddSaleItemCommand ¶
type AddSaleItemCommand struct { dddfirework.Command // contains filtered or unexported fields }
func NewAddSaleItemCommand ¶
func NewAddSaleItemCommand(orderID string, item *sale.SaleItem) *AddSaleItemCommand
func (*AddSaleItemCommand) Act ¶
func (c *AddSaleItemCommand) Act(ctx context.Context, container dddfirework.RootContainer, roots ...dddfirework.IEntity) error
func (*AddSaleItemCommand) Build ¶
func (c *AddSaleItemCommand) Build(ctx context.Context, h dddfirework.DomainBuilder) (roots []dddfirework.IEntity, err error)
type CreateOrderCommand ¶
type CreateOrderCommand struct { dddfirework.Command Result *CreateOrderResult // contains filtered or unexported fields }
func NewCreateOrderCommand ¶
func (*CreateOrderCommand) Act ¶
func (c *CreateOrderCommand) Act(ctx context.Context, container dddfirework.RootContainer, roots ...dddfirework.IEntity) error
func (*CreateOrderCommand) PostSave ¶
func (c *CreateOrderCommand) PostSave(ctx context.Context, res *dddfirework.Result)
type CreateOrderResult ¶
type CreateOrderResult struct {
OrderID string
}
type DeleteOrderCommand ¶
type DeleteOrderCommand struct { dddfirework.Command // contains filtered or unexported fields }
func NewDeleteOrderCommand ¶
func NewDeleteOrderCommand(orderID string) *DeleteOrderCommand
func (*DeleteOrderCommand) Act ¶
func (c *DeleteOrderCommand) Act(ctx context.Context, container dddfirework.RootContainer, roots ...dddfirework.IEntity) error
func (*DeleteOrderCommand) Build ¶
func (c *DeleteOrderCommand) Build(ctx context.Context, builder dddfirework.DomainBuilder) (roots []dddfirework.IEntity, err error)
type UpdateOrderCommand ¶
type UpdateOrderCommand struct { dddfirework.Command // contains filtered or unexported fields }
func NewUpdateOrderCommand ¶
func NewUpdateOrderCommand(orderID string, opt UpdateOrderOpt) *UpdateOrderCommand
func (*UpdateOrderCommand) Act ¶
func (c *UpdateOrderCommand) Act(ctx context.Context, container dddfirework.RootContainer, roots ...dddfirework.IEntity) error
func (*UpdateOrderCommand) Build ¶
func (c *UpdateOrderCommand) Build(ctx context.Context, builder dddfirework.DomainBuilder) (roots []dddfirework.IEntity, err error)
type UpdateOrderOpt ¶
type UpdateOrderOpt struct {
Remark *string
}
Click to show internal directories.
Click to hide internal directories.