commands

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfirmOrderCmd

type ConfirmOrderCmd struct {
	ID string
}

ConfirmOrderCmd confirms a pending order.

func (ConfirmOrderCmd) AggregateID

func (c ConfirmOrderCmd) AggregateID() string

func (ConfirmOrderCmd) EmitEvent

func (c ConfirmOrderCmd) EmitEvent(current *domain.Order) domain.Order

func (ConfirmOrderCmd) EventName

func (c ConfirmOrderCmd) EventName() string

func (ConfirmOrderCmd) ShouldSnapshot

func (c ConfirmOrderCmd) ShouldSnapshot() bool

func (ConfirmOrderCmd) Validate

func (c ConfirmOrderCmd) Validate(current *domain.Order) error

type CreateOrderCmd

type CreateOrderCmd struct {
	ID     string
	Total  float64
	Items  int
	ShipTo string
}

CreateOrderCmd creates a new order.

func (CreateOrderCmd) AggregateID

func (c CreateOrderCmd) AggregateID() string

func (CreateOrderCmd) EmitEvent

func (c CreateOrderCmd) EmitEvent(current *domain.Order) domain.Order

func (CreateOrderCmd) EventName

func (c CreateOrderCmd) EventName() string

func (CreateOrderCmd) ShouldSnapshot

func (c CreateOrderCmd) ShouldSnapshot() bool

func (CreateOrderCmd) Validate

func (c CreateOrderCmd) Validate(current *domain.Order) error

type ShipOrderCmd

type ShipOrderCmd struct {
	ID string
}

ShipOrderCmd marks an order as shipped.

func (ShipOrderCmd) AggregateID

func (c ShipOrderCmd) AggregateID() string

func (ShipOrderCmd) EmitEvent

func (c ShipOrderCmd) EmitEvent(current *domain.Order) domain.Order

func (ShipOrderCmd) EventName

func (c ShipOrderCmd) EventName() string

func (ShipOrderCmd) ShouldSnapshot

func (c ShipOrderCmd) ShouldSnapshot() bool

func (ShipOrderCmd) Validate

func (c ShipOrderCmd) Validate(current *domain.Order) error

Jump to

Keyboard shortcuts

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