Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNameCannotBeBlank = errors.Wrap(errors.ErrBadRequest, "the customer name cannot be blank") ErrCustomerIDCannotBeBlank = errors.Wrap(errors.ErrBadRequest, "the customer id cannot be blank") ErrSmsNumberCannotBeBlank = errors.Wrap(errors.ErrBadRequest, "the SMS number cannot be blank") ErrCustomerAlreadyEnabled = errors.Wrap(errors.ErrBadRequest, "the customer is already enabled") ErrCustomerAlreadyDisabled = errors.Wrap(errors.ErrBadRequest, "the customer is already disabled") ErrCustomerNotAuthorized = errors.Wrap(errors.ErrUnauthorized, "customer is not authorized") )
Functions ¶
This section is empty.
Types ¶
type Customer ¶
type Customer struct {
ddd.AggregateBase
Name string
SmsNumber string
Enabled bool
}
func RegisterCustomer ¶
type CustomerAuthorized ¶
type CustomerAuthorized struct {
Customer *Customer
}
func (CustomerAuthorized) EventName ¶
func (CustomerAuthorized) EventName() string
type CustomerDisabled ¶
type CustomerDisabled struct {
Customer *Customer
}
func (CustomerDisabled) EventName ¶
func (CustomerDisabled) EventName() string
type CustomerEnabled ¶
type CustomerEnabled struct {
Customer *Customer
}
func (CustomerEnabled) EventName ¶
func (CustomerEnabled) EventName() string
type CustomerRegistered ¶
type CustomerRegistered struct {
Customer *Customer
}
func (CustomerRegistered) EventName ¶
func (CustomerRegistered) EventName() string
Click to show internal directories.
Click to hide internal directories.