command

package
v0.0.0-...-0c44e78 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandHandler

type CommandHandler[C any] interface {
	Handle(ctx context.Context, cmd C) error
}

type CreateOrder

type CreateOrder struct {
	OrderID    uint64
	CustomerID uint64
	Products   *[]PurchasedProduct
}

type CreateOrderHandler

type CreateOrderHandler CommandHandler[CreateOrder]

func NewCreateOrderHandler

func NewCreateOrderHandler(logger logger.Logger, orderRepo domain.OrderRepository) CreateOrderHandler

type DeleteOrder

type DeleteOrder struct {
	OrderID uint64
}

type DeleteOrderHandler

type DeleteOrderHandler CommandHandler[DeleteOrder]

func NewDeleteOrderHandler

func NewDeleteOrderHandler(logger logger.Logger, orderRepo domain.OrderRepository) DeleteOrderHandler

type PurchasedProduct

type PurchasedProduct struct {
	ProductID uint64
	Quantity  uint64
}

Jump to

Keyboard shortcuts

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