command

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCouponCommand

type AddCouponCommand struct {
	ddd.Command
	// contains filtered or unexported fields
}

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)

func (*AddCouponCommand) Init

func (c *AddCouponCommand) Init(ctx context.Context) ([]string, 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 (*AddSaleItemCommand) Build

func (*AddSaleItemCommand) Init

func (c *AddSaleItemCommand) Init(ctx context.Context) ([]string, error)

type CreateOrderCommand

type CreateOrderCommand struct {
	dddfirework.Command

	Result *CreateOrderResult
	// contains filtered or unexported fields
}

func NewCreateOrderCommand

func NewCreateOrderCommand(userID string, items []*sale.SaleItem, coupons []*sale.Coupon) *CreateOrderCommand

func (*CreateOrderCommand) Act

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 (*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 (*UpdateOrderCommand) Build

func (c *UpdateOrderCommand) Build(ctx context.Context, builder dddfirework.DomainBuilder) (roots []dddfirework.IEntity, err error)

func (*UpdateOrderCommand) Init

func (c *UpdateOrderCommand) Init(ctx context.Context) (lockIDs []string, err error)

type UpdateOrderOpt

type UpdateOrderOpt struct {
	Remark *string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL