Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotPaid = errors.New("order has not paid yet") ErrInvalidValue = errors.New("invalid value") )
Functions ¶
This section is empty.
Types ¶
type CancelledEvent ¶
type CancelledEvent struct {
// contains filtered or unexported fields
}
type CreatedEvent ¶
type CreatedEvent struct {
// contains filtered or unexported fields
}
type CustomerID ¶
type CustomerID string
func NewCustomerID ¶
func NewCustomerID() CustomerID
func (CustomerID) String ¶
func (id CustomerID) String() string
type Order ¶
func NewOrder ¶
func NewOrder(id OrderID, customerID CustomerID, productID ProductID, now aggregate.Now, status OrderStatus, version aggregate.Version) (*Order, error)
func (*Order) CustomerID ¶
func (*Order) Status ¶
func (o *Order) Status() OrderStatus
type OrderStatus ¶
type OrderStatus int
const ( Unknown OrderStatus = iota Submitted Paid Shipped Canceled )
Click to show internal directories.
Click to hide internal directories.