Documentation ¶
Index ¶
Constants ¶
View Source
const ( CustomerRegisteredEvent = "customers.CustomerRegistered" CustomerSmsChangedEvent = "customers.CustomerSmsChanged" CustomerAuthorizedEvent = "customers.CustomerAuthorized" CustomerEnabledEvent = "customers.CustomerEnabled" CustomerDisabledEvent = "customers.CustomerDisabled" )
View Source
const CustomerAggregate = "customers.CustomerAggregate"
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 CustomerAuthorized ¶
type CustomerAuthorized struct {
Customer *Customer
}
func (CustomerAuthorized) Key ¶
func (CustomerAuthorized) Key() string
type CustomerDisabled ¶
type CustomerDisabled struct {
Customer *Customer
}
func (CustomerDisabled) Key ¶
func (CustomerDisabled) Key() string
type CustomerEnabled ¶
type CustomerEnabled struct {
Customer *Customer
}
func (CustomerEnabled) Key ¶
func (CustomerEnabled) Key() string
type CustomerRegistered ¶
type CustomerRegistered struct {
Customer *Customer
}
func (CustomerRegistered) Key ¶
func (CustomerRegistered) Key() string
type CustomerRepository ¶
type CustomerSmsChanged ¶
type CustomerSmsChanged struct {
Customer *Customer
}
func (CustomerSmsChanged) Key ¶
func (CustomerSmsChanged) Key() string
type MockCustomerRepository ¶
MockCustomerRepository is an autogenerated mock type for the CustomerRepository type
func NewMockCustomerRepository ¶
func NewMockCustomerRepository(t mockConstructorTestingTNewMockCustomerRepository) *MockCustomerRepository
NewMockCustomerRepository creates a new instance of MockCustomerRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockCustomerRepository) Find ¶
Find provides a mock function with given fields: ctx, customerID
Click to show internal directories.
Click to hide internal directories.