Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateProductCommand ¶
type CreateProductCommand struct { ProductID uuid.UUID `validate:"required"` Name string `validate:"required,gte=0,lte=255"` Description string `validate:"required,gte=0,lte=5000"` Price float64 `validate:"required,gte=0"` CreatedAt time.Time `validate:"required"` }
func NewCreateProductCommand ¶
func NewCreateProductCommand(name string, description string, price float64) *CreateProductCommand
type CreateProductCommandHandler ¶
type CreateProductCommandHandler struct {
// contains filtered or unexported fields
}
func NewCreateProductCommandHandler ¶
func NewCreateProductCommandHandler(productRepository *repository.InMemoryProductRepository) *CreateProductCommandHandler
func (*CreateProductCommandHandler) Handle ¶
func (c *CreateProductCommandHandler) Handle(ctx context.Context, command *CreateProductCommand) (*creatingProductDtos.CreateProductCommandResponse, error)
Click to show internal directories.
Click to hide internal directories.